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.

Public Member Functions

 Association ()
 Association (const T &o)
 Association (const T &o, const assocType &ao)
 Association (const Association &a)
Associationoperator= (const Association &a)
void associate (const assocType &ao)
void unassociate ()
bool associated (void) const
getObj (void) const
T * setObj (void)
void setObj (const T &pp)
assocType getAsso (void) const


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:
value another value Association
Author:
Antonio Franchi
Note:
requirements: the two classes must have " default constructor" and "= operator"

Constructor & Destructor Documentation

template<class T, class assocType>
Association< T, assocType >::Association (  )  [inline]

default constructor

Note:
it is automatically set as NOT associated

template<class T, class assocType>
Association< T, assocType >::Association ( const T &  o  )  [inline]

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>
Association< T, assocType >::Association ( const T &  o,
const assocType &  ao 
) [inline]

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>
Association< T, assocType >::Association ( const Association< T, assocType > &  a  )  [inline]

copy constructor


Member Function Documentation

template<class T, class assocType>
Association& Association< T, assocType >::operator= ( const Association< T, assocType > &  a  )  [inline]

assigment operator =

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:

Generated on Mon Feb 20 07:01:09 2017 for MIP by  doxygen 1.5.6