#include <CAssocArrayBinding.h>
Inheritance diagram for CAssocArrayBinding< T >:
Public Member Functions | |
CAssocArrayBinding (const STD(string)&rName) | |
CAssocArrayBinding (const char *pName) | |
~CAssocArrayBinding () | |
STD (map)< STD(string) | |
T | getArray () const |
< Get entire STD(map) | |
STD (map)< STD(string) | |
T::iterator | begin () |
STD (map)< STD(string) | |
T::iterator | end () |
T & | operator[] (const char *pName) |
T & | operator[] (const STD(string)&rName) |
STD (map)< STD(string) | |
T::iterator | find (const char *pName) |
STD (map)< STD(string) | |
T::iterator | find (const STD(string)&rName) |
STD (string) getName() const | |
int | getType () const |
virtual void | InitBindings (CTCLInterpreter &rInterp) |
virtual void | Commit (CTCLInterpreter &rInterp) |
virtual void | ShutdownBindings (CTCLInterpreter &rInterp) |
virtual void | Dump (int fd) |
Private Member Functions | |
STD (map)< STD(string) | |
STD (string) m_sName | |
TCL Name of array. | |
CAssocArrayBinding (const CAssocArrayBinding &rhs) | |
CAssocArrayBinding & | operator= (const CAssocArrayBinding &rhs) |
int | operator== (const CAssocArrayBinding &rhs) |
Private Attributes | |
T | m_Array |
Data stored in this STD(map). | |
int | m_TCLVariableType |
Type of data in the array. |
Definition at line 326 of file CAssocArrayBinding.h.
|
|
|
Constructs an associative array configured from a TCL array. The TCL array name is speicified by a const char*
Definition at line 327 of file CAssocArrayBinding.cpp. References CAssocArrayBinding< T >::m_TCLVariableType, and CBinding< T >::VariableType(). |
|
The destructor will need to delete storage associated with character entries in the map. Definition at line 339 of file CAssocArrayBinding.cpp. References CAssocArrayBinding< T >::m_Array, and CAssocArrayBinding< T >::m_TCLVariableType. |
|
|
|
< get iterator to start of STD(map). Definition at line 350 of file CAssocArrayBinding.h. References CAssocArrayBinding< T >::m_Array. |
|
Commits the bindings to the array. In this case we will determine the set of indices the variable has (by running a string script of the form "array names m_sName", and fetching the results from the result string. For each item in the TCL array an item is created in the m_Array. Note that if the type is TCL_BIND_STRING, dynamic memory is allocated to hold the result string.
Implements CBinding< T >. Definition at line 376 of file CAssocArrayBinding.cpp. References CAssocArrayBinding< T >::m_Array. |
|
Dumps the contents of the array out in a form which allows the array to be recovered by reading the file.
Implements CBinding< T >. Definition at line 474 of file CAssocArrayBinding.cpp. References CAssocArrayBinding< T >::m_Array. |
|
< get iterator to end of STD(map). Definition at line 353 of file CAssocArrayBinding.h. References CAssocArrayBinding< T >::m_Array. |
|
Definition at line 366 of file CAssocArrayBinding.h. References CAssocArrayBinding< T >::m_Array. |
|
Definition at line 363 of file CAssocArrayBinding.h. References CAssocArrayBinding< T >::m_Array, and CAssocArrayBinding< T >::STD(). |
|
< Get entire STD(map)
Definition at line 346 of file CAssocArrayBinding.h. |
|
< Get data type. Definition at line 374 of file CAssocArrayBinding.h. |
|
Initialize the bindings prior to reading in the configuration file. for this class the actual binding operation is done in the commit phase so this is a no-op.
Implements CBinding< T >. Definition at line 359 of file CAssocArrayBinding.cpp. |
|
|
|
|
|
< Index item by name. Definition at line 360 of file CAssocArrayBinding.h. References CAssocArrayBinding< T >::m_Array. |
|
< Index item by name. Definition at line 356 of file CAssocArrayBinding.h. References CAssocArrayBinding< T >::m_Array, and CAssocArrayBinding< T >::STD(). |
|
Closes out whatever needs closing prior to deleting the interpreter which was used to read the configuration file. In this case, no action is taken as the 'binding' is done at commit time and no real connection is made between the interpreter and the array.
Implements CBinding< T >. Definition at line 464 of file CAssocArrayBinding.cpp. |
|
< Get name of TCL array. Definition at line 370 of file CAssocArrayBinding.h. |
|
|
|
|
|
|
|
|
|
|
|
TCL Name of array.
Reimplemented from CBinding< T >. |
|
Referenced by CAssocArrayBinding< T >::find(), and CAssocArrayBinding< T >::operator[](). |
|
Data stored in this STD(map).
Definition at line 330 of file CAssocArrayBinding.h. Referenced by CAssocArrayBinding< T >::begin(), CAssocArrayBinding< T >::Commit(), CAssocArrayBinding< T >::Dump(), CAssocArrayBinding< T >::end(), CAssocArrayBinding< T >::find(), CAssocArrayBinding< T >::operator[](), and CAssocArrayBinding< T >::~CAssocArrayBinding(). |
|
Type of data in the array.
Definition at line 332 of file CAssocArrayBinding.h. Referenced by CAssocArrayBinding< T >::CAssocArrayBinding(), and CAssocArrayBinding< T >::~CAssocArrayBinding(). |