Photon C++ Client API  5.0.7.3
Public Member Functions | List of all members
GenericAssociativeContainer< T, EKeyType, EValueType > Class Template Referenceabstract
Inheritance diagram for GenericAssociativeContainer< T, EKeyType, EValueType >:
Inheritance graph
[legend]
Collaboration diagram for GenericAssociativeContainer< T, EKeyType, EValueType >:
Collaboration graph
[legend]

Public Member Functions

virtual ~GenericAssociativeContainer (void)=0
 
virtual GenericAssociativeContainer< T, EKeyType, EValueType > & operator= (const GenericAssociativeContainer< T, EKeyType, EValueType > &toCopy)
 
template<template< typename, typename > class FT>
GenericAssociativeContainer< T, EKeyType, EValueType > & operator= (const GenericAssociativeContainer< FT, EKeyType, EValueType > &toCopy)
 
virtual bool operator== (const T< EKeyType, EValueType > &toCompare) const
 
virtual bool operator!= (const T< EKeyType, EValueType > &toCompare) const
 
virtual const EValueType & operator[] (unsigned int index) const
 
virtual const EValueType & operator[] (int index) const
 
virtual EValueType & operator[] (unsigned int index)
 
virtual EValueType & operator[] (int index)
 
virtual void put (const T< EKeyType, EValueType > &src)
 
template<template< typename, typename > class FT>
void put (const GenericAssociativeContainer< FT, EKeyType, EValueType > &src)
 
void put (const EKeyType &key, const EValueType &val)
 
void put (const EKeyType &key, const EValueType pVal, int size)
 
void put (const EKeyType &key, const EValueType pVal, const int *sizes)
 
virtual void remove (const EKeyType &key)
 
virtual bool contains (const EKeyType &key) const
 
virtual const EValueType * getValue (const EKeyType &key) const
 
virtual EValueType * getValue (const EKeyType &key)
 
virtual JVector< EKeyType > getKeys (void) const
 
- Public Member Functions inherited from GenericAssociativeContainerBase< T< EKeyType, EValueType >, JHashtable, JObject >
virtual ~GenericAssociativeContainerBase (void)=0
 
virtual void removeAt (unsigned int index)
 
virtual void removeAllElements (void)
 
virtual JStringtoString (JString &retStr, bool withTypes=false) const
 
virtual JStringtoString (JString &retStr, bool withTypes=false) const =0
 
JString toString (bool withTypes=false) const
 
virtual const JHashtablegetHashtable (void) const
 
virtual unsigned int getSize (void) const
 
- Public Member Functions inherited from Base
virtual ~Base (void)=0
 
- Public Member Functions inherited from LoggingBase< Base >
virtual ~LoggingBase (void)=0
 
- Public Member Functions inherited from ToString
virtual ~ToString (void)
 
virtual JString typeToString (void) const
 
JString toString (bool withTypes=false) const
 

Additional Inherited Members

- Static Public Member Functions inherited from LoggingBase< Base >
static void setListener (const BaseListener *pBaseListener)
 
static int getDebugOutputLevel (void)
 
static bool setDebugOutputLevel (int debugLevel)
 
static const LogFormatOptionsgetLogFormatOptions (void)
 
static void setLogFormatOptions (const LogFormatOptions &options)
 

Constructor & Destructor Documentation

◆ ~GenericAssociativeContainer()

~GenericAssociativeContainer ( void  )
pure virtual

Destructor.

Member Function Documentation

◆ operator=() [1/2]

GenericAssociativeContainer< T, EKeyType, EValueType > & operator= ( const GenericAssociativeContainer< T, EKeyType, EValueType > &  toCopy)
virtual

◆ operator=() [2/2]

GenericAssociativeContainer< T, EKeyType, EValueType > & operator= ( const GenericAssociativeContainer< FT, EKeyType, EValueType > &  toCopy)

operator=. Makes a deep copy of its right operand into its left operand. This overwrites old data in the left operand.

◆ operator==()

bool operator== ( const T< EKeyType, EValueType > &  toCompare) const
virtual

operator==.

