class AbstractTable : public HCL_Base

Interface for associative array, or hash table, data access

Inheritance:


Public Methods

virtual ~AbstractTable ()
destructor
virtual AbstractTable* Replicate () const
Replication: creates and returns pointer to independent copy
virtual int Size () const
Return the size of the table = number of keys
virtual char* Key ( int & i)
Return the ith key
virtual ostream& Write (ostream&s) const
Print contents of tableto output stream

Public

Read access by key.
virtual int GetValue (const char *key, int &value) const
extract value as int
virtual int GetValue (const char *key, float &value) const
extract value as float
virtual int GetValue (const char *key, double &value) const
extract value as double
virtual int GetValue (const char *key, char *value, int length = 0) const
extract value as string
Write access by key.
virtual int PutValue (const char *key, int value)
write value as int
virtual int PutValue (const char *key, float value)
write value as float
virtual int PutValue (const char *key, double value)
write value as double
virtual int PutValue (const char *key, const char *value)
write value as character string
Read access by indexed key.
virtual int GetArrayValue (const char *key, int ind, int &value) const
extract value as int
virtual int GetArrayValue (const char *key, int ind, float &value) const
read value as float
virtual int GetArrayValue (const char *key, int ind, double &value) const
read value as double
virtual int GetArrayValue (const char *key, int ind, char *value, int length = 0) const
read value into character string
Read access by indexed key.
virtual int PutArrayValue (const char *key, int ind, int value)
write int value
virtual int PutArrayValue (const char *key, int ind, float value)
write float value
virtual int PutArrayValue (const char *key, int ind, double value)
write double value
virtual int PutArrayValue (const char *key, int ind, const char *value)
write character string value

Print the contents of the table as "key=value" pairs to output stream s

Inherited from HCL_Base:

Public Methods

void IncCount() const
void DecCount() const
int Count() const

Documentation

Interface for associative array, or hash table, data access. Access to data is through Get and Put methods. These methods take two arguments: the first is a character string specifying the key, to which the table associates the value returned in the second table. The value may be any primitive numerical type, or a string. Get methods, which are const, extract the value, implicitly type-converting it if necessary. The Put methods replace the values.
virtual ~AbstractTable()
destructor

virtual AbstractTable* Replicate() const
Replication: creates and returns pointer to independent copy

virtual int Size() const
Return the size of the table = number of keys

virtual char* Key( int & i)
Return the ith key

Read access by key.

virtual int GetValue(const char *key, int &value) const
extract value as int

virtual int GetValue(const char *key, float &value) const
extract value as float

virtual int GetValue(const char *key, double &value) const
extract value as double

virtual int GetValue(const char *key, char *value, int length = 0) const
extract value as string

Write access by key.

virtual int PutValue(const char *key, int value)
write value as int

virtual int PutValue(const char *key, float value)
write value as float

virtual int PutValue(const char *key, double value)
write value as double

virtual int PutValue(const char *key, const char *value)
write value as character string

Read access by indexed key.
Provides easy access to keys with integral indices, such as "n1", which would be accessed with key="n", ind=1.

virtual int GetArrayValue(const char *key, int ind, int &value) const
extract value as int

virtual int GetArrayValue(const char *key, int ind, float &value) const
read value as float

virtual int GetArrayValue(const char *key, int ind, double &value) const
read value as double

virtual int GetArrayValue(const char *key, int ind, char *value, int length = 0) const
read value into character string

Read access by indexed key.
Provides easy access to keys with integral indices, such as "n1", which would be accessed with key="n", ind=1.

virtual int PutArrayValue(const char *key, int ind, int value)
write int value

virtual int PutArrayValue(const char *key, int ind, float value)
write float value

virtual int PutArrayValue(const char *key, int ind, double value)
write double value

virtual int PutArrayValue(const char *key, int ind, const char *value)
write character string value

Print the contents of the table as "key=value" pairs to output stream s. ( s<<table; is equivalent )
Parameters:
s - Output stream

virtual ostream& Write(ostream&s) const
Print contents of tableto output stream


Direct child classes:
Table

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de