45 |
|
#include "types/DataHolder.hpp" |
46 |
|
|
47 |
|
namespace oopse { |
48 |
< |
class BondStamp : public DataHolder { |
49 |
< |
|
50 |
< |
public: |
51 |
< |
void setMembers(std::vector<int> members) { |
52 |
< |
if (members.size() ==2) { |
53 |
< |
a = members[0]; |
54 |
< |
b = members[1]; |
55 |
< |
if (a < 0 || b < 0) { |
56 |
< |
std::ostringstream oss; |
57 |
< |
oss << "BondStamp Error: members" << containerToString(members) << " is invalid" << std::endl; |
58 |
< |
throw OOPSEException(oss.str()); |
59 |
< |
} |
60 |
< |
} else { |
61 |
< |
std::ostringstream oss; |
62 |
< |
oss << "BondStamp Error: members" << containerToString(members) << " is invalid" << std::endl; |
63 |
< |
throw OOPSEException(oss.str()); |
48 |
> |
class BondStamp : public DataHolder { |
49 |
> |
|
50 |
> |
public: |
51 |
> |
void setMembers(std::vector<int> members) { |
52 |
> |
if (members.size() ==2) { |
53 |
> |
a = members[0]; |
54 |
> |
b = members[1]; |
55 |
> |
if (a < 0 || b < 0) { |
56 |
> |
std::ostringstream oss; |
57 |
> |
oss << "BondStamp Error: members" << containerToString(members) << " is invalid" << std::endl; |
58 |
> |
throw OOPSEException(oss.str()); |
59 |
|
} |
60 |
< |
|
61 |
< |
|
60 |
> |
} else { |
61 |
> |
std::ostringstream oss; |
62 |
> |
oss << "BondStamp Error: members" << containerToString(members) << " is invalid" << std::endl; |
63 |
> |
throw OOPSEException(oss.str()); |
64 |
|
} |
65 |
|
|
66 |
< |
int getA() {return a;} |
67 |
< |
int getB() {return b;} |
68 |
< |
private: |
69 |
< |
int a; |
70 |
< |
int b; |
71 |
< |
}; |
72 |
< |
|
66 |
> |
|
67 |
> |
} |
68 |
> |
|
69 |
> |
int getA() {return a;} |
70 |
> |
int getB() {return b;} |
71 |
> |
private: |
72 |
> |
int a; |
73 |
> |
int b; |
74 |
> |
}; |
75 |
|
} |
76 |
|
#endif |