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

Public Member Functions

 JQueue (unsigned int initialCapacity=0, unsigned int capacityIncrement=1)
 
 JQueue (const Etype *carray, unsigned int elementCount, unsigned int initialCapacity=0, unsigned int capacityIncrement=1)
 
virtual ~JQueue (void)
 
 JQueue (const JQueue< Etype > &toCopy)
 
template<template< typename > class FT>
 JQueue (const SequenceContainer< FT, Etype > &toCopy)
 
virtual JQueue< Etype > & operator= (const SequenceContainer< Common::JQueue, Etype > &toCopy)
 
template<template< typename > class FT>
JQueue< Etype > & operator= (const SequenceContainer< FT, Etype > &toCopy)
 
virtual JQueue< Etype > & operator= (const JQueue< Etype > &rhv)
 
void enqueue (const Etype &element)
 
Etype dequeue (void)
 
const Etype & peek (void) const
 
- Public Member Functions inherited from SequenceContainer< JQueue, Etype >
virtual ~SequenceContainer (void)=0
 
SequenceContainer< JQueue, Etype > & operator= (const SequenceContainer< JQueue, Etype > &toCopy)
 
SequenceContainer< JQueue, Etype > & operator= (const SequenceContainer< FT, Etype > &toCopy)
 
bool operator== (const SequenceContainer< JQueue, Etype > &toCompare) const
 
bool operator!= (const SequenceContainer< JQueue, 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

◆ JQueue() [1/4]

JQueue ( 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.

◆ JQueue() [2/4]

JQueue ( 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.

◆ ~JQueue()

~JQueue ( void  )
virtual

Destructor.

◆ JQueue() [3/4]

JQueue ( const JQueue< Etype > &  toCopy)

Copy-Constructor.

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

Parameters
toCopyThe object to copy.

◆ JQueue() [4/4]

JQueue ( 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]

JQueue< Etype > & operator= ( const SequenceContainer< Common::JQueue< 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]

JQueue< 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]

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

operator=.

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

This overwrites old data in the left operand.