Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

corelinux::Array Class Reference

Array defines a sequencial collection of entites. More...

#include <Array.hpp>

Inheritance diagram for corelinux::Array:

corelinux::Collection corelinux::Synchronized corelinux::FrameworkEntity corelinux::SetCollection List of all members.

Public Methods

virtual MetaTypeCptr getType ( void ) const
 get the type. More...

VoidPtr operator new (size_t aSize)
 redefine the operator new[]
  • aSize.
More...


void operator delete (VoidPtr aVoidPtr)
 redefine the operator delete[]
  • aVoidPtr the pointer to delete.


 Array ( void )
 All derivations require a public default constructor for instantiation via the class factory (MetaType).

 Array ( ArrayCref )
 Copy constructor.

virtual ~Array ( void )
 Virtual destructor.

bool operator== ( ArrayCref ) const
 Equality operator.

virtual Counter getSize ( void ) const
 Fetch the current size (# of entities) of the array.

virtual bool isEmpty ( void ) const
 Determines.

FrameworkEntityPtr operator[] ( ElementIndex ) const throw (BoundsException)
 Fetch entity at ElementIndex.

virtual ElementIndex indexOf ( FrameworkEntityCptr ) const throw (NullPointerException)
 Fetch the index ( >= 0 else -1 ).

virtual FrameworkEntityPtr getElementAt ( ElementIndex ) const throw (BoundsException)
 Fetch entity at ElementIndex.

MetaClassPtr getElementClassAt ( ElementIndex ) const throw (BoundsException)
 Fetch entity class ElementIndex.

virtual bool containsElement ( FrameworkEntityPtr ) const throw (NullPointerException)
 Does the entity exist in the collection.

virtual bool containsType ( MetaClassPtr ) const throw (NullPointerException)
 Does the type exist in the collection.

ArrayRef operator+= ( FrameworkEntityPtr ) throw (NullPointerException,BoundsException)
 Entity put operator.

ArrayRef operator= ( ArrayCref )
 Assignment (replace).

ArrayRef operator= ( ArrayCptr ) throw (NullPointerException)
 Assignment (replace).

ArrayRef operator+= ( ArrayCref ) throw (BoundsException)
 Copy (append).

ArrayRef operator+= ( ArrayCptr ) throw (NullPointerException, BoundsException)
 Copy (append).

virtual void put ( FrameworkEntityPtr ) throw (NullPointerException, BoundsException)
 Add to end (putBack).

virtual void putFront ( FrameworkEntityPtr ) throw (NullPointerException, BoundsException)
 Add to front of array, shifting all back one.

virtual void putBack ( FrameworkEntityPtr ) throw (NullPointerException, BoundsException)
 Add to end.

virtual void putAt ( ElementIndex, FrameworkEntityPtr ) throw (NullPointerException, BoundsException)
 Add at point, shifting others back one.

virtual void addAll ( CollectionCref ) throw (BoundsException,IncompatibleClassException)
 Add all the elements from the inbound collection.

virtual void addAll ( ElementIndex, CollectionCref ) throw (BoundsException,IncompatibleClassException)
 Add all the elements from the inbound collection at a offset.

virtual FrameworkEntityPtr remove ( FrameworkEntityPtr ) throw (NullPointerException)
 Remove the specified entity from the array.

FrameworkEntityPtr removeAt ( ElementIndex ) throw (BoundsException)
 Remove at ElementIndex.

FrameworkEntityPtr removeAtFront ( void )
 Remove first entity in array.

FrameworkEntityPtr removeAtEnd ( void )
 Remove last entity in array.

void removeAll ( void )
 Remove all entries.

 DECLARE_INSTANCEDATA ( Integer, SizeRestriction )
 Semantic for bounding array.


Static Public Methods

MetaTypeCptr getTypeDescriptor ( void )
 get the type descriptor. More...

 ArrayPtr ( void )
 1 a new instance of Array. More...

 void ( ArrayPtr aPointer )
 1 a point of Array


Protected Methods

bool checkForMember ( FrameworkEntityCptr ) const
 Checks to see if entity in collection.

ElementIndex getMemberIndex ( FrameworkEntityCptr ) const
 Get ElementIndex for specific member.

FrameworkEntity** getArray ( void ) const
 Retrieve the array representation.

void increaseOccupancy ( Counter additions = 1 )
 Adjusts occupancy up.

void decreaseOccupancy ( Counter removals = 1 )
 Adjusts occupancy down.

bool checkBoundsForAdd ( Counter increment = 1 )
 Confirms ability to grow, or available room.

void increaseArraySize ( Counter increment = 1 )
 Grows and copies elements.

void shiftForInsert ( ElementIndex position, Count increment=1 )
 Shifts array for indexed inserts.

void shiftForRemove ( ElementIndex position, Count increment=1 )
 Shifts array for indexed removals.

void copyOverFromArray ( ElementIndex, FrameworkEntity **, CountCref )
 Array copy into.


Detailed Description

Array defines a sequencial collection of entites.

Arrays can be bounded (won't grow) or unbounded (will grow)


Constructor & Destructor Documentation

corelinux::Array::Array ( void )
 

All derivations require a public default constructor for instantiation via the class factory (MetaType).

corelinux::Array::Array ( ArrayCref anArrayRef )
 

Copy constructor.

corelinux::Array::~Array ( void ) [virtual]
 

Virtual destructor.


Member Function Documentation

corelinux::Array::ArrayPtr ( void ) [static]
 

1 a new instance of Array.

Returns:
a pointer to Array

corelinux::Array::DECLARE_INSTANCEDATA ( Integer,
SizeRestriction )
 

Semantic for bounding array.

void corelinux::Array::addAll ( ElementIndex offset,
CollectionCref aCollection ) throw (BoundsException,IncompatibleClassException) [virtual]
 

Add all the elements from the inbound collection at a offset.

Reimplemented from corelinux::Collection.

void corelinux::Array::addAll ( CollectionCref aCollection ) throw (BoundsException,IncompatibleClassException) [virtual]
 

Add all the elements from the inbound collection.

Reimplemented from corelinux::Collection.

Reimplemented in corelinux::SetCollection.

bool corelinux::Array::checkBoundsForAdd ( Counter increment = 1 ) [protected]
 

Confirms ability to grow, or available room.

bool corelinux::Array::checkForMember ( FrameworkEntityCptr aPtr ) const [protected]
 

Checks to see if entity in collection.

bool corelinux::Array::containsElement ( FrameworkEntityPtr aPtr ) const throw (NullPointerException) [virtual]
 

Does the entity exist in the collection.

Reimplemented from corelinux::Collection.

bool corelinux::Array::containsType ( MetaClassPtr aPtr ) const throw (NullPointerException) [virtual]
 

Does the type exist in the collection.

Reimplemented from corelinux::Collection.

void corelinux::Array::copyOverFromArray ( ElementIndex startPos,
FrameworkEntity ** aSrc,
CountCref maxCount ) [protected]
 

Array copy into.

void corelinux::Array::decreaseOccupancy ( Counter removals = 1 ) [protected]
 

Adjusts occupancy down.

FrameworkEntity ** corelinux::Array::getArray ( void ) const [protected]
 

Retrieve the array representation.

FrameworkEntityPtr corelinux::Array::getElementAt ( ElementIndex offset ) const throw (BoundsException) [virtual]
 

Fetch entity at ElementIndex.

Reimplemented from corelinux::Collection.

MetaClassPtr corelinux::Array::getElementClassAt ( ElementIndex offset ) const throw (BoundsException)
 

Fetch entity class ElementIndex.

ElementIndex corelinux::Array::getMemberIndex ( FrameworkEntityCptr aPtr ) const [protected]
 

Get ElementIndex for specific member.

Counter corelinux::Array::getSize ( void ) const [virtual]
 

Fetch the current size (# of entities) of the array.

Reimplemented from corelinux::Collection.

MetaTypeCptr corelinux::Array::getType ( void ) const [virtual]
 

get the type.

Returns:
a const pointer to the MetaType

Reimplemented from corelinux::Collection.

Reimplemented in corelinux::SetCollection.

MetaTypeCptr corelinux::Array::getTypeDescriptor ( void ) [static]
 

get the type descriptor.

Returns:
a const pointer to the MetaType

Reimplemented from corelinux::Collection.

Reimplemented in corelinux::SetCollection.

void corelinux::Array::increaseArraySize ( Counter increment = 1 ) [protected]
 

Grows and copies elements.

void corelinux::Array::increaseOccupancy ( Counter additions = 1 ) [protected]
 

Adjusts occupancy up.

ElementIndex corelinux::Array::indexOf ( FrameworkEntityCptr aPtr ) const throw (NullPointerException) [virtual]
 

Fetch the index ( >= 0 else -1 ).

Reimplemented from corelinux::Collection.

bool corelinux::Array::isEmpty ( void ) const [virtual]
 

Determines.

Reimplemented from corelinux::Collection.

void corelinux::Array::operator delete ( VoidPtr aVoidPtr )
 

redefine the operator delete[]

  • aVoidPtr the pointer to delete.

Reimplemented from corelinux::Collection.

Reimplemented in corelinux::SetCollection.

VoidPtr corelinux::Array::operator new ( size_t aSize )
 

redefine the operator new[]

  • aSize.

Returns:
a VoidPtr

Reimplemented from corelinux::Collection.

Reimplemented in corelinux::SetCollection.

ArrayRef corelinux::Array::operator+= ( ArrayCptr aPtr ) throw (NullPointerException, BoundsException)
 

Copy (append).

Reimplemented in corelinux::SetCollection.

ArrayRef corelinux::Array::operator+= ( ArrayCref aRef ) throw (BoundsException)
 

Copy (append).

Reimplemented in corelinux::SetCollection.

ArrayRef corelinux::Array::operator+= ( FrameworkEntityPtr aPtr ) throw (NullPointerException,BoundsException)
 

Entity put operator.

Reimplemented in corelinux::SetCollection.

ArrayRef corelinux::Array::operator= ( ArrayCptr aPtr ) throw (NullPointerException)
 

Assignment (replace).

Reimplemented in corelinux::SetCollection.

ArrayRef corelinux::Array::operator= ( ArrayCref aRef )
 

Assignment (replace).

Reimplemented in corelinux::SetCollection.

bool corelinux::Array::operator== ( ArrayCref aArray ) const
 

Equality operator.

FrameworkEntityPtr corelinux::Array::operator[] ( ElementIndex offset ) const throw (BoundsException)
 

Fetch entity at ElementIndex.

void corelinux::Array::put ( FrameworkEntityPtr aPtr ) throw (NullPointerException, BoundsException) [virtual]
 

Add to end (putBack).

Reimplemented from corelinux::Collection.

Reimplemented in corelinux::SetCollection.

void corelinux::Array::putAt ( ElementIndex offset,
FrameworkEntityPtr anEntity ) throw (NullPointerException, BoundsException) [virtual]
 

Add at point, shifting others back one.

void corelinux::Array::putBack ( FrameworkEntityPtr aPtr ) throw (NullPointerException, BoundsException) [virtual]
 

Add to end.

Reimplemented in corelinux::SetCollection.

void corelinux::Array::putFront ( FrameworkEntityPtr aPtr ) throw (NullPointerException, BoundsException) [virtual]
 

Add to front of array, shifting all back one.

Reimplemented in corelinux::SetCollection.

FrameworkEntityPtr corelinux::Array::remove ( FrameworkEntityPtr aPtr ) throw (NullPointerException) [virtual]
 

Remove the specified entity from the array.

Reimplemented from corelinux::Collection.

void corelinux::Array::removeAll ( void )
 

Remove all entries.

FrameworkEntityPtr corelinux::Array::removeAt ( ElementIndex offset ) throw (BoundsException)
 

Remove at ElementIndex.

FrameworkEntityPtr corelinux::Array::removeAtEnd ( void )
 

Remove last entity in array.

FrameworkEntityPtr corelinux::Array::removeAtFront ( void )
 

Remove first entity in array.

void corelinux::Array::shiftForInsert ( ElementIndex position,
Count increment = 1 ) [protected]
 

Shifts array for indexed inserts.

void corelinux::Array::shiftForRemove ( ElementIndex position,
Count increment = 1 ) [protected]
 

Shifts array for indexed removals.

corelinux::Array::void ( ArrayPtr aPointer ) [static]
 

1 a point of Array


The documentation for this class was generated from the following files:
This is the CoreLinux++ Framework reference manual
Provided by The CoreLinux Consortium