YGP::Relation1_X< S, T > Class Template Reference

1-to-N relation with a limited N. More...

Inherits Relation1_N< S, T >.

List of all members.

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)


Detailed Description

template<class S, class T>
class YGP::Relation1_X< S, T >

1-to-N relation with a limited N.

Each object can be connected to various others.


Constructor & Destructor Documentation

template<class S , class T >
YGP::Relation1_X< S, T >::Relation1_X ( const char *  name,
unsigned int  maxRelated 
) [inline]

Creates an 1-to-n relation.

Parameters:
name Name of relation
maxRelated The number of elements which can be related to the object

template<class S , class T >
virtual YGP::Relation1_X< S, T >::~Relation1_X (  )  [inline, virtual]

Destructor.


Member Function Documentation

template<class S , class T >
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.

Parameters:
source Parent to relate
targets Children to relate with parent
Exceptions:
std::overflow_error If cardinality would be invalidated

Reimplemented from YGP::Relation1_N< S, T >.

template<class S , class T >
void YGP::Relation1_X< S, T >::relate ( source,
target 
) throw (std::overflow_error) [inline]

Connects two objects.

Parameters:
source Parent to relate
target Child to relate with parent
Exceptions:
std::overflow_error If cardinality would be invalidated


The documentation for this class was generated from the following file:

YGP Version 0.9.31 - Generated on Wed Nov 18 11:25:28 2009 by doxygen 1.5.8