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

Public Member Functions

 JDictionary (const JDictionary< EKeyType, EValueType > &toCopy)
 
template<template< typename, typename > class FT>
 JDictionary (const GenericAssociativeContainer< FT, EKeyType, EValueType > &toCopy)
 
virtual JDictionary< EKeyType, EValueType > & operator= (const GenericAssociativeContainer< Common::JDictionary, EKeyType, EValueType > &toCopy)
 
template<template< typename, typename > class FT>
JDictionary< EKeyType, EValueType > & operator= (const GenericAssociativeContainer< FT, EKeyType, EValueType > &toCopy)
 
virtual JDictionary< EKeyType, EValueType > & operator= (const JDictionary< EKeyType, EValueType > &toCopy)
 
- Public Member Functions inherited from GenericAssociativeContainer< JDictionary, EKeyType, EValueType >
virtual ~GenericAssociativeContainer (void)=0
 
GenericAssociativeContainer< JDictionary, EKeyType, EValueType > & operator= (const GenericAssociativeContainer< FT, EKeyType, EValueType > &toCopy)
 
virtual bool operator== (const JDictionary< EKeyType, EValueType > &toCompare) const
 
virtual bool operator!= (const JDictionary< 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 JDictionary< EKeyType, EValueType > &src)
 
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< JDictionary< 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)
 

Detailed Description

template<typename EKeyType, typename EValueType>
class ExitGames::Common::JDictionary< EKeyType, EValueType >

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

In contrast to a JHashtable, the types of both the keys and also the values in a JDictionary have to be the same for all entries. This takes flexibility, but it also improves type safety and means, that the type infos only have to be stored twice for the whole JDictionary (once for the key and once for the value), while in a Hashtable they have to be stored twice per entry. Therefor with JDictionaries storing the same amount of key-value pairs will cause less memory than with JHashtables.

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

See also
put(), getValue(), JHashtable

Member Function Documentation

◆ operator=()

JDictionary< EKeyType, EValueType > & operator= ( const GenericAssociativeContainer< Common::JDictionary< EKeyType, EValueType >, EKeyType, EValueType > &  toCopy)
virtual

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

Reimplemented from GenericAssociativeContainer< JDictionary, EKeyType, EValueType >.