Returns
true, if both operands are equal, false otherwise.

Two instances are considered equal if they each hold the same number of entries and, for a given key, the corresponding values equal each other.

Two values are considered equal to each other, if instances of class OT, that are holding them as payloads, equal each other.

See also
OT::operator==()

Reimplemented from GenericAssociativeContainerBase< T< EKeyType, EValueType >, JHashtable, JObject >.

◆ operator!=()

bool operator!= ( const T< EKeyType, EValueType > &  toCompare) const
virtual

operator!=.

Returns
false, if operator==() would return true, true otherwise.

Reimplemented from GenericAssociativeContainerBase< T< EKeyType, EValueType >, JHashtable, JObject >.

◆ operator[]() [1/4]

const EValueType & operator[] ( unsigned int  index) const
virtual

operator[].

Accesses the value at the given index like in an array. This does not check for valid indexes and shows undefined behavior for invalid indexes

◆ operator[]() [2/4]

const EValueType & operator[] ( int  index) const
virtual

operator[].

Accesses the value at the given index like in an array. This does not check for valid indexes and shows undefined behavior for invalid indexes

◆ operator[]() [3/4]

EValueType & operator[] ( unsigned int  index)
virtual

operator[].

Accesses the value at the given index like in an array. This does not check for valid indexes and shows undefined behavior for invalid indexes

◆ operator[]() [4/4]

EValueType & operator[] ( int  index)
virtual

operator[].

Accesses the value at the given index like in an array. This does not check for valid indexes and shows undefined behavior for invalid indexes

◆ put() [1/5]

void put ( const T< EKeyType, EValueType > &  src)
virtual

Adds all pairs of a key and a corresponding value from the passed instance to the instance, on which it is called on. If a key is already existing, then its old value will be replaced with the new one.

Parameters
srcinstance, from which to add the content
Returns
nothing.

Reimplemented from GenericAssociativeContainerBase< T< EKeyType, EValueType >, JHashtable, JObject >.

◆ put() [2/5]

void put ( const GenericAssociativeContainer< FT, EKeyType, EValueType > &  src)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ put() [3/5]

void put ( const EKeyType &  key,
const EValueType &  val 
)

Adds a pair of a key and a corresponding value to the instance.

If the key is already existing, then it's old value will be replaced with the new one. Please have a look at the table of datatypes for a list of supported types for keys and values

Parameters
keythe key to add
valthe value to add

◆ put() [4/5]

void put ( const EKeyType &  key,
const EValueType  pVal,
int  size 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

This overload accepts singledimensional arrays and NULL-pointers passed for parameter pVal. NULL pointers are only legal input, if size is 0

Parameters
keythe key to add
pValthe value array to add
sizethe size of the value array

◆ put() [5/5]

void put ( const EKeyType &  key,
const EValueType  pVal,
const int *  sizes 
)

◆ remove()

void remove ( const EKeyType &  key)
virtual

Deletes the specified key and the corresponding value, if found in the Hashtable.

Parameters
keyPointer to the key of the key/value-pair to remove.
See also
removeAt(), removeAllElements()

◆ contains()

bool contains ( const EKeyType &  key) const
virtual

Checks, whether the Hashtable contains a certain key.

Parameters
keyPointer to the key to look up.
Returns
true if the specified key was found, false otherwise.

◆ getValue() [1/2]

const EValueType * getValue ( const EKeyType &  key) const
virtual

Returns a pointer to the corresponding value for a specified key.

Parameters
keyReference to the key to return the corresponding value for.
Returns
a pointer to the corresponding value if the Hashtable contains the specified key, NULL otherwise.
See also
put()

◆ getValue() [2/2]

EValueType * getValue ( const EKeyType &  key)
virtual

Returns a pointer to the corresponding value for a specified key.

Parameters
keyReference to the key to return the corresponding value for.
Returns
a pointer to the corresponding value if the Hashtable contains the specified key, NULL otherwise.
See also
put()

◆ getKeys()

JVector< EKeyType > getKeys ( void  ) const
virtual

Returns
a JVector holding all keys contained in the Hashtable.