Photon C++ Client API  5.0.7.3
List of all members
JHashtable Class Reference
Inheritance diagram for JHashtable:
Inheritance graph
[legend]
Collaboration diagram for JHashtable:
Collaboration graph
[legend]

Additional Inherited Members

- Public Member Functions inherited from AssociativeContainerBase< JHashtable, JObject >
virtual ~AssociativeContainerBase (void)=0
 
AssociativeContainerBase< JHashtable, JObject > & operator= (const AssociativeContainerBase< JHashtable, JObject > &toCopy)
 
virtual bool operator== (const AssociativeContainerBase< JHashtable, JObject > &toCompare) const
 
virtual bool operator!= (const AssociativeContainerBase< JHashtable, JObject > &toCompare) const
 
virtual const JObjectoperator[] (unsigned int index) const
 
virtual const JObjectoperator[] (int index) const
 
virtual JObjectoperator[] (unsigned int index)
 
virtual JObjectoperator[] (int index)
 
virtual void put (const JHashtable &src)
 
void put (const FKeyType &key, const FValueType &val)
 
void put (const FKeyType &key, const FValueType pVal, int size)
 
void put (const FKeyType &key, const FValueType pVal, const int *sizes)
 
const JObjectgetValue (const FKeyType &key) const
 
JObjectgetValue (const FKeyType &key)
 
virtual unsigned int getSize (void) const
 
virtual const JVector< JObject > & getKeys (void) const
 
void remove (const FKeyType &key)
 
virtual void removeAt (unsigned int index)
 
bool contains (const FKeyType &key) const
 
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
 
- 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
 
- 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)
 

Detailed Description

The JHashtable class together with the Dictionary class template is one of the two main container classes for objects to be transmitted over Photon when using the C++ Client.

This class implements the well-known concept of a container structure storing an arbitrary number of key/value-pairs.

In contrast to a Dictionary, the types of both the keys and also the values in a JHashtable can differ for every entry. This adds flexibility, but it also reduces type safety and means, that the type infos have to be stored twice (once for the key and once for the value) per entry in a JHashtable, while in a Dictionary it only has to be stored twice for the whole Dictionary, no matter how many entries are in there. Therefor with Dictionaries transferring the same amount of key-value pairs will cause less traffic than with Hashtables.

Please have a look at the Table of Datatypes for a list of types, that are supported as keys and as values.

Please refer to the documentation for put() and getValue() to see how to store and access data in a JHashtable.

See also
put(), getValue(), KeyObject, ValueObject, Dictionary