Inherits Relation1_N< S, T >.
Public Member Functions | |
Relation1_X (const char *name, unsigned int maxRelated) | |
virtual | ~Relation1_X () |
void | relate (S source, T target) throw (std::overflow_error) |
void | relate (const S &source, const std::vector< T > &targets) throw (std::overflow_error) |
Each object can be connected to various others.
YGP::Relation1_X< S, T >::Relation1_X | ( | const char * | name, | |
unsigned int | maxRelated | |||
) | [inline] |
Creates an 1-to-n relation.
name | Name of relation | |
maxRelated | The number of elements which can be related to the object |
virtual YGP::Relation1_X< S, T >::~Relation1_X | ( | ) | [inline, virtual] |
Destructor.
void YGP::Relation1_X< S, T >::relate | ( | const S & | source, | |
const std::vector< T > & | targets | |||
) | throw (std::overflow_error) [inline] |
Connects an object with a bunch of objects, replacing the previously related objects.
source | Parent to relate | |
targets | Children to relate with parent |
std::overflow_error | If cardinality would be invalidated |
Reimplemented from YGP::Relation1_N< S, T >.
void YGP::Relation1_X< S, T >::relate | ( | S | source, | |
T | target | |||
) | throw (std::overflow_error) [inline] |
Connects two objects.
source | Parent to relate | |
target | Child to relate with parent |
std::overflow_error | If cardinality would be invalidated |