Association< T, assocType > Class Template Reference
[Tools]
associate two object together, the second could be not defined in principle
More...
#include <Association.h>
List of all members.
Detailed Description
template<class T, class assocType>
class Association< T, assocType >
associate two object together, the second could be not defined in principle
default constructor Decimal constructor
- Parameters:
-
| value | first value reset the values at null reset the mean at another value |
| value | first value current mean |
- Returns:
- currrent mean update the mean and return the updated mean
updated mean
- Parameters:
-
- Author:
- Antonio Franchi
- Note:
- requirements: the two classes must have " default constructor" and "= operator"
Constructor & Destructor Documentation
template<class T, class assocType>
default constructor
- Note:
- it is automatically set as NOT associated
template<class T, class assocType>
obj constructor
- Note:
- it is automatically set as NOT associated
- Parameters:
-
| o | object to which a second assoObj could be associated |
template<class T, class assocType>
complete constructor (T and assocType)
- Note:
- the id is automatically set as associated
- Parameters:
-
| o | object to which a the ao must be associated |
| ao | an object of type assocTypeObj to associate with o |
template<class T, class assocType>
Member Function Documentation
template<class T, class assocType>
template<class T, class assocType>
void Association< T, assocType >::associate |
( |
const assocType & |
ao |
) |
[inline] |
associate the stored object to the passed object
- Note:
- after this call it is automatically setted as associated
- Parameters:
-
| ao | object that must be associated |
template<class T, class assocType>
void Association< T, assocType >::unassociate |
( |
|
) |
[inline] |
associate the stored object to the passed object
- Note:
- after this call it is automatically setted as associated
- Parameters:
-
| ao | object that must be associated |
template<class T, class assocType>
bool Association< T, assocType >::associated |
( |
void |
|
) |
const [inline] |
says if the object has an associated assoObject
- Returns:
- boolean: false if not associated, true if yes
template<class T, class assocType>
T Association< T, assocType >::getObj |
( |
void |
|
) |
const [inline] |
get the stored object
- Returns:
- the stored object
template<class T, class assocType>
T* Association< T, assocType >::setObj |
( |
void |
|
) |
[inline] |
template<class T, class assocType>
void Association< T, assocType >::setObj |
( |
const T & |
pp |
) |
[inline] |
template<class T, class assocType>
assocType Association< T, assocType >::getAsso |
( |
void |
|
) |
const [inline] |
return the associated object
- Returns:
- the associated object
The documentation for this class was generated from the following file: