Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

WMitem< T > Class Template Reference

WMitem<T> is a reference to the variable of type T described by the associated WMentry. More...

#include <WMclass.h>

Inheritance diagram for WMitem< T >:

Detailed Description

template<class T>
class WMitem< T >

WMitem<T> is a reference to the variable of type T described by the associated WMentry.

If the variable is declared in multiple functions, each declaration will have an associated WMitem<T> instance, but all the instances will reference the same variable.

Definition at line 150 of file WMclass.h.

List of all members.

Public Member Functions

 WMitem (T *const initval)
 constructor
 WMitem (const WMitem &in)
 shallow copy
virtual WMitem< T > & operator= (const T &new_value)
 Assignment operator.
WMitem< T > & operator++ ()
 Generic operator prefix (++x).
WMitem< T > operator++ (int)
 Generic operator postfix (x++).
WMitem< T > & operator-- ()
 Generic operator prefix (--x).
WMitem< T > operator-- (int)
 Generic operator postfix (x--).
WMitem< T > & operator+= (const T &val)
 Generic operator+=.
WMitem< T > & operator-= (const T &val)
 Generic operator-=.
WMitem< T > & operator*= (const T &val)
 Generic operator*=.
WMitem< T > & operator/= (const T &val)
 Generic operator/=.
void announce (const T &val)
 Annonces changes, throws an event from wmVarEGID.
virtual T & get_value (void) const
 Explicit retrieval of variable value, used by toString().
virtual operator T & () const
 Coerce a WMitem<T> to type T by retrieving the value.
virtual std::string toString (void) const
 std::String representation of the value.
template<>
std::string toString (void) const
 override this to return appropriate string representation
template<>
std::string toString (void) const
 override this to return appropriate string representation
template<>
std::string toString (void) const
 override this to return appropriate string representation
template<>
std::string toString (void) const
 override this to return appropriate string representation
template<>
std::string toString (void) const
 override this to return appropriate string representation
template<>
std::string toString (void) const
 override this to return appropriate string representation
template<>
std::string toString (void) const
 override this to return appropriate string representation
template<>
std::string toString (void) const
 override this to return appropriate string representation

Constructor & Destructor Documentation

template<class T>
WMitem< T >::WMitem ( T *const   initval  ) 

constructor

Definition at line 152 of file WMclass.h.

template<class T>
WMitem< T >::WMitem ( const WMitem< T > &  in  ) 

shallow copy

Definition at line 153 of file WMclass.h.


Member Function Documentation

template<class T >
void WMitem< T >::announce ( const T &  val  ) 

Annonces changes, throws an event from wmVarEGID.

Definition at line 263 of file WMclass.h.

Referenced by WMitem< T >::operator++(), WMitem< T >::operator--(), and WMitem< T >::operator=().

template<class T>
virtual T& WMitem< T >::get_value ( void   )  const [virtual]
template<class T>
virtual WMitem< T >::operator T & (  )  const [virtual]

Coerce a WMitem<T> to type T by retrieving the value.

Definition at line 172 of file WMclass.h.

template<class T >
WMitem< T > & WMitem< T >::operator*= ( const T &  val  ) 

Generic operator*=.

Definition at line 322 of file WMclass.h.

template<class T >
WMitem< T > WMitem< T >::operator++ ( int   ) 

Generic operator postfix (x++).

Definition at line 292 of file WMclass.h.

template<class T >
WMitem< T > & WMitem< T >::operator++ ( void   ) 

Generic operator prefix (++x).

Definition at line 286 of file WMclass.h.

template<class T >
WMitem< T > & WMitem< T >::operator+= ( const T &  val  ) 

Generic operator+=.

Definition at line 312 of file WMclass.h.

template<class T >
WMitem< T > WMitem< T >::operator-- ( int   ) 

Generic operator postfix (x--).

Definition at line 305 of file WMclass.h.

template<class T >
WMitem< T > & WMitem< T >::operator-- ( void   ) 

Generic operator prefix (--x).

Definition at line 299 of file WMclass.h.

template<class T >
WMitem< T > & WMitem< T >::operator-= ( const T &  val  ) 

Generic operator-=.

Definition at line 317 of file WMclass.h.

template<class T >
WMitem< T > & WMitem< T >::operator/= ( const T &  val  ) 

Generic operator/=.

Definition at line 327 of file WMclass.h.

template<class T >
WMitem< T > & WMitem< T >::operator= ( const T &  new_value  )  [virtual]

Assignment operator.

The assignment operator for WMitem<T> changes the value of the variable referenced by the WMitem, and reports the change if the variable is "watched".

Definition at line 255 of file WMclass.h.

Referenced by WMitem< T >::operator*=(), WMitem< T >::operator+=(), WMitem< T >::operator-=(), and WMitem< T >::operator/=().

template<>
std::string WMitem< WMregistry >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 70 of file WMclass.cc.

template<>
std::string WMitem< std::string >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 63 of file WMclass.cc.

template<>
std::string WMitem< char * >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 51 of file WMclass.cc.

template<>
std::string WMitem< char >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 44 of file WMclass.cc.

template<>
std::string WMitem< bool >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 37 of file WMclass.cc.

template<>
std::string WMitem< double >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 30 of file WMclass.cc.

template<>
std::string WMitem< float >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 23 of file WMclass.cc.

template<>
std::string WMitem< int >::toString ( void   )  const [virtual]

override this to return appropriate string representation

Implements WMitem_base.

Definition at line 16 of file WMclass.cc.

template<class T >
std::string WMitem< T >::toString ( void   )  const [virtual]

std::String representation of the value.

Generic toString() method that just displays the variable's type and address. Will be overridden for common types like int or double.

Implements WMitem_base.

Definition at line 245 of file WMclass.h.


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:18 2016 by Doxygen 1.6.3