1 |
< |
/* |
1 |
> |
/* |
2 |
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
42 |
|
#ifndef TYPES_BENDSTAMP_HPP |
43 |
|
#define TYPES_BENDSTAMP_HPP |
44 |
|
|
45 |
< |
#include "io/LinkedAssign.hpp" |
45 |
> |
#include "types/DataHolder.hpp" |
46 |
> |
#include "utils/Tuple.hpp" |
47 |
> |
namespace oopse { |
48 |
|
|
49 |
< |
class BendStamp{ |
49 |
> |
class BendStamp : public DataHolder { |
50 |
> |
DeclareParameter(GhostVectorSource, int); |
51 |
> |
public: |
52 |
|
|
53 |
< |
public: |
54 |
< |
BendStamp(); |
51 |
< |
~BendStamp(); |
52 |
< |
|
53 |
< |
void assignString( char* lhs, char* rhs ); |
54 |
< |
void assignDouble( char* lhs, double rhs ); |
55 |
< |
void assignInt( char* lhs, int rhs ); |
56 |
< |
void members( int the_a, int the_b, int the_c ); |
57 |
< |
void constrain( double the_constraint ); |
58 |
< |
char* checkMe( void ); |
53 |
> |
BendStamp(); |
54 |
> |
virtual ~BendStamp(); |
55 |
|
|
56 |
< |
int getA( void ){ return a; } |
57 |
< |
int getB( void ){ return b; } |
58 |
< |
int getC( void ){ return c; } |
56 |
> |
int getMemberAt( int index ) {return members_.at(index);} |
57 |
> |
int getNMembers() {return members_.size();} |
58 |
> |
std::vector<int> getMembers() {return members_;} |
59 |
> |
void setMembers(const std::vector<int>& members) { |
60 |
> |
members_ = members; |
61 |
> |
if (members_.size() < 2 || members_.size() >3) { |
62 |
> |
std::ostringstream oss; |
63 |
> |
oss << "members" << containerToString(members) << " is an invalid" << std::endl; |
64 |
> |
throw OOPSEException(oss.str()); |
65 |
> |
} |
66 |
> |
} |
67 |
> |
void setMembers(IntTuple3 tuple) { |
68 |
> |
members_.push_back(tuple.first); |
69 |
> |
members_.push_back(tuple.second); |
70 |
> |
members_.push_back(tuple.third); |
71 |
> |
} |
72 |
> |
virtual void validate(); |
73 |
|
|
74 |
< |
int haveExtras( void ) { return have_extras; } |
75 |
< |
LinkedAssign* getExtras( void ) { return unhandled; } |
76 |
< |
|
67 |
< |
private: |
68 |
< |
|
69 |
< |
int a, b, c; //the members |
70 |
< |
double constraint; |
71 |
< |
short int have_mbrs, have_constraint; |
72 |
< |
|
73 |
< |
LinkedAssign* unhandled; // the unhandled assignments |
74 |
< |
short int have_extras; |
75 |
< |
|
74 |
> |
private: |
75 |
> |
|
76 |
> |
std::vector<int> members_; |
77 |
|
}; |
78 |
< |
|
78 |
> |
} |
79 |
|
#endif |