The Sparta Modeling Framework
|
Object which can only have it's value set once. Throws exception if being set more than once. More...
#include <Utils.hpp>
Public Member Functions | |
AssignOnceObject (const AssignOnceObject &rhp) | |
Copy Constructor. | |
AssignOnceObject (AssignOnceObject &&rhp) | |
Move-Construction disabled until needed. | |
AssignOnceObject (const T &def_value, const char *name) | |
Construct with a default and name for use during errors. This constructor starts the object in unassigned state, but provides a default value. | |
AssignOnceObject () | |
Construct with no name. | |
operator const T & () const | |
Cast to contained type T. | |
const T & | get () const |
Get contained value of type T. | |
bool | operator== (const AssignOnceObject< T > &b) const |
Compare against another AssignOnceObject of the same contained type T. | |
const T & | operator= (const AssignOnceObject< T > &b) |
Assign using another AssignOnceObject of the same contained type T. | |
const T & | operator= (const T &v) |
Assign using a given value of type T. | |
bool | assigned () const |
Friends | |
template<typename X > | |
std::ostream & | operator<< (std::ostream &o, const AssignOnceObject< X > &v) |
Object which can only have it's value set once. Throws exception if being set more than once.
Template | parameter |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assign using another AssignOnceObject of the same contained type T.
|
inline |
|
inline |
Compare against another AssignOnceObject of the same contained type T.
Definition at line 509 of file Utils.hpp.