Photon C++ Client API
5.0.7.3
|
Public Member Functions | |
JArray (unsigned int initialCapacity=0, unsigned int capacityIncrement=1) | |
JArray (const Etype *carray, unsigned int elementCount, unsigned int initialCapacity=0, unsigned int capacityIncrement=1) | |
virtual | ~JArray (void) |
JArray (const JArray< Etype > &toCopy) | |
template<template< typename > class FT> | |
JArray (const SequenceContainer< FT, Etype > &toCopy) | |
virtual JArray< Etype > & | operator= (const SequenceContainer< Common::JArray, Etype > &toCopy) |
template<template< typename > class FT> | |
JArray< Etype > & | operator= (const SequenceContainer< FT, Etype > &toCopy) |
virtual JArray< Etype > & | operator= (const JArray< Etype > &rhv) |
Public Member Functions inherited from SequenceContainer< JArray, Etype > | |
virtual | ~SequenceContainer (void)=0 |
SequenceContainer< JArray, Etype > & | operator= (const SequenceContainer< JArray, Etype > &toCopy) |
SequenceContainer< JArray, Etype > & | operator= (const SequenceContainer< FT, Etype > &toCopy) |
bool | operator== (const SequenceContainer< JArray, Etype > &toCompare) const |
bool | operator!= (const SequenceContainer< JArray, 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 JString & | toString (JString &retStr, bool withTypes=false) const |
virtual JString & | toString (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 LogFormatOptions & | getLogFormatOptions (void) |
static void | setLogFormatOptions (const LogFormatOptions &options) |
JArray | ( | unsigned int | initialCapacity = 0 , |
unsigned int | capacityIncrement = 1 |
||
) |
Constructor.
Creates an empty container instance of elements of the type of the template parameter.
initialCapacity | the 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. |
capacityIncrement | Every 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. |
JArray | ( | 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.
carray | all elements of this array up to elementCount will get copied into the constructed instance |
elementCount | shall not be greater than the actual element count of carray or undefined behavior will occur |
initialCapacity | the 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. |
capacityIncrement | Every 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. |
|
virtual |
Destructor.
Copy-Constructor.
Creates an object out of a deep copy of its parameter.
toCopy | The object to copy. |
JArray | ( | 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.
|
virtual |
operator=.
Makes a deep copy of its right operand into its left operand.
This overwrites old data in the left operand.
JArray< 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.