#include <bgcontainer.h>
Class diagram for BGArray:
Public Members | |||
![]() | ![]() | BGArray ( ) | |
![]() | ![]() | Standard constructor of list. | |
![]() | ![]() | BGArray ( long initialSize ) | |
![]() | ![]() | Constructor of lis. More... | |
![]() | ![]() | virtual | ~BGArray ( ) |
![]() | ![]() | Destructor. | |
![]() | ![]() | virtual BGString | toString ( ) |
![]() | ![]() | Generates string representation of this object. More... | |
![]() | ![]() | virtual unsigned long | hash ( ) |
![]() | ![]() | Generates a 'unique' hashvalue of this object. More... | |
![]() | ![]() | virtual bool | equals ( BGObject &obj ) |
![]() | ![]() | Returns true, if specified object is equal to own instance. More... | |
![]() | ![]() | virtual BGString | className ( ) |
![]() | ![]() | Return the class name for this class. More... | |
![]() | ![]() | long | length ( ) const |
![]() | ![]() | void | ensure ( long neededSize ) |
![]() | ![]() | Ensure specified count of places. | |
![]() | ![]() | BGArray& | add ( BGObject *newObject ) |
![]() | ![]() | Adds new element to list. | |
![]() | ![]() | BGArray& | set ( BGObject *newObject, long i ) |
![]() | ![]() | Set specified list element and probably free existing element at this place. | |
![]() | ![]() | BGObject* | get ( long i ) |
![]() | ![]() | Returns specified element at position. More... | |
Protected Members | |||
![]() | ![]() | void | realloc ( long plusSize = REALLOCSIZE ) |
![]() | ![]() | Reallocates string to actual size + plusSize. More... |
Similar to BGString behaviour.
BGArray::BGArray (long initialSize) |
Constructor of lis.
initialSize | Reserves specified places |
virtual BGString BGArray::toString () [virtual]
|
Generates string representation of this object.
This is useful for logging, etc. - This method will replace dump !
Reimplemented from BGObject.
virtual unsigned long BGArray::hash () [virtual]
|
Generates a 'unique' hashvalue of this object.
Note: The returned pointer will point to class buffer. Therefore do not delete it, dupe it if you need it outside of instance lifecycle.
Reimplemented from BGObject.
virtual bool BGArray::equals (BGObject & obj) [virtual]
|
Returns true, if specified object is equal to own instance.
First we compare class identifier. If both object has same class type, we dispatch to compare method, which should always be able to compare instances with same type.
obj | Object reference to compare with us |
Reimplemented from BGObject.
virtual BGString BGArray::className () [virtual]
|
Return the class name for this class.
Subclasses should overwrite this method to return their own name.
Reimplemented from BGObject.
long BGArray::length () const [inline, virtual]
|
BGObject * BGArray::get (long i) [virtual]
|
Returns specified element at position.
Reimplemented from BGEnumeratable.
void BGArray::realloc (long plusSize = REALLOCSIZE) [protected]
|
Reallocates string to actual size + plusSize.
plusSize | Additional space needed |