Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Ishtar::Variable< T, ro, s, warningWhenInitializedWithDefaultValue > Class Template Reference

#include <settings.h>

List of all members.


Detailed Description

template<typename T, bool ro = false, Size s = 1, bool warningWhenInitializedWithDefaultValue = true>
class Ishtar::Variable< T, ro, s, warningWhenInitializedWithDefaultValue >

A variable for a scalar value that behaves like a standard C++ variable excepted that its content is stored in a GenericVarService pointed by ptr and is accessible through network.


Public Member Functions

 Variable (const std::string &name, T defaultValue=T())
 Constructor, associate this variable with name.
 ~Variable ()
 Destructor.
void associate (const std::string &name, T defaultValue)
 Read this variable's content from config file and associate it to the GenericVarService name.
 Variable (const Variable< T, ro, s > &v)
 Copy constructor.
Variableoperator= (const Variable< T, ro, s > &v)
 Assignation operator.
 operator T & () const
 Cast operator, return reference to v[0].
T & operator[] (Size index) const
 Array access operator, return reference to v[index].
Variableoperator= (const T &val)
 Assignation operator, assign val to v[0].
Variableoperator= (const T val[s])
 Assignation operator, assign array val to v.

Private Attributes

GenericVarService< T, ro,
s > * 
ptr
 The service really containing the value.


The documentation for this class was generated from the following file:
Generated on Mon Oct 24 17:31:47 2005 for libishtarsettings by  doxygen 1.4.2