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

Public Member Functions

 JHashSet (unsigned int initialCapacity=0, unsigned int capacityIncrement=1)
 
 JHashSet (const Etype *carray, unsigned int elementCount, unsigned int initialCapacity=0, unsigned int capacityIncrement=1)
 
virtual ~JHashSet (void)
 
 JHashSet (const JHashSet< Etype > &toCopy)
 
template<template< typename > class FT>
 JHashSet (const SequenceContainer< FT, Etype > &toCopy)
 
virtual JHashSet< Etype > & operator= (const SequenceContainer< Common::JHashSet, Etype > &toCopy)
 
template<template< typename > class FT>
JHashSet< Etype > & operator= (const SequenceContainer< FT, Etype > &toCopy)
 
virtual JHashSet< Etype > & operator= (const JHashSet< Etype > &rhv)
 
- Public Member Functions inherited from SequenceContainer< JHashSet, Etype >
virtual ~SequenceContainer (void)=0
 
SequenceContainer< JHashSet, Etype > & operator= (const SequenceContainer< JHashSet, Etype > &toCopy)
 
SequenceContainer< JHashSet, Etype > & operator= (const SequenceContainer< FT, Etype > &toCopy)
 
bool operator== (const SequenceContainer< JHashSet, Etype > &toCompare) const
 
bool operator!= (const SequenceContainer< JHashSet, Etype > &toCompare) const
 
const Etype & operator[] (unsigned int index) const
 
const Etype & operator[] (int index) const
 
Etype & operator[] (unsigned int index)
 
Etype & operator[] (int index)
 
unsigned int getCapacity (void) const
 
bool contains (const Etype &elem) const
 
const Etype & getFirstElement (void) const
 
int getIndexOf (const Etype &elem) const
 
bool getIsEmpty (void) const
 
const Etype & getLastElement (void) const
 
int getLastIndexOf (const Etype &elem) const
 
unsigned int getSize (void) const
 
const Etype * getCArray (void) const
 
void copyInto (Etype *array) const
 
void addElement (const Etype &obj)
 
void addElements (const Etype *carray, unsigned int elementCount)
 
void addElements (const SequenceContainer< FT, Etype > &container)
 
void ensureCapacity (unsigned int minCapacity)
 
void removeAllElements (void)
 
bool removeElement (const Etype &obj)
 
void trimToSize (void)
 
const Etype & getElementAt (unsigned int index) const
 
void insertElementAt (const Etype &obj, unsigned int index)
 
void removeElementAt (unsigned int index)
 
void setElementAt (const Etype &obj, unsigned int index)
 
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
 

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

◆ JHashSet() [1/4]

JHashSet ( unsigned int  initialCapacity = 0,
unsigned int  capacityIncrement = 1 
)

Constructor.

Creates an empty container instance of elements of the type of the template parameter.

Parameters
initialCapacitythe amount of elements, the container instance can take without need for resize. If you choose this too small, the container instance needs expensive resizes later (it's most likely, that the complete memory has to be copied to a new location on resize), if you choose it too big, you will waste much memory. The default is 0.
capacityIncrementEvery time, when one adds an element to the Vector and it has no capacity left anymore, it's capacity will grow with this amount of elements on automatic resize. If you pass a too small value here, expensive resizes will be needed more often, if you choose a too big one, possibly memory is wasted. The default is 1.

◆ JHashSet() [2/4]

JHashSet ( const Etype *  carray,
unsigned int  elementCount,
unsigned int  initialCapacity = 0,
unsigned int  capacityIncrement = 1 
)

Constructor.

Creates a container instance, initialized with the passed carray of elements of the type of the template parameter.

Parameters
carrayall elements of this array up to elementCount will get copied into the constructed instance
elementCountshall not be greater than the actual element count of carray or undefined behavior will occur
initialCapacitythe amount of elements, the container instance can take without need for resize. Defaults to the value that gets passed for elementCount. If you choose this too small, the container instance needs expensive resizes later (it's most likely, that the complete memory has to be copied to a new location on resize), if you choose it too big, you will waste much memory.
capacityIncrementEvery time, when one adds an element to the container and it has no capacity left anymore, it's capacity will grow with this amount of elements on automatic resize. If you pass a too small value here, expensive resizes will be needed more often, if you choose a too big one, possibly memory is wasted. The default is 1.

◆ ~JHashSet()

~JHashSet ( void  )
virtual

Destructor.

◆ JHashSet() [3/4]

JHashSet ( const JHashSet< Etype > &  toCopy)

Copy-Constructor.

Creates an object out of a deep copy of its parameter.

Parameters
toCopyThe object to copy.

◆ JHashSet() [4/4]

JHashSet ( const SequenceContainer< FT, Etype > &  toCopy)

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

Member Function Documentation

◆ operator=() [1/3]

JHashSet< Etype > & operator= ( const SequenceContainer< Common::JHashSet< Etype >, Etype > &  toCopy)
virtual

operator=.

Makes a deep copy of its right operand into its left operand.

This overwrites old data in the left operand.

◆ operator=() [2/3]

JHashSet< Etype > & operator= ( const SequenceContainer< FT, Etype > &  toCopy)

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

◆ operator=() [3/3]

JHashSet< Etype > & operator= ( const JHashSet< Etype > &  toCopy)
virtual

operator=.

Makes a deep copy of its right operand into its left operand.

This overwrites old data in the left operand.