Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

AddressDataSequence Class Reference

List of all members.

Detailed Description

AddressDataSequence is a container class for AddressData objects.

See also:
AddressData


Public Member Functions

 AddressDataSequence ()
 Default constructor.
 AddressDataSequence (int initialCapacity)
 Constructor that takes an initial capacity.
 AddressDataSequence (const AddressDataSequence &other)
 Copy constructor.
 ~AddressDataSequence ()
 Destructor.
AddressDataSequenceoperator= (const AddressDataSequence &other)
 Assignment operator.
unsigned NumElements () const
 Gets the number of AddressData objects in the container.
void InsertElement (unsigned pos, AddressData *element)
 Inserts an AddressData object at the specified position.
void AppendElement (AddressData *element)
 Appends an AddressData object.
AddressDataRemoveElement (unsigned index)
 Removes an AddressData object from the collection.
AddressDataElementAt (unsigned index) const
 Gets the AddressData object at the specified position.
void DeleteAll ()
 Removes and deletes all objects from the collection.
void ImportData (ListItem *root)
 Called by the parser to set the data for this object.


Constructor & Destructor Documentation

AddressDataSequence  ) 
 

Default constructor.

AddressDataSequence int  initialCapacity  ) 
 

Constructor that takes an initial capacity.

If you know beforehand how many AddressData objects you will add to the collection, you may add them more efficiently if you create the AddressDataSequence object with sufficient capacity. You may use this constructor to specify the capacity when you create the AddressDataSequence.

It is always safe to add additional AddressData objects, even if the initial capcity is too small, because the library increases the capacity dynamically.

Parameters:
initialCapacity initial capacity of the collection

AddressDataSequence const AddressDataSequence other  ) 
 

Copy constructor.

Parameters:
other AddressDataSequence object to copy

~AddressDataSequence  ) 
 

Destructor.


Member Function Documentation

void AppendElement AddressData element  ) 
 

Appends an AddressData object.

Parameters:
element AddressData object to append

void DeleteAll  ) 
 

Removes and deletes all AddressData objects from the collection.

AddressData * ElementAt unsigned  index  )  const
 

Gets the AddressData object at the specified position.

The index parameter must satisfy index < NumElements().

Parameters:
index position of object to return (0 = first object)
Returns:
the AddressData object

void ImportData ListItem *  root  ) 
 

Called by the parser to set the data for this object.

Only the parser should call this function.

Parameters:
root root item in the parsed tree

void InsertElement unsigned  index,
AddressData element
 

Inserts an AddressData object at the specified position.

The index parameter must satisfy index <= NumElements().

Parameters:
index position to make insertion (0 = beginning)
element AddressData object to insert

unsigned NumElements  )  const
 

Gets the number of AddressData objects in the container.

Returns:
number of objects in container

AddressDataSequence & operator= const AddressDataSequence other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

AddressData * RemoveElement unsigned  index  ) 
 

Removes an AddressData object from the collection.

The index parameter must satisfy index < NumElements().

Note:
The removed object is not deleted by this function. If you have no further use for the removed AddressData object, then you must delete it to avoid a memory leak.
Parameters:
index position of object to remove (0 = first object)
Returns:
the removed object

Copyright © 2001-2005 Hunny Software, Inc. All rights reserved.