Container Classes
 =====================
Two container class libraries are provided

 * the Object container classes
 * the template-based BIDS library

The Object container library offers a gentler
learning curve and faster compilation but
slightly slower execution than the template
version.

Both the Object and BIDS versions provide
the same functional interface.

For example, the push and pop member functions
work the same for all Stack objects.

Existing code based on the Object container
classes will compile and run perfectly using
the new BIDS classes, just by linking in the
appropriate library.

  AbstractArray     
  Array             
  ArrayIterator     
  Association       
  Bag               
  BaseDate          
  BaseTime          
  Btree             
  BtreeIterator     
  Collection        
  Container         
  ContainerIterator 
  Date              
  Deque             
  Dictionary        
  DoubleList        
  DoubleListIterator
  Error             
  HashTable         
  HashTableIterator 
  List              
  ListIterator      
  MemBlocks         
  MemStack          
  Object            
  PriorityQueue     
  Queue             
  Set               
  Sortable          
  SortedArray       
  Stack             
  String            
  Time              
  Timer             
  TShouldDelete     

 See Also:
  Container Class Templates       
  Container Template Classes      
  Container Class Data Members    
  Container Class Member Functions
  Container Class Constructors    
  Container Class Destructors     


Container Class Data Members ============================== AbstractArray::Delta AbstractArray::lastElementIndex AbstractArray::lowerbound AbstractArray::upperbound Object::ZERO See Also: Container Classes Container Class Member Functions
Container Class Member Functions ================================== Add AddAt AddAtHead AddAtTail allocate ArraySize current Day decrNofKeys delete delObj destroy DestroyFromHead DestroyFromTail detach DetachFromHead DetachFromTail detachLeft findMember firstThat flush forEach free get getItemsInContainer GetLeft GetRight hashValue hasMember Hour Hundredths i_add incrNofKeys initIterator isA IsAssociation isEmpty isEqual IsLessThan IsSortable Key lastThat Lookup LowerBound Minute Month NameOf New objectAt ObjectOperator<< Operator++ Operator-- Operator= Operator[] OperatorChar* OperatorInt order ownsElements PeekAtHead PeekAtTail PeekHead PeekLeft PeekRight Pop PrintContentsOn PrintHeader PrintOn PrintSeparator PrintTrailer ptrAt ptrToRef Push put PutLeft PutRight rank reallocate removeEntry reset resolution restart Second setData SetDay SetHour SetHundredths SetMinute SetMonth SetSecond SetYear squeezeEntry start status stop time Top UpperBound Value Year See Also: Container Classes Container Class Constructors Container Class Destructors Container Class Data Members
add ===== Add is a member function in the container class library. To get Help about a specific "add" member function, choose one of the following: Array::Add Bag::add Btree::add Collection::Add Dictionary::Add DoubleList::Add HashTable::Add List::Add Set::Add SortedArray::Add
Contaier Class Constructors and Destructors ============================================= Constructors and destructors are member functions in the container class library. Both are declared in the header file of their class, or the base class of that class. They can not be inherited, but the constructor or destructor of the base class can be used. The typical syntax of a destructor is: classname::~classname(); Most destructors don't do anything special. They destroy objects of their own class. To get Help about a specific constructor or destructor, choose one of the following: AbstractArray Array ArrayIterator Association Bag BaseDate ~BaseDate BaseTime Btree BtreeIterator ~BtreeIterator ~Collection Container Date Dictionary DoubleList DoubleListIterator HashTable HashTableIterator List ListIterator Object Set SortedArray String ~String Time Timer TShouldDelete See Also: Container Classes
current ========= Current is a member function in the container class library. To get Help about a specific "current" member function, choose one of the following: ArrayIterator::current BtreeIterator::current ContainerIterator::current DoubleListIterator::current HashTableIterator::current ListIterator::current
Destroy ========= Destroy is a member function in the container class library. To get Help about a specific "destroy" member function, choose one of the following: AbstractArray::Destroy Collection::Destroy
detach ======== Detach is a member function in the container class library. To get Help about a specific "detach" member function, choose one of the following: AbstractArray::Detach Bag::detach Btree::detach Collection::Detach DoubleList::Detach HashTable::Detach List::Detach SortedArray::Detach
findMember ============ FindMember is a member function in the container class library. To get Help about a specific "findMember" member function, choose one of the following: Bag::findMember Btree::findMember Collection::FindMember HashTable::FindMember
firstThat =========== FirstThat is a member function in the container class library. To get Help about a specific "firstThat" member function, choose one of the following: Bag::firstThat Container::FirstThat Object::FirstThat
forEach ========= ForEach is a member function in the container class library. To get Help about a specific "forEach" member function, choose one of the following: Bag::forEach Container::ForEach Object::ForEach
getItemsInContainer ===================== GetItemsInContainer is a member function in the container class library. To get Help about a specific "getItemsInContainer" member function, choose one of the following: Bag::getItemsInContainer Container::getItemsInContainer Deque::getItemsInContainer PriorityQueue::GetItemsInContainer Stack::getItemsInContainer
hashValue =========== HashValue is a member function in the container class library. To get Help about a specific "hashValue" member function, choose one of the following: Association::HashValue BaseDate::HashValue BaseTime::HashValue Btree::hashValue Container::HashValue HashTable::HashValue List::HashValue Object::HashValue PriorityQueue::hashValue Sortable::HashValue String::HashValue
hasMember =========== HasMember is a member function in the container class library. To get Help about a specific "hasMember" member function, choose one of the following: Bag::hasMember Btree::hasMember Collection::HasMember PriorityQueue::hasMember
initIterator ============== InitIterator is a member function in the container class library. To get Help about a specific "initIterator" member function, choose one of the following: AbstractArray::InitIterator Bag::initIterator Btree::initIterator Container::InitIterator Deque::InitIterator DoubleList::InitIterator HashTable::InitIterator List::InitIterator PriorityQueue::initIterator Stack::initIterator
isA ===== IsA is a member function in the container class library. To get Help about a specific "isA" member function, choose one of the following: Array::IsA Association::IsA Bag::isA BaseDate::IsA BaseTime::IsA Btree::isA Container::IsA Date::IsA Deque::IsA Dictionary::IsA DoubleList::IsA Error::IsA HashTable::IsA List::IsA Object::IsA PriorityQueue::isA Queue::IsA Set::IsA Sortable::IsA SortedArray::IsA Stack::IsA String::IsA Time::IsA
isAssociation =============== IsAssociation is a member function in the container class library. To get Help about a specific "isAssociation" member function, choose one of the following: Association::IsAssociation Object::IsAssociation
isEmpty ========= IsEmpty is a member function in the container class library. To get Help about a specific "isEmpty" member function, choose one of the following: Bag::isEmpty Container::IsEmpty Deque::IsEmpty PriorityQueue::isEmpty Stack::IsEmpty
isEqual ========= IsEqual is a member function in the container class library. To get Help about a specific "isEqual" member function, choose one of the following: AbstractArray::IsEqual Association::IsEqual BaseDate::IsEqual BaseTime::IsEqual Btree::isEqual Container::IsEqual Error::IsEqual Object::IsEqual Sortable::IsEqual String::IsEqual
isLessThan ============ IsLessThan is a member function in the container class library. To get Help about a specific "isLessThan" member function, choose one of the following: BaseDate::IsLessThan BaseTime::IsLessThan Sortable::IsLessThan String::IsLessThan
isSortable ============ IsSortable is a member function in the container class library. To get Help about a specific "isSortable" member function, choose one of the following: Object::IsSortable Sortable::IsSortable
lastThat ========== LastThat is a member function in the container class library. To get Help about a specific "lastThat" member function, choose one of the following: Bag::lastThat Container::LastThat Object::LastThat
nameOf ======== NameOf is a member function in the container class library. To get Help about a specific "nameOf" member function, choose one of the following: Array::nameOf Association::nameOf Bag::nameOf BaseDate::nameOf BaseTime::nameOf Btree::nameOf Container::nameOf Date::nameOf Deque::nameOf Dictionary::nameOf DoubleList::nameOf Error::nameOf HashTable::nameOf List::nameOf Object::nameOf PriorityQueue::nameOf Queue::nameOf Set::NameOf Sortable::nameOf SortedArray::nameOf Stack::nameOf String::nameOf Time::nameOf
operator ++ ============= Operator ++ is an operator in the container class library. To get Help about a specific operator ++, choose one of the following: ArrayIterator::operator ++ DoubleListIterator::operator ++ HashTableIterator::operator ++ ListIterator::operator ++ BtreeIterator::operator ++ ContainerIterator::operator ++
operator [] ============= Operator [] is an operator in the container class library. To get Help about a specific operator [], choose one of the following: Array::operator [] SortedArray::operator [] AbstractArray::operator [] Btree::operator []
operator int ============== Operator int is an operator in the container class library. To get Help about a specific operator int, choose one of the following: ArrayIterator::Operator Int BtreeIterator::operator Int ContainerIterator::Operator Int DoubleListIterator::Operator Int HashTableIterator::Operator Int ListIterator::Operator Int
operator ownsElements ======================= OwnsElements is an member function in the container class library. To get Help about a specific "ownsElements", choose one of the following: Bag::ownsElements TShouldDelete::ownsElements
peekLeft ========== PeekLeft is a member function in the container class library. To get Help about a specific "peekLeft" member function, choose one of the following: Deque::PeekLeft PriorityQueue::peekLeft
printOn ========= PrintOn is a member function in the container class library. To get Help about a specific "printOn" member function, choose one of the following: Association::PrintOn BaseDate::printOn BaseTime::PrintOn Btree::printOn Container::PrintOn Date::printOn Error::printOn Object::printOn Sortable::printOn String::PrintOn Time::printOn
restart ========= Restart is a member function in the container class library. To get Help about a specific "restart" member function, choose one of the following: ArrayIterator::Restart BtreeIterator::restart ContainerIterator::Restart DoubleListIterator::Restart HashTableIterator::Restart ListIterator::Restart
LowerBound ============ LowerBound is the name of both a data member and a member function in the container class library. To get Help about a specific "LowerBound" data member or member function, choose one of the following: AbstractArray::lowerbound (data member) AbstractArray::LowerBound (member function)
UpperBound ============ UpperBound is both a data member and a member function in the container class library. To get Help about a specific "UpperBound" data member or member function, choose one of the following: AbstractArray::upperbound (data member) AbstractArray::UpperBound (member function)
flush ======= To get Help about a specific "flush" member function, choose one of these Help links: Bag::flush Btree::flush Container::flush Deque::flush DoubleList::flush HashTable::flush List::flush ostream::flush PriorityQueue::flush Stack::flush
get ===== To get Help about a specific "get" member function, choose one of these Help links: istream::get PriorityQueue::get Queue::Get
put ===== To get Help about a specific "put" member function, choose one of these Help links: ostream::put PriorityQueue::put Queue::Put
======================================================= AbstractArray abstract class summary (ABSTARRY.H) ======================================================= AbstractArray has random access to the elements of the collection. +-------------+ +------------+ ================= +-| Array | | Collection |---= AbstractArray =---| |-------------| +------------+ ================= +-| SortedArray | +-------------+ AbstractArray exists because the derived classes Array and SortedArray have enough in common to warrant combining the common properties into an abstract base class. Because the derived classes differ only in their implementation of add, detach, and the subscript operator, the remaining functions are encapsulated in AbstractArray. Friend To: None Has Friends: ArrayIterator Constructor: AbstractArray(int anUpper, int aLower = 0, sizeType aDelta = 0) Data Members: delta lastElementIndex lowerbound upperbound Member Functions: AbstractArray::AbstractArray AbstractArray::arraySize AbstractArray::destroy AbstractArray::detach AbstractArray::initIterator AbstractArray::isEqual AbstractArray::lowerBound AbstractArray::objectAt AbstractArray::operator [] AbstractArray::printContentsOn AbstractArray::prtAt AbstractArray::reallocate AbstractArray::removeEntry AbstractArray::setData AbstractArray::squeezeEntry AbstractArray::upperBound See Also: List of Container Class
AbstractArray::delta (protected data member) ============================================== Declaration: sizeType delta; Remarks: Represents the additional number of elements that will be assigned to the array if overflow occurs. If delta is zero, the array will not be resized following overflow. See Also: AbstractArray
AbstractArray::lastElementIndex (protected data member) ========================================================= Declaration: int lastElementIndex; Remarks: The index value of the last element added to the array. See Also: AbstractArray
AbstractArray::lowerbound (protected data member) =================================================== Declaration: int lowerbound; Remarks: The lower bound of the array index. See Also: AbstractArray
AbstractArray::upperbound (protected data member) =================================================== Declaration: int upperbound; Remarks: The current upper bound of the array index. See Also: AbstractArray
AbstractArray::AbstractArray (constructor) ============================================ Declaration: AbstractArray(int anUpper, int aLower = 0, sizeType aDelta = 0); Remarks: Constructs an array, given the upper and lower bound. If aDelta is nonzero, the run-time array overflow invokes the reallocate member function to provide more space (in increments of delta). See Also: AbstractArray
AbstractArray::arraySize (member function) ============================================ Declaration: sizeType arraySize() const; Remarks: Returns the current number of cells allocated: (upperBound - lowerBound + 1) See Also: AbstractArray
AbstractArray::detach (member functions) ========================================== Declarations: Form 1 void detach(int atIndex, DeleteType dt = NoDelete); Form 2 virtual void detach( Object& toDetach, DeleteType dt = NoDelete); See Also: AbstractArray
AbstractArray:detach, Form 1 (member function) ================================================ Declaration: void detach(int atIndex, DeleteType dt = NoDelete); Remarks: Removes the object at atIndex. The value of dt and the current ownership setting determine whether the object itself will be deleted. See Also: AbstractArray::detach AbstractArray::detach, Form 2
AbstractArray:detach, Form 2 (member function) ================================================ Declaration: virtual void detach(Object& toDetach, DeleteType dt = NoDelete); Remarks: Removes the object toDetach. The value of dt and the current ownership setting determine whether the object itself will be deleted. See Also: AbstractArray::detach AbstractArray::detach, Form 1
AbstractArray::destroy (member function) ========================================== Declaration: void destroy(int atIndex); Remarks: Removes the object at the given index. Whether the object itself is destroyed or not, depends on the array's ownership status. Destroy is implemented with detach. See Also: AbstractArray
AbstractArray::initIterator (member function) =============================================== Declaration: virtual ContainerIterator& initIterator() const; Remarks: Creates an external iterator for this array. See Also: AbstractArray ContainerIterator
AbstractArray::isEqual (member function) ========================================== Declaration: int isEqual(const Object& testObject) const; Remarks: Returns nonzero if arrays are equal (dimensions are equal and components are equal and in same order). See Also: AbstractArray
AbstractArray::lowerBound (member function) ============================================= Declaration: int lowerBound() const; Remarks: Returns the lower bound of an array. See Also: AbstractArray
AbstractArray::objectAt (protected member function) ===================================================== Declaration: Object& objectAt( int atIndex ) const; Remarks: Returns a reference to the element at the given index. See Also: AbstractArray operator []
AbstractArray::operator [] (member function) ============================================= Declaration: Object& operator []( int atIndex ) const; Remarks: Returns a reference to the object at the given array index. See Also: AbstractArray
AbstractArray::printContentsOn (member function) ================================================== Declaration: void printContentsOn(ostream& outputStream) const; Remarks: Prints an array with header and trailer, to the supplied stream. See Also: AbstractArray
AbstractArray::ptrAt (protected member function) ================================================== Declaration: Object *ptrAt( int atIndex ) const; Remarks: Returns a pointer to the element at the given index. See Also: AbstractArray
AbstractArray::reallocate (protected member function) ======================================================= Declaration: void reallocate( sizeType newSize ); Remarks: If delta is zero, reallocate gives an __EEXPANDFS error. Otherwise, reallocate tries to create a new array of size newSize. The existing array is copied to the expanded array and then deleted. Unused elements in the new array are zeroed. An __ENOMEM error is invoked if there is insuficient memory for the reallocation. See Also: AbstractArray
AbstractArray::removeEntry (protected member function) ======================================================== Declaration: void removeEntry (int loc); Remarks: Reduces the array by one element. The original element at loc is lost. See Also: AbstractArray
AbstractArray::setData (protected member function) ==================================================== Declaration: void setData(int loc, Objdect *data); Remarks: The given data replaces the existing element at the index loc. See Also: AbstractArray
AbstractArray::squeezeEntry (protected member function) ======================================================== Declaration: void squeezeEntry (int squeezePoint); Remarks: Reduces the array by one element. As for removeEntry but squeezePoint is an index relative to the lower bound. See Also: AbstractArray
AbstractArray::upperBound (member function) ============================================= Declaration: int upperBound() const; Remarks: Returns the upper bound of an array. See Also: AbstractArray
============================================ Array instance class summary (ARRAY.H) ============================================ The instance class Array is derived from AbstractArray. An Array object defines an array in which the ordering of the elements is undefined. Array adds the member functions add and addAt. +---------------+ ========= +------+ | AbstractArray |---= Array =-----| None | +---------------+ ========= +------+ Friend To: None Has Friends: None Template Class: BI_TCArrayAsVector Constructor: Array(int anUpper, int aLower = 0, sizeType aDelta = 0); Member Functions Array::add Array::addAt Array::Array Array::isA Array::nameOf See Also: Container Classes
Array::Array (constructor) ============================ Declaration: Array(int anUpper, int aLower = 0, sizeType aDelta = 0) Remarks: Constructs and "zeros" an array, calling the base AbstractArray constructor. See Also: Array
Array::add (member function) ============================== Declaration: virtual void add(Object& toAdd); Remarks: Adds an object at the next available spot at the end of an array. Adding an element beyond the upper bound leads to an overflow condition. If overflow occurs and delta is nonzero, the array is expanded (by sufficient multiples of delta bytes) to accommodate the addition. If delta is zero, overflow gives an error. See Also: Array
Array::addAt (member function) ================================ Declaration: void addAt(Object&, int) Remarks: Replaces the object at a specified array position. See Also: Array
Array::isA (member function) ============================== Declaration: virtual classType isA() Remarks: Returns the Array type ID. See Also: Array
Array::nameOf (member function) ================================= Declaration: virtual char *nameOf() Remarks: Returns the Array type ID string. See Also: Array
Array::operator [] (member function) ===================================== Declaration: Object& operator [](int) Remarks: Returns a reference to the object at a specified location in an array. See Also: Array
======================================================== ArrayIterator instance class summary (ABSTARRY.H) ======================================================== Provides functions to traverse through objects of the AbstractArray class hierarchy. Intended mainly for use by AbstractArray and its derived classes. +-------------------+ ================= +------+ | ContainerIterator |---= ArrayIterator =-----| None | +-------------------+ ================= +------+ Friend To: AbstractArray Has Friends: None Constructor: ArrayIterator( const AbstractArray& toIterate ); Member Functions: ArrayIterator::current ArrayIterator::operator int ArrayIterator::operator ++ ArrayIterator::restart See Also: Container Classes
ArrayIterator::ArrayIterator (constructor) ============================================ Declaration: ArrayIterator(const AbstractArray& toIterate); Remarks: Creates an iterator object for the given array. See Also: ArrayIterator
ArrayIterator::operator int (member function) =============================================== Declaration: virtual operator int(); Remarks: Conversion operator to test for end of iterator position. See Also: ArrayIterator
ArrayIterator::current (member function) ========================================== Declaration: virtual Object& current(); Remarks: Returns a reference to the current object in the Array pointed to by the iterator. If the current index doesn't refer to a valid object, NOOBJECT is returned. See Also: ArrayIterator
ArrayIterator::operator ++ (member function) ============================================== Declaration: virtual Object& operator ++(); virtual Object& operator ++(int); Remarks: Advances the iterator one position in the container. The first version returns the object referred to before incrementing; the second version returns the object referred to after incrementing. The int argument is a dummy used to distinguish the two operators. See Also: ArrayIterator
ArrayIterator::restart (member function) ========================================== Declaration: virtual void restart(); Remarks: Causes the iterator to point to the first nonempty object in the Array. See Also: ArrayIterator
================================================ Association class summary (instance class) ================================================ Association provides a logical grouping for a key and a value. +--------+ =============== +------+ | Object |---= Association =-----| None | +--------+ =============== +------+ Like the abstract class Sortable, Association is another example of a class of objects which are used as members of another object (in this case, a Dictionary class object). Friend To: None Has Friends: None Constructor: Association(Object& key, Object& value); Association(const Association& a); Member Functions: Association::Association Association::hashValue Association::isA Association::isAssociation Association::isEqual Association::key Association::nameOf Association::printOn Association::value
Association::Assocation (constructors) ======================================== Declarations: Form 1 Association(Object& key, Object& value); Form 2 Association(const Association& a); See Also: Association
Association::Assocation (public constructor) ============================================== Declaration: Association(Object& key, Object& value); Remarks: Constructs an association from a key object and a value object. See Also: Association constructors Association constructor, Form 2
Association::Assocation (public constructor) ============================================== Declaration: Association(const Association& a); Remarks: Copy constructor. See Also: Association constructors Association constructor, Form 1
Association:hashValue (member function) ========================================= Declaration: virtual hashValueType hashValue() const; Remarks: Returns a hash value for an association. See Also: Association HashTable::hashValue
Association::isA (member function) ==================================== Declaration: virtual classType isA() const; Remarks: Returns the Association type ID. See Also: Association
Association::isAssociation (member function) ============================================== Declaration: virtual int isAssociation() const; Remarks: Returns 1 (true). See Also: Association
Association::isEqual (member function) ======================================== Declaration: virtual int isEqual(const Object& toObject) const; Returns 1 (true) if two associations are equal (they have the same key and value, respectively); otherwise returns 0. See Also: Association
Association::key (member function) ==================================== Declaration: Object& key() const; Remarks: Returns the key object of an association. See Also: Association
Association::nameOf (member function) ======================================= Declaration: virtual char *nameOf() const; Remarks: Returns the Association type ID string. See Also: Association
Association::printOn (member function) ======================================== Declaration: virtual void printOn(ostream&) Remarks: Prints an association on the supplied stream. printOn is really for internal use by the overloaded operator <<. See Also: Association
Association::value (member function) ====================================== Declaration: Object& value() const; Remarks: Returns the value object of an association. See Also: Association
======================================== Bag abstract class summary (BAG.H) ======================================== A Bag is an unordered collection that may contain more than one of the same object. ======= +-----+ = Bag =-----| Set | ======= +-----+ Friend To: None Has Friends: None Template Class: BI_TCBagAsVector Constructor: Bag(sizeType bagSize=DEFAULT_BAG_SIZE); Member Functions: Bag::add Bag::detach Bag::findMember Bag::firstThat Bag::flush Bag::forEach Bag::getItemsInContainer Bag::hasMember Bag::initIterator Bag::isA Bag::isEmpty Bag::lastThat Bag::nameOf Bag::ownsElements See Also: Container Classes
Bag::Bag (public constructor) =============================== Declaration: Bag( sizeType bagSize = DEFAULT_BAG_SIZE ); Remarks: Constructs an empty bag. bagSize represents the initial number of slots allocated. See Also: Bag
Bag::add (public member function) =================================== Declaration: virtual void add(Object& toAdd); Remarks: Adds the given object at the next available index at the end of an array. Adding an element beyond the upper bound leads to an overflow condition. If delta is zero, overflow gives an error. See Also: Bag
Bag::detach (public member function) ====================================== Declaration: virtual void detach( Object& toDetach, DeleteType dt = NoDelete ); Remarks: Removes the object toDetach. The value of dt and the current ownership setting determine whether the object itself will be deleted. The default value of dt, NoDelete, means that the object will not be deleted regardless of ownership. See Also: Bag
Bag::findMember (public member function) ========================================== Declaration: virtual Object& findMember( Object& toFind ) const; Remarks: Returns the given object if found, otherwise returns NOOBJECT. See Also: Bag
Bag::firstThat (public member function) ========================================= Declaration: virtual Object& firstThat(condFuncType testFuncPtr, void *paramList) const; Remarks: Returns a reference to the first object in the container that satisfies a given condition. You supply a testFuncPtr that returns true for a certain condition. You can pass arbitrary arguments via the paramList argument. NOOBJECT is returned if no object in the container meets the condition. See Also: Bag
Bag::flush (public member function) ===================================== Declaration: void flush( DeleteType dt = DefDelete ); Remarks: Removes all the elements from the bag without destroying the bag. The value of dt determines whether the elements themselves are destroyed. By default, the ownership status of the bag determines their fate. See Also: Bag
Bag::forEach (public member function) ======================================= Declaration: void forEach( void ( *actionFuncPtr)(Object& o, void *), void *args ); Remarks: forEach creates an internal iterator to execute the given action function for each element in the container. See Also: Bag
Bag::getItemsInContainer (public member function) =================================================== Declaration: countType getItemsInContainer() const; Remarks: Returns the number of items in the bag. See Also: Bag
Bag::hasMember (public member function) ========================================= Declaration: virtual int hasMember( const Object& obj ) const; Remarks: Returns 1 if the given object is found in the bag. See Also: Bag
Bag::initIterator (public member function) ============================================ Declaration: ContainerIterator& initIterator() const; Remarks: Creates and returns an iterator for this bag. See Also: Bag ContainerIterator
Bag::isA (public member function) =================================== Declaration: virtual classType isA() const; Remarks: Returns bagClass, the Bag type ID. See Also: Bag
Bag::isEmpty (public member function) ======================================= Declaration: int isEmpty() const; Remarks: Returns 1 if a container has no elements. See Also: Bag
Bag::lastThat (public member function) ======================================== Declaration: virtual Object& lastThat( condFuncType testFuncPtr, void *paramList ) const; Remarks: Returns a reference to the last object in the container that satisfies a given condition. NOOBJECT is returned if no object in the container meets the condition. See Also: Bag Bag::firstThat Object::firstThat
Bag::nameOf (public member function) ====================================== Declaration: virtual char *nameOf() const; Remarks: Returns "Bag", the Bag type ID string. See Also: Bag
Bag::ownsElements (public member function) ============================================ Declaration: void ownsElements(int del); Remarks: Changes the ownership status as follows: If del is 0, ownership is turned off otherwise, ownership is turned on. See Also: Bag
=============================================== BaseDate abstract class summary (LDATE.H) =============================================== BaseDate is an abstract class that provides basic date manipulation functions. +----------+ ============ +------+ | Sortable |---= BaseDate =-----| Date | +----------+ ============ +------+ Friend To: None Has Friends: None Constructors and Destructor: BaseDate::BaseDate(); BaseDate::BaseDate(unsigned char M, unsigned char D, unsigned Y ); BaseDate::BaseDate(const BaseDate& BD); BaseDate::~BaseDate(); Member Functions: BaseDate::~BaseDate BaseDate::BaseDate BaseDate::day BaseDate::hashValue BaseDate::isA BaseDate::isEqual BaseDate::isLessThan BaseDate::Month BaseDate::nameOf BaseDate::printOn BaseDate::SetDay BaseDate::SetMonth BaseDate::SetYear BaseDate::Year See Also: Container Classes
BaseDate::BaseDate (protected constructors) ============================================= Declarations: Form 1 BaseDate (); Form 2 BaseDate (unsigned char M, unsigned char D, unsigned Y ); Form 3 BaseDate(const BaseDate& BD); See Also: BaseDate
BaseDate::BaseDate (protected constructor) ============================================ Declaration: BaseDate(); Remarks: Creates a BaseDate object with the current date (via a getdate call). See Also: BaseDate constructors BaseDate constructor, Form 2 BaseDate constructor, Form 3
BaseDate::BaseDate (protected constructor) ============================================ Declaration: BaseDate( unsigned char M, unsigned char D, unsigned Y ); Remarks: Creates a BaseDate object with the given month, day, and year. See Also: BaseDate constructors BaseDate constructor, Form 1 BaseDate constructor, Form 3
BaseDate::BaseDate (protected constructor) ============================================ Declaration: BaseDate( const BaseDate& BD ); Remarks: Copy constructor. See Also: BaseDate constructors BaseDate constructor, Form 1 BaseDate constructor, Form 2
BaseDate::~BaseDate (protected destructor) ============================================ Declaration: ~BaseDate(); Remarks: Destroys the date object. See Also: BaseDate
BaseDate::Day (member function) ================================= Declaration: unsigned Day() const; Remarks: Returns the day of the month of a date object (as an integer from 1 to 31). See Also: BaseDate
BaseDate::hashValue (member function) ======================================= Declaration: virtual hashValueType hashValue() const; Remarks: Returns a hashvalue for a date object. See Also: BaseDate HashTable::hashValue
BaseDate::isA (member function) ================================= Declaration: virtual classType isA() const = 0; Remarks: A pure virtual function to return a classtype ID (to be defined in derived classes). See Also: BaseDate
BaseDate::isEqual (member function) ===================================== Declaration: virtual int isEqual(const Object& testDate) const; Remarks: Returns 1 (true) if the object represents the same date as the function argument. Otherwise returns 0 (false). See Also: BaseDate
BaseDate::isLessThan (member function) ======================================== Declaration: virtual int isLessThan(const Object& testDate) const; Remarks: Returns 1 (true) if the object precedes testDate on the calendar. See Also: BaseDate
BaseDate::Month (member function) =================================== Declaration: unsigned Month() const; Remarks: Returns the month member of a date object (as an integer from 1 to 12). See Also: BaseDate
BaseDate::nameOf (member function) ==================================== Declaration: virtual char *nameOf() const = 0; Remarks: Pure virtual function to be defined by derived classes to return their object ID string. See Also: BaseDate
BaseDate::printOn (member function) ===================================== Declaration: virtual void printOn(ostream& outputStream) const = 0; Remarks: Pure virtual function to be defined in derived classes to print the date object on the given stream. printOn is really for internal use by the overloaded operator <<. See Also: BaseDate
BaseDate::SetDay (member function) ==================================== Declaration: void SetDay(unsigned char D); Remarks: Sets the day (as an integer from 1 to 31). Values over 31 will give an error message. See Also: BaseDate
BaseDate::SetMonth (member function) ====================================== Declaration: void SetMonth(unsigned char M); Remarks: Sets the month (as an integer from 1 to 12). Illegal values will give an error message. See Also: BaseDate
BaseDate::SetYear (member function) ===================================== Declaration: void SetYear(unsigned Y); Remarks: Sets the year to Y. See Also: BaseDate
BaseDate::Year (member function) ================================== Declaration: unsigned Year() const; Remarks: Returns the year member of a date object. See Also: BaseDate
=============================================== BaseTime abstract class summary (LTIME.H) =============================================== BaseTime is an abstract class that provides basic time manipulation functions. +----------+ ============ +------+ | Sortable |---= BaseTime =-----| Time | +----------+ ============ +------+ Friend To: None Has Friends: None Constructors: BaseTime(); BaseTime(const BaseTime& BT); BaseTime(unsigned char H,unsigned char M=0,unsigned char S=0, unsigned char HD=0); Member Functions: BaseTime::BaseTime BaseTime::hashvalue BaseTime::hour BaseTime::hundredths BaseTime::isA BaseTime::isEqual BaseTime::isLessThan BaseTime::minute BaseTime::nameOf BaseTime::printOn BaseTime::second BaseTime::setHour BaseTime::setHundredths BaseTime::setMinute BaseTime::setSecond See Also: Container Classes
BaseTime::BaseTime (protected constructors) ============================================= Declarations: Form 1 BaseTime(); Form 2 BaseTime(const BaseTime& BT); Form 3 BaseTime(unsigned char H,unsigned char M=0, unsigned char S=0, unsigned char HD=0); See Also: BaseTime
BaseTime::BaseTime, Form 1 (protected constructor) ==================================================== Declaration: BaseTime(); Remarks: Creates a BaseTime object with the current system time. See Also: BaseTime::BaseTime BaseTime::BaseTime, Form 2 BaseTime::BaseTime, Form 3
BaseTime::BaseTime, Form 2 (protected constructor) ==================================================== Declaration: BaseTime(const BaseTime& BT); Remarks: Copy constructor. See Also: BaseTime::BaseTime BaseTime::BaseTime, Form 1 BaseTime::BaseTime, Form 3
BaseTime::BaseTime, Form 3 (protected constructor) ==================================================== Declaration: BaseTime(unsigned char H,unsigned char M=0,unsigned char S=0, unsigned char HD=0); Remarks: Creates a BaseTime object with the given hour, minute, seconds and hundredths of seconds. See Also: BaseTime::BaseTime BaseTime::BaseTime, Form 1 BaseTime::BaseTime, Form 2
BaseTime::hashValue (member function) ======================================= Declaration: virtual hashValueType hashValue() const; Remarks: Returns a hash value for a BaseTime object. See Also: BaseTime
BaseTime::hour (member function) ================================== Declaration: unsigned hour() const; Remarks: Returns the hour data member of a BaseTime object. See Also: BaseTime
BaseTime::hundredths (member function) ======================================== Declaration: unsigned hundredths() const; Remarks: Returns the hundredths of a second. See Also: BaseTime
BaseTime::isA (member function) ================================= Declaration: virtual classType isA() const = 0; Remarks: Pure virtual function for a derived class to return a class ID. See Also: BaseTime
BaseTime::isEqual (member function) ===================================== Declaration: virtual int isEqual(const Object& testTime) const; Remarks: Returns 1 if this object equals testTime. See Also: BaseTime
BaseTime::isLessThan (member function) ======================================== Declaration: virtual int isLessThan(const Object& testTime) const; Remarks: Returns 1 if this object is less than testTime. See Also: BaseTime
BaseTime::minute (member function) ==================================== Declaration: unsigned minute() const; Remarks: Returns the minute data member. See Also: BaseTime
BaseTime::nameOf (member function) ==================================== Declaration: virtual char *nameOf() const; Remarks: Pure virtual function for a derived class to return an ID string. See Also: BaseTime
BaseTime::printOn (member function) ===================================== Declaration: virtual void printOn(ostream& outStream) const; Remarks: Prints a readable representation of a BaseTime object on a stream. printOn is for internal use by the overloaded operator <<. See Also: BaseTime
BaseTime::second (member function) ==================================== Declaration: unsigned second() const; Remarks: Returns the second data member. See Also: BaseTime
BaseTime::setHour (member function) ===================================== Declaration: void setHour(unsigned char H); Remarks: Sets the hour to H. See Also: BaseTime
BaseTime::setHundredths (member function) =========================================== Declaration: void setHundredths(unsigned char HD); Remarks: Sets the hundredths of a second to HD. See Also: BaseTime
BaseTime::setMinute (member function) ======================================= Declaration: void setMinute(unsigned char M); Remarks: Sets the minute. See Also: BaseTime
BaseTime::setSecond (member function) ======================================= Declaration: void setSecond(unsigned char S); Remarks: Sets the seconds. See Also: BaseTime
============================================ Btree derived class summary (BTREE.H) ============================================ Btree implements the B-tree, a popular data structure offering efficient storage and retrieval with large, dynamic volumes of data. +------------+ +------------+ | Collection |--| Btree | +------------+ +------------+ Friend To: None Has Friends: Node InnerNode LeafNode Constructor: Btree (int ordern = 3); Member Functions: Btree::add Btree::decrNorKeys Btree::detach Btree::findmember Btree::flush Btree::hasMember Btree::hashValue Btree::i_add Btree::incrNofKeys Btree::initIterator Btree::isA Btree::isEqual Btree::nameOf Btree::operator[] Btree::order Btree::printOn Btree::rank See Also: Container Classes
Btree::Btree (public constructor) =================================== Declaration: Btree(int ordern = 3); Remarks: Creates a B-tree of order ordern. (Default order is 3.) See Also: Btree
Btree::add (public member function) ==================================== Declaration: void add( Object& ); Remarks: Add the given object to the B-tree. See Also: Btree
Btree::decrNofKeys (protected member function) ================================================ Declaration: void decrNofKeys(); Remarks: Decrements the itemsInContainer data member. See Also: Btree
Btree::detach (public member function) ======================================== Declaration: void void detach( Object& toDetach, DeleteType dt = NoDelete ); Remarks: Removes the given object from the B-tree. The fate of the removed object depends on the argument dt. See Also: Btree TShouldDelete
Btree::findMember (public member function) ============================================ Declaration: virtual Object& findMember( const Object& toFind ) const; Remarks: Returns the given object if found, otherwise returns NOOBJECT. See Also: Btree
Btree::flush (public member function) ======================================= Declaration: void flush( DeleteType dt = DefDelete ); Remarks: Flushes (empties) the B-tree. The fate of the removed objects depends on the argument dt. See Also: Btree TShouldDelete
Btree::hasMember (public member function) ==================================== Declaration: virtual int hasMember( const Object& obj ) const; Remarks: Returns 1 (true) if the given object is found in the B-tree. See Also: Btree
Btree::hashValue (public member function) =========================================== Declaration: virtual hashValueType hashValue() const; Remarks: Returns the hash value of this B-tree. See Also: Btree HashTable::hashValue
Btree::i_add (protected member function) ========================================== Declaration: long i_add( const Object& obj ); Remarks: Adds the given object to the tree and returns the index in the tree at which the object was inserted. See Also: Btree
Btree::incrNofKeys (protected member function) ================================================ Declaration: void incrNofKeys(); Remarks: Increments the itemsInContainer data member. See Also: Btree
Btree::initIterator (public member function) ============================================== Declaration: virtual ContainerIterator& initIterator() const; Remarks: Creates an iterator for this B-tree. See Also: Btree Container::initIterator
Btree::isA (public member function) ===================================== Declaration: virtual classType isA() const; Remarks: Returns btreeClass, the Btree class ID. See Also: Btree
Btree::isEqual (public member function) ========================================= Declaration: virtual int isEqual( const Object& testObject ) const; Remarks: Returns 1 (true) if testObject is the same as this object. See Also: Btree
Btree::nameOf (public member function) ======================================== Declaration: virtual char *nameOf() const; Remarks: Returns "Btree", the Btree class ID string. See Also: Btree
Btree::operator [] (public member function) ============================================ Declaration: Object& operator[]( long i ) const; Remarks: Returns the root at index i. See Also: Btree
Btree::order (public member function) ======================================= Declaration: int order(); Remarks: Returns the order of the B-tree. See Also: Btree
Btree::printOn (public member function) ========================================= Declaration: virtual void printOn( ostream& outputStream ) const; Remarks: Sends the formatted B-tree data to the given output stream. printOn is for internal use by the overloaded operator <<. See Also: Btree
Btree::rank (public member function) ====================================== Declaration: long rank( const Object& obj ) const; Remarks: Returns the rank of the given object in the B-tree. See Also: Btree
================================================= BtreeIterator abstract class summary (BTREE.H) ================================================= Members follow the same scheme as those for the other container iterators. +-----------------+ +------------------+ |ContainerIterator|--| BtreeIterator | +-----------------+ +------------------+ Friend To: None Has Friends: None Constructor and Destructor: BtreeIterator( const Btree& toIterate ); virtual ~BtreeIterator(); Member Functions: BtreeIterator::~BtreeIterator BtreeIterator::BtreeIterator BtreeIterator::current BtreeIterator::operator ++ BtreeIterator::operator int BtreeIterator::restart See Also: Container Classes
BtreeIterator::BtreeIterator (constructor) ============================================ Declaration: BtreeIterator(const Btree& toIterate); See Also: BtreeIterator
BtreeIterator::~BtreeIterator (destructor) ============================================ Declaration: virtual ~BtreeIterator(); Remarks: Destroys the iterator. See Also: BtreeIterator
BtreeIterator::current (public member function) ================================================= Declaration: virtual Object& current(); Remarks: Pure virtual function to be defined in derived classes to return the element at the current index of the iterator. If the current index exceeds the upper bound, NOOBJECT is returned. See Also: BtreeIterator
BtreeIterator::operator ++ (public member function) ===================================================== Declaration: virtual Object& operator++(); virtual Object& operator++(int); Remarks: Advances the iterator one position in the container. The first version returns the object referred to before incrementing; the second version returns the object referred to after incrementing. The int argument is a dummy used to distinguish the two operators. See Also: BtreeIterator
BtreeIterator::operator int (public member function) ====================================================== Declaration: virtual operator int(); Remarks: Pure virtual function to be defined by derived classes to provide a conversion operator to test for end of iteration condition. See Also: BtreeIterator
BtreeIterator::restart (public member function) ================================================= Declaration: virtual void restart(); Remarks: Pure virtual function to be refined in derived classes to set the current index of the iterator to the first nonempty element in the container. See Also: BtreeIterator
=============================================== Collection class summary (abstract class) =============================================== Collection provides the ability to use objects of different derived classes, such as Arrays, Sets, and Bags, interchangeably, as long as the functions are restricted to those available for a Collection. A Collection is distinguished from a class in the sequence grouping by the ability to determine whether an object is a member of the Collection. +---------------+ +-| AbstractArray | +--| |---------------| +-----------+ ============== | +-| HashTable | | Container |---= Collection =-----| |---------------| +-----------+ ============== | +-| List | |--| |---------------| | +-| DoubleList | | +---------------+ | +----------------+ |---| Bag | | |----------------| +---| Btree | +----------------+ Friend To: None Has Friends: None Constructor and Destructor: Container(); ~Collection(); Member Functions: Collection::add Collection::destroy Collection::detach Collection::findMember Collection::hasMember See Also: Container Class Member Functions
Collection::~Collection (public destructor) ============================================= Declaration: virtural ~Collection(); Remarks: Destroys the object. See Also: Collection
Collection::add (member function) =================================== Declaration: virtual void add(Object& o) =0; Remarks: Pure virtual function to add an object to a Collection. See Also: Collection
Collection::destroy (member function) ======================================= Declaration: void destroy(const Object&) Remarks: Pure virtual function to remove an object from a Collection. Whether the object itself is destroyed or not depends on the ownership status of the collection. If the collection currently owns the object, the object will be destroyed, otherwise the object survives. destroy is implemented with detach (o, DefDelete); See Also: Collection
Collection::detach (member function) ====================================== Declaration: virtual void detach(Object& o, DeleteType dt = NoDelete) = 0; Remarks: Pure virtual function to remove an object from a Collection. The destruction of the object depends both on the ownership status and the value (Delete, NoDelete, or DefDelete) passed via the dt argument. See Also: Collection
Collection::findMember (member function) ========================================== Declaration: virtual Object& findMember(const Object& testObject) const: Remarks: Returns the position of an object in the Collection, or NOOBJECT if it is not found. See Also: Collection
Collection::hasMember (member function) ========================================= Declaration: virtual int hasMember(const Object& o) const; Remarks: Returns 1 (true) if a Collection contains a given object. See Also: Collection
========================================================== ContainerIterator abstract class summary (CONTAIN.H) ========================================================== ContainerIterator is an abstract class declared as a friend of Container. Container classes have initIterator member functions that create ContainerIterator-derived objects. These provide the basic mechanisms for: * traversing the elements in a container * incrementing through the container * returning positional information * testing for conditions along with other functions. The member functions for ContainerIterator are all pure virtual and are defined in derived classes. +---------------------+ +-| ArrayIterator | +--| |---------------------| +------+ ===================== | +-| DoubleListIterator | | none |---= ContainerIterator =-----| |---------------------| +------+ ===================== | +-| HashTableIterator | +--| |---------------------| +-| ListIterator | |---------------------| | BtreeIterator | +---------------------+ Friend To: Container Has Friends: None Member Functions: ContainerIterator::current ContainerIterator::operator int ContainerIterator::operator ++ ContainerIterator::restart See Also: Container Classes
ContainerIterator::current (member function) ============================================== Declaration: virtual Object& current() = 0; Remarks: Pure virtual function to be defined in derived classes to return the element at the current index of the iterator. If the current index exceeds the upper bound, NOOBJECT is returned. See Also: ContainerIterator
ContainerIterator::operator int (member function) =================================================== Declaration: virtual operator int() = 0; Remarks: Pure virtual function to be defined by derived classes to provide a conversion operator to test for end of iteration condition. See Also: ContainerIterator
ContainerIterator::operator ++ (member function) ================================================= Declaration: virtual Object& operator ++() = 0; virtual Object& operator ++(int) = 0; Remarks: See Also: ContainerIterator
ContainerIterator::restart (member function) ============================================== Declaration: virtual void restart() = 0; Remarks: Pure virtual function to be refined in derived classes to set the current index of the iterator to the first nonempty element in the container. See Also: ContainerIterator
================================================== Container abstract class summary (CONTAIN.H) ================================================== The class Container: * Includes all classes that can contain zero or more instances of other objects. * Provides a method of determining how many objects are present in the container and, if so, a method of iterating through the objects that are present. Empty containers are allowed. * Defines a method for displaying the objects present in the container in a formatted way. * Provides a method to control the ownership of a container's elements. * Establishes a method to test if one container is equal to another. * Can create iterators, objects of type ContainerIterator. * Has a second pure virtual base class (not shown) called TShouldDelete. +---------------+ +-| Collection | +--| |---------------| +--------+ ============== | +-| Stack | | Object |---= Container =-----| |---------------| +--------+ ============== | +-| PriorityQueue | +--| +---------------+ | +-------++-------+ +-| Deque || Queue | +-------++-------+ Friend To: None Has Friends: ContainerIterator Constructors: Container(); Member Functions: Container::Container Container::firstThat Container::flush Container::forEach Container::getItemsInContainer Container::hashValue Container::initIterator Container::isA Container::isEmpty Container::isEqual Container::lastThat Container::nameOf Container::printHeader Container::printOn Container::printSeparator Container::printTrailer See Also: Container Classes
Container::Container (public constructor) =========================================== Declaration: Container(); Remarks: Creates an empty Container. See Also: Container
Container::firstThat (member function) ======================================== Declaration: virtual Object& firstThat(condFuncType testFuncPtr, void *paramListPtr) const; Remarks: Returns a reference to the first object in the container that satisfies a given condition. NOOBJECT is returned if no object in the container meets the condition. testFuncPtr is a pointer to a Boolean function that tests for the target condition. The paramListPtr argument lets you pass arbitrary data to the test function. condFuncType is defined in CLSTYPES.H. See Also: Container
Container::flush (member function) ==================================== Declaration: virtual void flush( DeleteType dt = DefDelete ) = 0; Remarks: A pure virtual function. Flushing means removing all the elements from the container without destroying it. The value of dt determines whether the elements themselves are destroyed. By default, the ownership status of the container determines their fate. You can also set dt to Delete and NoDelete. See Also: Container
Container::forEach (member function) ====================================== Declaration: virtual void forEach(iterFuncType actionPtr, void *paramList); Remarks: Executes a given function for each item in the container. See Also: Container
Container::getItemsInContainer (member function) ================================================== Declaration: virtual countType getItemsInContainer() const = 0; Remarks: Returns the number of elements in a container. See Also: Container
Container::hashValue (member function) ======================================== Declaration: virtual hashValueType hashValue() const = 0; Remarks: Returns a hash value for a container. See Also: Container HashTable::hashValue
Container::initIterator (member function) =========================================== Declaration: virtual ContainerIterator& initIterator() const = 0; Remarks: Pure virtual function to initialize a container iterator. See Also: Container
Container::isA (member function) ================================== Declaration: virtual classType isA() const = 0; Remarks: Pure virtual function for a derived class to return a class ID. See Also: Container
Container::isEmpty (member function) ====================================== Declaration: virtual int isEmpty() const = 0; Remarks: Returns 1 (true) if a container has no elements. See Also: Container
Container::isEqual (member function) ====================================== Declaration: virtual int isEqual(const Object& testObject) const; Remarks: Returns 1 (true) if a given container is the same type and has the same objects in the same order as this one. See Also: Container
Container::lastThat (member function) ======================================= Declaration: virtual Object& lastThat(condFuncType testFuncPtr, void *paramListPtr) const; Remarks: Returns a reference to the last object in the container that satisfies a given condition, otherwise NOOBJECT. See Also: Container
Container:nameOf (member function) ==================================== Declaration: virtual char *nameOf() const = 0; Remarks: Pure virtual function for a derived class to return an ID string. See Also: Container
Container::printHeader (member function) ========================================== Declaration: virtual void printHeader(ostream& outputStream) const; Remarks: Prints a standard header for containers (called by printOn). See Also: Container
Container::printOn (member function) ====================================== Declaration: virtual void printOn(ostream& outputStream) const; Remarks: Sends a formatted representation of a container to the given output stream. printon is for internal use by the overloaded operator <<. See Also: Container
Container::printSeparator (member function) ============================================= Declaration: virtual void printSeparator(ostream& outputStream) const; Remarks: Prints a separator (a comma) between elements in a container to the output stream (called by printOn). See Also: Container
Container::printTrailer (member function) =========================================== Declaration: virtual void printTrailer(ostream& outputStream) const; Remarks: Prints a standard trailer (a closing brace) for a container to the output stream (called by printOn). See Also: Container
=========================================== Date instance class summary (LDATE.H) =========================================== The Date instance class is a direct descendant of the abstract BaseDate, defining a printOn function. You can vary Date for different national conventions without disturbing BaseDate. +----------+ ========= +------+ | BaseDate |---= Date =-----| None | +----------+ ========= +------+ Friend To: None Has Friends: None Constructors: Date(); Date(unsigned char M, unsigned char D, unsigned Y); Date(const Date& aDate); Member Functions: Date::Date Date::isA Date::nameOf Date::printOn See Also: Container Classes
Date::Date (constructors) =========================== Declarations: Form 1 Date(); Form 2 Date(unsigned char M, unsigned char D, unsigned Y); Form 3 Date(const Date& aDate); See Also: Date
Date::Date, Form 1 (constructor) ================================== Declaration: Date(); Remarks: Calls the BaseDate constructor to create a date object with today's date. See Also: Date::Date Date::Date, Form 2 Date::Date, Form 3
Date::Date, Form 2 (constructor) ================================== Declaration: Date(unsigned char M, unsigned char D, unsigned Y); Remarks: Calls the BaseDate constructor to create a date object with the given date. See Also: Date::Date Date::Date, Form 1 Date::Date, Form 3
Date::Date, Form 3 (constructor) ================================== Declaration: Date(const Date& aDate); Remarks: Copy constructor. See Also: Date::Date Date::Date, Form 1 Date::Date, Form 2
Date::isA (member function) ============================= Declaration: virtual classType isA() const; Remarks: Returns dateClass, the Date class ID. See Also: Date
Date::nameOf (member function) ================================ Declaration: virtual char *nameOf() const; Remarks: Returns Date, the Date class ID string. See Also: Date
Date::printOn (member function) ================================ Declaration: virtual void printOn(ostream& outputStream) const; Remarks: Sends a formatted date to the given output stream. The format is full month name, day, year, for example January 1, 1990. printOn is really for internal use by the overloaded operator <<. See Also: Date
============================================ Deque instance class summary (DEQUE.H) ============================================ Deque implements a double-ended queue. A deque is a special implementation of a DoubleList. +-----------+ ========= +-------+ | Container |-----= Deque =-----| Queue | +-----------+ ========= +-------+ Objects can be inserted and removed at both the left and the right ends of the deque. Use the member functions peekLeft and peekRight to examine the objects at the left and the right ends. Friend To: None Has Friends: None Template Classes: BI_TCDequeAsDoubleList BI_TCDequeAsVector Member Functions: Deque::flush Deque::getItemsInContainer Deque::getLeft Deque::getRight Deque::initIterator Deque::isA Deque::isEmpty Deque::nameOf Deque::peekLeft Deque::peekRight Deque::putLeft Deque::putRight See Also: Container Classes
Deque::flush (member function) ================================ Declaration: virtual void flush( DeleteType dt = DefDefault ); Remarks: Flushes (empties) the deque without destroying it. See Also: Deque TShouldDelete::ownsElements
Deque::getItemsInContainer (member function) ============================================== Declaration: virtual countType getItemsInContainer() const; Remarks: Returns the number of items in the deque. See Also: Deque
Deque::getLeft (member function) ================================== Declaration: Object& getLeft(); Remarks: Returns the object at the left end and removes it from the deque. Returns NOOBJECT if the deque is empty. See Also: Deque
Deque::getRight (member function) =================================== Declaration: void putRight(Object&); Remarks: Returns the object at the right end and removes it from the deque. See Also: Deque
Deque::initIterator (member function) ======================================= Declaration: virtual ContainerIterator& initIterator() const; Remarks: Initializes a forward (from-the-left) iterator for the deque. See Also: Deque
Deque::isA (member function) ============================== Declaration: virtual classType isA() const; Remarks: Returns the Deque class ID. See Also: Deque
Deque::isEmpty (member function) ================================== Declaration: virtual int isEmpty() const; Remarks: Returns nonzero if this deque has no elements. See Also: Deque
Deque::nameOf (member function) ================================= Declaration: virtual char *nameOf() const; Remarks: Returns the Deque class ID string. See Also: Deque
Deque::peekLeft (member function) =================================== Declaration: Object& peekLeft() const; Remarks: Returns the object at the left end (head) of the deque. Do not destroy the object referenced by the returned value. See Also: Deque
Deque::PeekRight (member function) ==================================== Declaration: Object& peekRight(); Remarks: Returns the object at the right end (tail) of the deque. The object stays in the deque. See Also: Deque
Deque::putLeft (member function) ================================== Declaration: void putLeft(Object& obj); Remarks: Adds an object at the left end of the deque. See Also: Deque
Deque::putRight (member function) =================================== Declaration: void putRight(Object& obj); Remarks: Adds an object at the right end of the deque. See Also: Deque
============================================ Dictionary instance class summary (DICT.H) ============================================ A dictionary is an unordered collection of Association type objects. +-----+ ============== +------+ | Set |---= Dictionary =-----| None | +-----+ ============== +------+ The class Dictionary inherits all of the properties of its parent classes, Set and Bag and adds a lookup function (implying that no duplicate association objects are allowed in a dictionary). Friend To: None Has Friends: None Constructors: Dictionary(unsigned sz =DEFAULT_HASH_TABLE_SIZE); Member Functions: Dictionary::add Dictionary::Dictionary Dictionary::isA Dictionary::lookup Dictionary::nameOf See Also: Container Classes
Dictionary::Dictionary (constructors) ======================================= Declarations: Dictionary(unsigned sz =DEFAULT_HASH_TABLE_SIZE); Remarks Invokes the base Set constructor to create an empty dictionary of size sz. See Also: Dictionary
Dictionary::add (member function) =================================== Declaration: virtual void add(Object& assoc); Remarks: Adds an association to a dictionary. See Also: Dictionary
Dictionary::isA (member function) =================================== Declaration: virtual classType isA() const; Remarks: Returns the Dictionary class ID. See Also: Dictionary
Dictionary::lookup (member function) ====================================== Declaration: Association& lookup(const Object& toLookUp) const; Remarks: Returns the given association if it is in the dictionary, otherwise NOOBJECT is returned. See Also: Dictionary
Dictionary::nameOf (member function) ====================================== Declaration: virtual char *nameOf() const; Remarks: Returns the Dictionary class ID string. See Also: Dictionary
=========================================================== DoubleListIterator instance class summary (DBLLIST.H) =========================================================== Implements the special iterators for traversing doubly-linked lists in either direction. This class adds overloading of the pre- and postdecrement operator - - to allow reverse iteration. +-------------------+ ====================== +------+ | ContainerIterator |---= DoubleListIterator =-----| None | +-------------------+ ====================== +------+ Friend To: None Has Friends: DoubleList Constructor: DoubleListIterator(const DoubleList& toIterate, int atHead = 1); Member Functions: DoubleListIterator::current DoubleListIterator::DoubleListIterator DoubleListIterator::operator int DoubleListIterator::operator ++ DoubleListIterator::operator -- DoubleListIterator::restart See Also: Container Class
DoubleListIterator::DoubleListIterator (constructor) ====================================================== Declaration: DoubleListIterator(const DoubleList& toIterate, int atHead = 1); Remarks: Constructs an array, given the upper and lower bound. If the second parameter is 1, initializes an iterator to begin at the head of the list. Otherwise, the iterator starts at the end of the list. See Also: DoubleListIterator
DoubleListIterator::current (member function) ============================================== Declaration: virtual Object& current(); Remarks: Returns the object at the current index of the iterator. If the current index exceeds the upper bound, NOOBJECT is returned. See Also: DoubleListIterator
DoubleListIterator::operator int (member function) ==================================================== Declaration: virtual operator int(); Remarks: Conversion operator to test for end of iteration condition. See Also: DoubleListIterator
DoubleListIterator::operator ++ (member functions) ==================================================== Declarations: virtual Object& operator ++(int); virtual Object& operator ++(); Remarks: Advances the iterator one position in the list. See Also: DoubleListIterator
DoubleListIterator::operator -- (member functions) ==================================================== Declarations: Object& operator --(int); Object& operator --(); Remarks: Moves the iterator back one position in the list and returns the previous object (or NOOBJECT. if no next object exists). The first version gives postdecrement, the second gives predecrement. See Also: DoubleListIterator
DoubleListIterator::restart (member function) =============================================== Declaration: virtual void restart(); Remarks: Moves the iterator back to its starting position (either the head or the tail of the list). See Also: DoubleListIterator
================================================== DoubleList instance class summary (DBLIST.H) ================================================== DoubleList implements the classical doubly- linked list data structure. Briefly, each node object of a doubly-linked list has two links, one pointing to the next node and one pointing to the previous node. You can add, examine and remove objects at either end of each list. You can traverse the list in either direction, beginning at either the head or the tail. +------------+ ============== +------+ | Collection |---= DoubleList =-----| None | +------------+ ============== +------+ Friend To: None Has Friends: DoubleListIterator Constructor: DoubleList() Member Functions: DoubleList::add DoubleList::addAtHead DoubleList::addAtTail DoubleList::destroyFromHead DoubleList::destroyFromTail DoubleList::detach DoubleList::detachFromHead DoubleList::detachFromTail DoubleList::DoubleList DoubleList::flush DoubleList::initIterator DoubleList::isA DoubleList::nameOf DoubleList::peekAtHead DoubleList::peekAtTail See Also: Container Classes
DoubleList::DoubleList (constructor) ====================================== Declaration: DoubleList(); Remarks: Initializes a new, empty doubly-linked list. See Also: DoubleList
DoubleList::add (member function) =================================== Declaration: virtual void add(Object& toAdd); Remarks: Adds a the given object at the beginning of the list. See Also: DoubleList
DoubleList::addAtHead (member function) ========================================= Declaration: void addAtHead(Object& toAdd); Remarks: Adds the given object at the beginning of the list. See Also: DoubleList
DoubleList::addAtTail (member function) ========================================= Declaration: void addAtTail(Object& toAdd); Remarks: Appends an object to the list. See Also: DoubleList
DoubleList::destroyFromHead (member function) =============================================== Declaration: void destroyFromHead(const Object& toDestroy); Remarks: Removes the first occurance of the given object encountered by searching from the head of the list. The object is destroyed only if it is owned by the list. See Also: DoubleList
DoubleList::destroyFromTail (member function) =============================================== Declaration: void destroyFromTail(const Object& toDestroy); Remarks: Removes the first occurance of the given object encountered by searching from the tail of the list towards the head. The object is destroyed only if it is owned by the list. See Also: DoubleList
DoubleList::detach (member function) ====================================== Declaration: virtual void detach(Object& toDetach, DeleteType dt =NoDelete); Remarks: Calls detachFromHead (toDetach dt); See Also: DoubleList
DoubleList::detachFromHead (member function) ============================================== Declaration: void detachFromHead(const Object& toDetach, DeleteType dt = NoDelete); Remarks: Removes the first occurance of the given object encountered by searching from the head of the list. The dt argument determines if the detached object is itself destroyed. See Also: DoubleList
DoubleList::detachFromTail (member function) ============================================== Declaration: void detachFromTail(const Object& toDetach, DeleteType dt = NoDelete); Remarks: Removes the first occurance of the given object encountered by searching from the tail of the list towards the head. The dt argument determines if the detached object is itself destroyed. See Also: DoubleList TShouldDelete
DoubleList::flush (member function) ===================================== Declaration: virtual void flush( DeleteType dt = DefDelete); Remarks: Flushes (empties) the list without destroying it. The fate of the objects removed is determined by the dt argument. The default value of dt means that the removed objects will be destroyed only if the list owns these objects. See Also: DoubleList TShouldDelete
DoubleList::initIterator (member function) ============================================ Declaration: virtual ContainerIterator& initIterator() const; Remarks: Creates and returns a forward (from head to tail) iterator for the list. See Also: DoubleList
DoubleList::isA (member function) =================================== Declaration: virtual classType isA() const; Remarks: Returns doubleListClass, the DoubleList class ID string. See Also: DoubleList
DoubleList::nameOf (member function) ====================================== Declaration: virtual char *nameOf() const; Remarks: Returns DoubleList, the DoubleList class ID string. See Also: DoubleList
DoubleList::peekAtHead (member function) ========================================== Declaration: Object& peekAtHead() const; Remarks: Returns the object at the beginning of the list (without removing it). See Also: DoubleList
DoubleList::peekAtTail (member function) ========================================== Declaration: Object& peekAtTail() const; Remarks: Returns the object at the end of the list (without removing it). See Also: DoubleList
============================================= Error instance class summary (OBJECT.H) ============================================= Error is a special instance class of Object. +--------+ ========= +------+ | Object |-----= Error =-----| None | +--------+ ========= +------+ Friend To: None Has Friends: None There is exactly one instantiation of class Error, theErrorObject. The static object pointer Object::ZERO points to this global object. The macro NOOBJECT defines Object::ZERO. Object::new returns a pointer to theErrorObject if an attempt to allocate an object fails. You can test the return value of the new operator against NOOBJECT to see whether the allocation failed. Member Functions: Error::delete Error::isA Error::isEqual Error::nameOf Error::printOn See Also: Container Classes
Error::delete (member function) ================================= Declaration: void operator delete(void *); Remarks: Invokes the error __EDELERROR if an attempt to delete the Error object is detected. See Also: Error
Error::isA (member function) ============================== Declaration: virtual classtype isA() const; Remarks: Returns errorClass, the Error class ID. See Also: Error
Error::isEqual (member function) ================================== Declaration: virtual int isEqual(const Object& testObject const); Remarks: Returns 1 (true) if the test object is the Error object. See Also: Error
Error::nameOf (member function) ================================= Declaration: virtual char *nameOf() const; Remarks: Returns the Error class ID string. See Also: Error
Error::printOn (member function) ================================== Declaration: virtual void printOn(ostream&) Remarks: Prints the string "Error\n" on the given stream. printOn is really for internal use by the overloaded operator <<. See Also: Error
========================================================== HashTableIterator instance class summary (HASHTBL.H) ========================================================== HashTableIterator is an instance class providing iterator functions for HashTable objects. Since hash values are stored in an array, hash table iterators use the array iterator mechanism. +-------------------+ ===================== +------+ | ContainerIterator |---= HashTableIterator =-----| None | +-------------------+ ===================== +------+ Friend To: HashTable Has Friends: None Constructor: HashTableIterator(const Array& toIterate); Member Functions: HashTableIterator::current HashTableIterator::HashTableIterator HashTableIterator::operator int HashTableIterator::operator ++ HashTableIterator::restart See Also: Container Classes
HashTableIterator::HashTableIterator (constructor) ==================================================== Declaration: HashTableIterator(const Array& toIterate); Remarks: Initializes an iterator. See Also: HashTableIterator
HashTableIterator::current (member function) ============================================== Declaration: virtual operator Object& current(); Remarks: Pure virtual function to return the current element. If the current element is empty or invalid, NOOBJECT is returned. See Also: HashTableIterator
HashTableIterator::operator int (member function) =================================================== Declaration: virtual operator int(); Remarks: Conversion operator to test for end of iteration condition. See Also: HashTableIterator
HashTableIterator::operator ++ (member functions) =================================================== Declarations: virtual Object& operator ++(int); virtual Object& operator ++(); Remarks: Advances the iterator to the next element in the hash table. See Also: HashTableIterator
HashTableIterator::restart (member function) ============================================== Declaration: virtual void restart(); Remarks: Causes the iterator to point to the beginning of the hash table. See Also: HashTableIterator
============================================== HashTable instance class summary (HASHTBL.H) ============================================== HashTable provides an implementation of a collection in which there is no provision for ordering of objects. +------------+ ============= | Collection |---= HashTable = +------------+ ============= Friend To: None Has Friends: HashTableIterator Constructor: HashTable(sizeType aPrime = DEFAULT_HASH_TABLE_SIZE); Member Functions: HashTable::add HashTable::detach HashTable::findMember HashTable::flush HashTable::HashTable HashTable::hashValue HashTable::initIterator HashTable::isA HashTable::nameOf See Also: Container Classes
HashTable::HashTable (constructor) ==================================== Declaration: HashTable(sizeType aPrime = DEFAULT_HASH_TABLE_SIZE); Remarks: Creates an empty table. The aPrime argument is a prime number used in the hashing function (the default is defined in RESOURCE.H). See Also: HashTable
HashTable::add (member function) ================================== Declaration: virtual void add(Object& objectToAdd); Remarks: Adds the given object to a hash table. See Also: HashTable
HashTable::detach (member function) ===================================== Declaration: virtual void detach(const Object& objectToDetach, DeleteType dt = NoDelete); Remarks: Removes the given object from a hash table. Whether the object itself is destroyed or not depends on the dt argument. See Also: HashTable TShouldDelete
HashTable::findMember (member function) ========================================= Declaration: virtual Object& findMember(const Object& testObject) const; Remarks: Returns the target object if found, otherwise returns NOOBJECT. See Also: HashTable
HashTable::flush (member function) ==================================== Declaration: virtual void flush( DeleteType dt = DefDelete ); Remarks: Removes all the elements from the table without destroying it. The value of dt determines whether the elements themselves are destroyed. See Also: HashTable TShouldDelete
HashTable::hashValue (member function) ======================================== Declaration: virtual hashValueType hashValue() const; Remarks: Returns the raw hash value of this table. This must not be confused with the hash values calculated BY the hash table for each of the objects it stores. When an object x of class X is added or removed from a hash table h, the raw hash value used is x.hashValue(). Only classes with a proper hashValue member function can provide objects for storage in a hash table. See Also: HashTable
HashTable::initIterator (member function) =========================================== Declaration: virtual ContainerIterator& initIterator() const; Remarks: Initializes an iterator for a hash table. See Also: HashTable Container::initIterator
HashTable::isA (member function) ================================== Declaration: virtual classType isA() const; Remarks: Returns hashTableClass, the HashTable class ID. See Also: HashTable
HashTable::nameOf (member function) ===================================== Declaration: virtual char *nameOf() const; Remarks: Returns HashTable, the HashTable class ID string. See Also: HashTable
========================================== List instance class summary (LIST.H) ========================================== List implements a linear linked list. Lists are unordered collections in which objects are linked in one direction only to form a chain. You can add objects only at the head of the list; however, you can traverse the list to examine or remove the objects. You can traverse a list (from head to tail) with an iterator to access the objects sequentially. +------------+ ======== +------+ | Collection |---= List =-----| None | +------------+ ======== +------+ Friend To: None Has Friends: ListIterator Constructor: List(); Member Functions: List::add List::detach List::flush List::hashValue List::initIterator List::isA List::List List::nameOf List::peekHead See Also: Container Classes
List::List (constructor) ========================== Declaration: List(); Remarks: Initializes an empty list. See Also: List
List::add (member function) ============================= Declaration: void add(Object& toAdd); Remarks: Adds an object to the list. The object becomes the new head of the list. See Also: List
List::detach (member function) ================================ Declaration: virtual void detach(const Object& toDetach, DeleteType dt = NoDelete ); Remarks: Removes an object from the list. Whether the object itself is destroyed or not depends on the dt argument. See Also: List TShouldDelete
List::flush (member function) =============================== Declaration: virtual void flush( DeleteType dt = DefDelete ); Remarks: Removes all the objects from the list without destroying it. The value of dt determines whether the objects themselves are destroyed. By default (dt = DefDelete), the ownership status of the list determines the fate of its elements, as explained in TShouldDelete::ownsElements. You can set dt to Delete to force destruction of the flushed objects regardless of ownership. If dt is set to NoDelete, the flushed objects will survive regardless of ownership. See Also: List
List::hashValue (member function) =================================== Declaration: virtual hashValueType hashValue() const; Remarks: Returns a hash value for a list. See Also: List HashTable::hashValue
List::initIterator (member function) ====================================== Declaration: virtual ContainerIterator& initIterator() const; Remarks: Initializes an iterator for a list (starts at the head). See Also: List
List::isA (member function) ============================= Declaration: virtual classType isA() const; Remarks: Returns listClass, the List class ID. See Also: List
List::nameOf (member function) ================================ Declaration: virtual char *nameOf() const; Remarks: Returns List, the List class ID string. See Also: List
List::peekHead (member function) ================================== Declaration: Object& peekHead() const; Remarks: Returns the object at the head of the list. See Also: List
================================================== ListIterator instance class summary (LIST.H) ================================================== Implements functions to traverse a linked list (List). +-------------------+ ================ +------+ | ContainerIteraror |---= ListIterator =---| None | +-------------------+ ================ +------+ Friend To: List Has Friends: None Constructor: ListIterator(const List& toIterate); Member Functions: ListIterator::current ListIterator::ListIterator ListIterator::operator int ListIterator::operator ++ ListIterator::restart See Also: Container Classes
ListIterator::ListIterator (constructor) ========================================== Declaration: ListIterator(const List& toIterate); Remarks: Creates an iterator for the given list. The starting and current elements are set to the first element of the list. See Also: ListIterator
ListIterator::current (member function) ========================================= Declaration: virtual Object& current(); Remarks: Pure virtual function to be defined in derived classes to return the element at the current index of the iterator. If the current index exceeds the upper bound, NOOBJECT is returned. See Also: ListIterator
ListIterator::operator int (member function) ============================================== Declaration: virtual operator int(); Remarks: Conversion operator to test for end of iteration condition. See Also: ListIterator
ListIterator::operator ++ (member functions) ============================================== Declarations: virtual Object& operator ++(int); virtual Object& operator ++(); Remarks: Advances the iterator to the next element in the list. See Also: ListIterator
ListIterator::restart (member function) ========================================= Declaration: virtual void restart(); Remarks: Points the iterator to the first non-empty element in the container. See Also: ListIterator
=================================================== MemBlocks instance class summary (MEMMGR.H) =================================================== MemBlocks is a noncontainer, instance class, offering specialized memory management not only for the container classes but for other applications. Detailed knowledge of its operations is not needed for normal container applications. MemBlocks provides fixed-block memory allocation and offers more efficient memory management than the standard heap manager for allocating and freeing blocks. Friend To: None Has Friends: None Member Functions: MemBlocks::allocate MemBlocks::free See Also: Container Classes
MemBlocks::allocate (member function) ======================================= Declaration: void allocate(size_t sz, unsigned blks = 100); Remarks: Allocates blks blocks each of size sz. See Also: MemBlocks
MemBlocks::free (member function) ==================================== Declaration: void free(void * ptr); Remarks: Frees the memory blocks at ptr. See Also: MemBlocks
================================================== MemStack instance class summary (MEMMGR.H) ================================================== MemStack is a noncontainer, instance class, providing fast mark-and-release style memory management. Although used internally by various container classes, MemStack is also available for general use. Memory allocations and deallocations are extremely fast since they "popped" and "pushed" on a stack of available blocks. When a marker is created it records the current location in the memory stack; when a marker is destroyed, the stack is returned to its original state, freeing any allocations made since the marker was created. Friend To: None Has Friends: None See Also: Container Classes MemBlocks
============================================== Object abstract class summary (OBJECT.H) ============================================== Object is an abstract class providing the primordial base for the whole Object-based container hierarchy (with the exception of the iterator classes). The member functions provide the basic essentials for all derived classes and the objects they contain. +---------------------------------------------+-------------------------+ | Task | Member Function | |---------------------------------------------+-------------------------| |Return the class to which an object belongs | isA | |Return a character representation of the | nameOf | |class name | | |Display the contents of an object in a format| printOn | |suitable for that object | | |Return a unique key based on the object | hashValue | |Iterate through each part that makes up an | forEach | |object | | |Find the first or last part or whole object | firstThat and ForEach | |which satisfies a given condition | | |Determine whether the object is equal to | isEqual | |another object | | |Determine whether the object is derived from | isSortable | |the class Sortable | | |Determine whether the object is derived from | isAssociation | |the class Association | | +-----------------------------------------------------------------------+ An object must also: * construct, destroy, and copy on to another object * allocate a new object +-------------+ +-| Association | +--| |-------------| +------+ ========== | +-| Container | | None |-----= Object =---| |-------------| +------+ ========== | +-| Error | +--| |-------------| +-| Sortable | +-------------+ Friend To: None Has Friends: operator << operator == operator != Constructors: Object(); Object(Object& obj); Data Member Object::ZERO Member Functions: Object::firstThat Object::forEach Object::hashValue Object::isA Object::isAssociation Object::isEqual Object::isSortable Object::lastThat Object::nameOf Object::new Object::Object Object::printOn Object::ptrToRef See Also: Container Classes
Object::Object (constructors) =============================== Declarations: Form 1 Object(); Form 2 Object(Object& obj); See Also: Object
Object::Object, Form 1 (constructor) ====================================== Declaration: Object(); Remarks: Constructs an object. See Also: Object::Object Object::Object, Form 2
Object::Object, Form 2 (constructor) ====================================== Declaration: Object(Object& obj); Remarks: Copy constructor. See Also: Object::Object Object::Object, Form 1
Object::ZERO (data member) ============================ Declaration: static Object *ZERO; Remarks: A static pointer to the unique instance of class Error. ZERO is used to define NOOBJECT. See Also: Object
Object::firstThat (member function) ===================================== Declaration: virtual Object& firstThat(condFuncType testFuncPtr, void *paramList) const; Remarks: Returns a reference to the first object in a container that satisfies a given condition. NOOBJECT is returned if no object in the container meets the condition. testFuncPtr is a pointer to a Boolean function that tests for the target condition. See Also: Object
Object::forEach (member function) =================================== Declaration: virtual void forEach(iterFuncType actionPtr, void *paramList); Remarks: Calls the given iterator for an object along with a parameter list. See Also: Object
Object::hashValue (member function) ===================================== Declaration: virtual hashValueType hashValue() const = 0; Remarks: Pure virtual function for derived classes to return a hash value. See Also: Object
Object::isA (member function) =============================== Declaration: virtual classType isA() const = 0; Remarks: Pure virtual function for derived classes to return a class ID. See Also: Object
Object::isAssociation (member function) ========================================= Declaration: virtual int isAssociation() const; Remarks: Returns nonzero (true) if the object is derived from the class Association. Must be overridden in classes providing associations. See Also: Object
Object::isEqual (member function) =================================== Declaration: virtual int isEqual(const Object& testObject) const = 0; Remarks: Pure virtual function for derived classes to test for equality. Is really for use by the operator ==. See Also: Object
Object::isSortable (member function) ====================================== Declaration: virtual int isSortable() const; Remarks: Returns nonzero (true) if the object is derived from the class Sortable. Sortable classes must override isSortable to return true. See Also: Object
Object::lastThat (member function) ==================================== Declaration: virtual Object& lastThat(condFuncType testFuncPtr, void *paramList); Remarks: For non-container objects. Calls the given test function for an object with a parameter list. Returns the object if the test succeeded, NOOBJECT otherwise. Container classes override lastThat to return a reference to the last object in a container that satisfies a given condition. See Also: Object
Object::nameOf (member function) ================================== Declaration: virtual char *nameOf() const = 0; Remarks: Pure virtual function for derived classes to return their object ID string. See Also: Object
Object::new (member function) =============================== Declaration: void *operator new(size_t size); Remarks: Allocates a given number of bytes for an object. Returns ZERO if the allocation fails, or a pointer to the new object. See Also: Object
Object::printOn (member function) =================================== Declaration: virtual void printOn(ostream& outputStream) const = 0; Remarks: Pure virtual function for derived classes to do formatted output. For use by the overloaded operator <<. See Also: Object
Object::ptrToRef (member function) ==================================== Declaration: static Object ptrToRef( Object *p ); Remarks: Returns *ZERO is p is 0, else returns *p. See Also: Object
Operator << ============= Declaration: ostream& operator <<( ostream& outputStream, const Object& anObject ); Remarks: Uses printOn to send a formatted representation of anObject to the given output stream. The stream is returned, allowing the usual chaining of the << operator. operator << is a friend of Object. See Also: Object Sortable
Related Functions =================== The following overloaded operators are related to Object but are not member functions: operator == ============= int operator ==( const Object& test1, const Object& test2 ); Returns nonzero (true) if the two objects are equal, otherwise returns 0 (false). Equal means that isA and isEqual each return the same values for the two objects. Note that for sortable objects (derived from the class Sortable) there are also overloaded nonmember operators <, >, <=, and >=. operator != ============= int operator !=( const Object& test1, const Object& test2 ); Returns nonzero (true) if the two objects are unequal, otherwise returns 0 (false). Unequal means that either isA or isEqual each return the different values for the two objects. See also: Object::isA Object::isEqual Sortable class
========================================================= PriorityQueue instance class summary (PRIORTYQ.H) ========================================================= Implements the traditional priority queue data structure. The objects in a priority queue must be sortable. +---------+ +-------------+ |Container|-----|PriorityQueue| +---------+ +-------------+ A priority queue is either a GIFO (greatest-in-first-out) or SIFO (smallest-in-first-out) container widely used in scheduling algorithms. The difference depends on your ordering definition. Friend To: None Has Friends: None Member Functions: PriorityQueue::detachLeft PriorityQueue::flush PriorityQueue::get PriorityQueue::getItemsInContainer PriorityQueue::hashValue PriorityQueue::hasMember PriorityQueue::initIterator PriorityQueue::isA PriorityQueue::isEmpty PriorityQueue::nameOf PriorityQueue::peekLeft PriorityQueue::put See Also: Container Classes
PriorityQueue::detachLeft (member function) ============================================ Declaration: void detachLeft( Container::DeleteType dt = Container::DefDelete ); Remarks: Removes the smallest object from the priority queue. Whether this object is destroyed or not depends on the value of dt. See Also: PriorityQueue TShouldDelete::ownsElements
PriorityQueue::flush (member function) ======================================== Declaration: void flush( Container::DeleteType dt = Container::DefDelete ); Remarks: Flushes (empties) the priority queue. The fate of the removes objects depends on the value of dt. See Also: PriorityQueue TShouldDelete::ownsElements
PriorityQueue::get (member function) ====================================== Declaration: Object& get(); Remarks: Detaches the smallest object from the priority queue and returns it. The detached object is not itself destroyed. See Also: PriorityQueue
PriorityQueue::GetItemsInContainer (member function) ====================================================== Declaration: countType getItemsInContainer() const; Remarks: Returns the number of items in the priority queue. See Also: PriorityQueue
PriorityQueue::hashValue(member function) =========================================== Declaration: virtual hashValueType hashValue() const; Remarks: Returns the hash value of the priority queue. See Also: PriorityQueue HashTable::hashValue
PriorityQueue::hasMember (member function) ============================================ Declaration: int hasMember(const Object& obj) const; Remarks: Returns 1 if obj belongs to the priority queue. See Also: PriorityQueue
PriorityQueue::initIterator (member function) =============================================== Declaration: virtual void ContainerIterator& initIterator() const; Remarks: Creates and returns an iterator for this queue. See Also: PriorityQueue ContainerIterator
PriorityQueue::isA (member function) ====================================== Declaration: virtual classType isA() const; Remarks: Returns priorityQueueClass, the PriorityQueue type ID. See Also: PriorityQueue
PriorityQueue::isEmpty (member function) ========================================== Declaration: int isEmpty(); Remarks: Returns 1 if the priority queue is empty, otherwise returns 0. See Also: PriorityQueue
PriorityQueue::nameOf (member function) ========================================= Declaration: virtual char *nameOf() const; Remarks: Returns "PriorityQueue", the PriorityQueue type ID string. See Also: PriorityQueue
PriorityQueue::peekLeft (member function) =========================================== Declaration: Object& peekLeft(); Remarks: Returns the smallest object in the priority queue without removing it. See Also: PriorityQueue
PriorityQueue::put (member function) ====================================== Declaration: void put(Object& o); Remarks: Add the given object to the priority queue. See Also: PriorityQueue
============================================ Queue instance class summary (QUEUE.H) ============================================ Queue implements a FIFO container and associated queue methods. Queue is implemented as a restricted-access version of Deque. +-------+ ========= +------+ | Deque |---= Queue =-----| None | +-------+ ========= +------+ Friend To: None Has Friends: None Template Classes: BI_TCQueueAsDoubleList BI_TCQueueAsVector Member Functions: Queue::get Queue::isA Queue::nameOf Queue::put See Also: Container Classes
Queue::get (member function) ============================== Declaration: Object& get(); Remarks: Removes the object from the end (tail) of the queue. By default the removed object will not be destroyed. If the queue is empty, NOOBJECT is returned. See Also: Queue TShouldDelete
Queue::isA (member function) ============================== Declaration: virtual classType isA() const; Remarks: Returns queueClass the Queue type ID. See Also: Queue
Queue::nameOf (member function) ================================= Declaration: virtual char *nameof() const; Remarks: Returns the Queue class ID string. See Also: Queue
Queue::put (member function) ============================== Declaration: void put(Object& o); Remarks: Add an object to (the tail of) the queue. See Also: Queue
======================================== Set abstract class summary (SET.H) ======================================== Set is derived from Bag. Set restricts membership of objects in a collection to one of each object. Other than a difference in the method for adding a member, a Set and a Bag are identical. +-----+ ========= +------------+ | Bag |---= Set =-----| Dictionary | +-----+ ========= +------------+ Friend To: None Has Friends: None Template Classes: BI_TCSetAsVector Constructor: Set(sizeType setSize = DEFAULT_SET_SIZE); Member Functions: Set::add Set::isA Set::nameOf See Also: Container Classes
Set::Set (constructor) ======================== Declaration: Set(sizeType setSize = DEFAULT_SET_SIZE); Remarks: Creates a set with the given size by calling the base Bag constructor. See Also: Set
Set::add (member function) ============================ Declaration: virtual void add(Object& objectToAdd); Remarks: Adds an object to the set. The object is added only if it is not already there. See Also: Set Collection::hasMember
Set::isA (member function) ============================ Declaration: virtual classType isA() const; Remarks: Returns setClass, the Set class ID. See Also: Set
Set::nameOf (member function) =============================== Declaration: virtual char *nameOf() const; Remarks: Returns "Set", the Set class ID string. See Also: Set
================================================== Sortable abstract class summary (SORTABLE.H) ================================================== Use Sortable to create classes of objects that are sortable. Membership in this class is limited to objects that can be tested for order. You can derive objects from Sortable and place them into ordered collections. An object derived from Sortable must define isLessThan, and isEqual in addition to those functions required by the class Object. The type of sortable objects available differs between the Object-based containers and the template-based containers. In the Object-based hierarchy you must use objects ultimately derived from Sortable, whereas the template containers let you store any object or predefined data type for which == and < is defined. If you want to store ints in an Object-based container, you must invent a suitable class. +----------+ +-| BaseDate | +--------+ ============ | |----------| | Object |---= Sortable =-----+-| BaseTime | +--------+ ============ | |----------| +-| String | +----------+ Friend To: None Has Friends: Operator << Member Functions: Sortable::hashValue Sortable::isA Sortable::isEqual Sortable::isLessThan Sortable::isSortable Sortable::nameOf Sortable::printOn Related Functions: operator < operator <= operator > operator >= See Also; Container Classes
Sortable::hashValue (member function) ======================================= Declaration: virtual hashValueType hashValue() const = 0; Remarks: Pure virtual function to return a hash value. See Also: Sortable
Sortable::isA (member function) ================================= Declaration: virtual classType isA() const = 0; Remarks: Pure virtual function to return a class ID. See Also: Sortable
Sortable::isEqual (member function) ===================================== Declaration: virtual int isEqual(const Object& testObject) const = 0; Remarks: Pure virtual function to test for equality. Returns 1 for equality. See Also: Sortable
Sortable::isLessThan (member function) ======================================== Declaration: virtual int isLessThan(const Object& testObject) const = 0; Remarks: Pure virtual function to test for order. Returns 1 for "less than". See Also: Sortable
Sortable::isSortable (member function) ======================================== Declaration: virtual int isSortable() const; Remarks: Returns 1 (true) for all objects derived from Sortable. Overrides Object::isSortable. See Also: Sortable
Sortable::nameOf (member function) ==================================== Declaration: virtual char *nameOf() const = 0; Remarks: Pure virtual function to return their object ID. See Also: Sortable
Sortable::printOn (member function) ==================================== Declaration: virtual void printOn(ostream& outputStream) const = 0; Remarks: Pure virtual function to provide formatted output of objects on the given output stream. printOn is for internal use by the overloaded operator <<. See Also: Sortable
Related Functions ================= The following overloaded operators are related to Sortable but are not member functions: operator < ========== int operator <( const Sortable& test1, const Sortable& test2 ); Returns nonzero (true) if the two objects are of the same type X, and test1 is "less than" test2 (as defined by X::isLessThan). Otherwise returns 0 (false). operator <= =========== int operator <=( const Sortable& test1, const Sortable& test2 ); As for operator <, but also tests true for equality. operator > ========== int operator >( const Sortable& test1, const Sortable& test2 ); Returns nonzero (true) if the two objects are of the same type X, and test1 is not "less than" and not "equal" to test2 (as defined by X::isLessThan and X::isEqual). Otherwise returns 0 (false). operator >= =========== int operator >=( const Sortable& test1, const Sortable& test2 ); As for operator >, but also tests true for equality. See also: Sortable::isLessThan Sortable::isA
===================================================== SortedArray instance class summary (SORTARRY.H) ===================================================== SortedArray defines an array in which the objects that make up the array are sorted in ascending order. The operator <= must be defined for comparing objects in the array. The differences between Array and SortedArray are * The method for adding an object at a given index (addAt) is provided in Array. It is not provided in SortedArray. * The subscript operator in SortedArray (operator []) does not return an lvalue. The subscript operator in Array returns an lvalue. +---------------+ =============== +------+ | AbstractArray |---= SortedArray =-----| None | +---------------+ =============== +------+ Friend To: None Has Friends: None Template Class: BI_TCSArrayAsVector Constructor: SortedArray(int upper, int lower = 0, sizeType aDelta = 0) Member Functions: SortedArray::add SortedArray::detach SortedArray::isA SortedArray::nameOf SortedArray::operator [] SortedArray::SortedArray
SortedArray::SortedArray (constructor) ======================================== Declaration: SortedArray(int upper, int lower = 0, sizeType aDelta = 0) Remarks: Initializer. See Also: SortedArray
SortedArray::add (member function) ==================================== Declaration: virtual void add(Object&) Remarks: Adds a sortable object to its appropriate, ordered position in the array. See Also: SortedArray
SortedArray::detach (member function) ======================================= Declaration: virtual void detach(const Object&, int = 0) Remarks: Removes an object from the array and shuffles the remaining objects down to fill in the hole. If the second parameter is nonzero, the removed object is destroyed. See Also: SortedArray
SortedArray::isA (member function) ==================================== Declaration: virtual classType isA() Remarks: Returns the SortedArray class ID. See Also: SortedArray
SortedArray::nameOf (member function) ======================================= Declaration: virtual char *nameOf() Remarks: Returns the SortedArray class ID string. See Also: SortedArray
SortedArray::operator [] (member function) =========================================== Declaration: const Sortable& operator [](int) Remarks: Subscripting operator (does not return an lvalue). See Also: SortedArray
======================================== Stack instance class summary (STACK.H) ======================================== Stack is one of the sequence classes derived from Container. A stack is a LIFO (last-in-first-out) linear list for which all insertions (pushes) and removals (pops) take place at one end (the top or head) of the list Stack provides the usual stack operations. It also provides a member function (top) for referencing and changing the top element of the stack without popping the stack. +-----------+ ========= +------+ | Container |---= Stack =-----| None | +-----------+ ========= +------+ Friend To: None Has Friends: BI_StackAsVectorIterator BI_StackAsListIterator<T>; Template Classes: BI_TCStackAsList BI_TCStackAsVector Member Functions: Stack::flush Stack::getItemsInContainer Stack::initIterator Stack::isA Stack::isEmpty Stack::nameOf Stack::pop Stack::push Stack::top See Also: Container Classes
Stack::flush (member function) ================================ Declaration: void flush( DeleteType dt = DefDelete ); Remarks: Flushes (empties) the stack. The fate of the removed objects depends on the argument dt. See Also: Stack TShouldDelete
Stack::getItemsInContainer (member function) ============================================== Declaration: virtual countType getItemsInContainer() const; Remarks: Returns the number of items in the stack. See Also: Stack
Stack::initIterator (member function) ======================================= Declaration: virtual ContainerIterator& initIterator() const; Remarks: Creates and returns a stack iterator for the stack. See Also: Stack
Stack::isA (member function) ============================== Declaration: virtual classType isA() const; Remarks: Returns the Stack type ID. See Also: Stack
Stack::isEmpty (member function) ================================== Declaration: virtual int isEmpty() const; Remarks: Returns nonzero (true) if a stack is empty. See Also: Stack
Stack::nameOf (member function) ================================= Declaration: virtual char *nameOf() const; Remarks: Returns the Stack type ID string. See Also: Stack
Stack::pop (member function) ============================== Declaration: Object& pop(); Remarks: Detaches and returns (pops) the object at the top of the stack. See Also: Stack
Stack::push (member function) =============================== Declaration: void push(Object& toPush); Remarks: Adds (pushes) t to the top of the stack. See Also: Stack
Stack::top (member function) ============================== Declaration: Object& top(); Remarks: Returns (but does not remove) the object at the top of the stack. Top is an exception to the container ownership rule in that it returns a reference to an object which is still owned by the stack container. Do not destroy the referenced object, as this will disrupt the internal mechanism for storing the stack. See Also: Stack
============================================= String instance class summary (STRNG.H) ============================================= Defines a string-handling class. You can use String objects anywhere an instance object is called for. A string object is always terminated by a null. +----------+ ========== +------+ | Sortable |---= String =-----| None | +----------+ ========== +------+ Friend To: None Has Friends: None Constructors: String(const char *aPtr =""); String(const String& sourceString); ~String(); Member Functions: String::hashValue String::isA String::isEqual String::isLessThan String::nameOf String::operator = String::operator char * String::printOn String::String String::~String See Also: Container Classes
String::String (constructors) =============================== Declarations: Form 1 String(const char *aPtr = ""); Form 2 String(const String& sourceString); See Also: String
String::String, Form 1 (public constructor) ============================================ Declaration: String(const char *aPtr = ""); Remarks: Constructs a String object from a C string. See Also: String::String String::String, Form 2
String::String, Form 2 (public constructor) ============================================ Declaration: String(const String& sourceString); Remarks: Copy constructor. See Also: String::String String::String, Form 1
String::~String (public destructor) =================================== Declaration: virtual ~String(); Remarks: Destroys the string. See Also: String
String::hashValue (member function) ===================================== Declaration: virtual hashValueType hashValue() const; Remarks: Returns the hash value for this string. See Also: HashTable::hashValue String
String::isA (member function) =============================== Declaration: virtual classType isA() const; Remarks: Returns stringClass, the Stack type ID. See Also: String
String::isEqual (member function) =================================== Declaration: virtual int isEqual(const Object& testString) const; Remarks: Returns nonzero (true) if two Strings are equal. See Also: String
String::isLessThan (member function) ====================================== Declaration: virtual int isLessThan(const Object& testString) const: Remarks: Returns nonzero (true) if a string lexically precedes testString. See Also: String
String::nameOf (member function) ================================== Declaration: virtual char *nameOf() const; Remarks: Returns the Stack type ID string. See Also: String
String::operator = (member function) ====================================== Declaration: String& operator =(const String& sourceString); Remarks: Overloads the assignment operator for string objects. Copies the source string to this string. If the strings are of different lengths, a new string is created before the assignment. See Also: String
String::operator char *(member function) ========================================= Declaration: operator const char *() const; Remarks: Returns a character pointer to a String object's string. See Also: String
String::printOn (member function) =================================== Declaration: virtual void printOn(ostream& outputStream) const; Remarks: Prints this string on a given stream. printOn is for use by the overloaded operator <<. See Also: String
Class Templates (FDS and ADT) =============================== Each basic FDS and ADT has a direct and indirect iterator; the Vector iterators are listed. Direct versions store the objects themselves while indirect versions store pointers to the objects. +-------------------------------------------------------------+ |FDS ADT | | Stack Queue Deque Bag Set Array Sorted Array| |-------------------------------------------------------------| |Vector * * * * * * * | |List * | |DoubleList * * | +-------------------------------------------------------------+ Prefix | What it means -------+------------------------------------------------------- BI_ | Borland International BI_I| indirect versions S | Sorted C | Counted O | Object based, non polymorphic TC | Object based, polymorphic (compatible with original | Turbo C library) Suffix | What it means -------+------------------------------------------------------- Imp | implementation T | template parameter in <T> represents the data type of | the objects to be stored. FDS Class template Description ------------------------+-------------------------------------- BI_VectorImp<T> | vector of Ts BI_VectorIteratorImp<T> | iterator for a vector of Ts BI_CVectorImp<T> | counted vector of Ts BI_SVectorImp<T> | sorted vector of Ts BI_IVectorImp<T> | vector of pointers to T BI_IVectorIteratorImp<T>| iterator for a vector of pointers to T BI_ICVectorImp<T> | counted vector of pointers to T BI_ISVectorImp<T> | sorted vector of pointers to T BI_ListImp<T> | list of Ts BI_SListImp<T> | sorted list of Ts BI_IListImp<T> | list of pointers to T BI_ISListImp<T> | sorted list of pointers to T BI_DoubleListImp<T> | double-linked list of Ts BI_SDoubleListImp<T> | sorted double-linked list of Ts BI_IDoubleListImp<T> | double-linked list of pointers to T BI_ISDoubleListImp<T> | sorted double-linked list of pointers to T ADT Class Templates Description ------------------------+--------------------------------------- BI_StackAsVector<T> | stack of Ts as a vector BI_QueueAsVector<T> | queue of Ts as a vector BI_DequeAsVector<T> | deque of Ts as a vector BI_BagAsVector<T> | bag of Ts as a vector BI_SetAsVector<T> | set of Ts as a vector BI_ArrayAsVector<T> | array of Ts as a vector BI_SArrayAsVector<T> | sorted array of Ts as a vector BI_IStackAsVector<T> | stack of pointers to T as a vector BI_IQueueAsVector<T> | queue of pointers to T as a vector | and so on BI_StackAsList<T> | stack of Ts as a list BI_IStackAsList<T> | stack of pointers to T as a list BI_QueueAsDoubleList<T> | stack of Ts as a double list BI_DequeAsDoubleList<T> | deque of Ts as a double list BI_IQueueAsDoubleList<T>| stack pointers to T as a double list BI_IDequeAsDoubleList<T>| deque of pointers to T as a double list See Also: BIDS Container Classes Template Classes
Template Classes ================== Each template must be instantiated with a particular data type as the type of the element that it will hold. This allows the compiler to generate the correct code for dealing with any possible type of element without restricting the elements to just those derived from Object. Each ADT is also used to instantiate classes that imitate the behavior of the Object class libraries. Existing code based on the Object container classes will compile and run using the BIDS classes, just by linking in the appropriate library. Object-based | Object | Description template classes | Class | -------------------+-------------+----------------------------------------- BI_OStackAsVector | Stack |stack of pointers to Object, as a vector -------------------+-------------+----------------------------------------- BI_OQueueAsVector | Queue |queue of pointers to Object, as a vector --------------------+-------------+---------------------------------------- BI_ODequeAsVector | Deque |deque of pointers to Object, as a vector -------------------+-------------+---------------------------------------- BI_OBagAsVector | Bag |bag of pointers to Object, as a vector -------------------+-------------+----------------------------------------- BI_OSetAsVector | Set |set of pointers to Object, as a vector -------------------+-------------+--------------------------------------- BI_OArrayAsVector | Array |array of pointers to Object, as a vector -------------------+-------------+---------------------------------------- BI_OSArrayAsVector | Sorted Array|sorted array of pointers to Object, as a | |vector -------------------+-------------+--------------------------------------- BI_TCStackAsVector | Stack |polymorphic stack of pointers to Object, | |as a vector -------------------+-------------+---------------------------------------- BI_TCQueueAsVector | Queue |polymorphic queue of pointers to Object, | |as a vector -------------------+-------------+---------------------------------------- BI_TCDequeAsVector | Deque |polymorphic deque of pointers to Object, | |as a vector -------------------+-------------+---------------------------------------- BI_TCBagAsVector | Bag |polymorphic bag of pointers to Object, | |as a vector -------------------+-------------+---------------------------------------- BI_TCSetAsVector | Set |polymorphic set of pointers to Object, | |as a vector -------------------+-------------+---------------------------------------- BI_TCArrayAsVector | Array |polymorphic array of pointers to Object, | |as a vector -------------------+-------------+---------------------------------------- BI_TCSArrayAsVector| Sorted Array|polymorphic sorted array of pointers to | |Object as a vector -------------------+-------------+----------------------------------------- BI_OStackAsList | Stack |stack of pointers to Object, as a list -------------------+-------------+----------------------------------------- BI_TCStackAsList | Stack |polymorphic stack of pointers to Object, | | as a list -------------------+-------------+---------------------------------------- BI_OQueueAs- | Queue |stack of pointers to Object, as a DoubleList | |double list -------------------+-------------+----------------------------------------- BI_ODequeAs- | Deque |deque of pointers to Object, as a DoubleList | |double list -------------------+-------------+----------------------------------------- BI_TCQueueAs- | Queue |polymorphic stack of pointers to Object, DoubleList | | as a double list -------------------+-------------+----------------------------------------- BI_TCDequeAs- | Deque |polymorphic deque of pointers to Object, DoubleList | | as a double list -------------------------------------------------------------------------- See Also: BIDS Container Classes Class Templates
Borland International Data Structures (BIDS) ============================================== With BIDS, the container is considered as an ADT (abstract data type), and its underlying data structure is independentaly treated as an FDS (fundamental data structure). BIDS also allows separate selections of the type of objects to be stored, and whether to store the objects themselves or pointers to objects. +--------------------------------------------+ |Existing code based on the Object container | |classes will compile and run using the BIDS | |classes, just by linking in the appropriate | |library. | +--------------------------------------------+ BIDS provides direct control over the types of objects stored in a container. The stored data type is simply a value passed as a template parameter. See Also: Container Classes
=========================================== Time instance class summary (LTIME.H) =========================================== Time is a sortable instance class. The time data members and functionality of Time comes from its base class except for the printOn member. You can override this in derived classes to cope with international formatting variations. +----------+ ======== +------+ | BaseTime |---= Time =-----| None | +----------+ ======== +------+ Friend To: None Has Friends: None Constructors: Time() Time(const Time& T); Time(unsigned char H, unsigned char M = 0, unsigned char S = 0, unsigned char D = 0) Member Functions: Time::isA Time::nameOf Time::printOn Time::Time See Also: Container Classes
Time::Time (constructors) =========================== Declarations: Form 1 Time(); Form 2 Time(const Time& T); Form 3 Time(unsigned char H, unsigned char M = 0, unsigned char S = 0, unsigned char D = 0); See Also: Time
Time::Time, Form 1 (constructor) ================================== Declaration: Time(); Remarks: Calls the BaseTime Constructor to create a Time object with the current time. See Also: Time::Time Time::Time, Form 2 Time::Time, Form 3
Time::Time, Form 2 (constructor) ================================== Declaration: Time(const Time& T); Remarks: Copy constructor. See Also: Time::Time Time::Time, Form 1 Time::Time, Form 3
Time::Time, Form 3 (constructor) ================================== Declaration: Time(unsigned char H, unsigned char M = 0, unsigned char S = 0, unsigned char D = 0); Remarks: Creates a Time object with the given hour, minutes, seconds, and hundredths of seconds. See Also: Time::Time Time::Time, Form 1 Time::Time, Form 2
Time::isA (member function) ============================= Declaration: virtual classType isA() const; Remarks: Returns timeClass, the Time class ID. See Also: Time
Time::nameOf (member function) ================================ Declaration: virtual char *nameOf() const; Remarks: Returns Time, the Time class ID string. See Also: Time
Time::printOn (member function) ================================ Declaration: virtual void printOn(ostream& outputStream) const; Remarks: Sends a formatted Time object to the given output stream. The default format is hh:mm:ss:dd a/pm with nonmilitary hours. printOn is really for internal use by the overloaded operator <<. See Also: Time
============================================== Timer instance class summary (TIMER.H) ============================================== Timer is an instance class implementing a stop watch. You can use Timer objects to time program execution by calling the member functions start and stop within your program, and then using time to return the elapsed time. The reset member function resets the elapsed time to zero. Successive starts and stops will accumulate elapsed time until a reset. +------------+ | Timer | +------------+ Friend To: None Has Friends: None Constructor: Timer(); Member Functions: Timer::reset Timer::resolution Timer::start Timer::status Timer::stop Timer::time See Also: Container Classes
Timer::Timer (public constructor) =================================== Declaration: Timer(); Remarks: Creates a Timer object. See Also: Timer
Timer::reset (member function) ================================ Declaration: void reset(); Remarks: Clears the elapsed time accumulated from previous start/stop sequences. See Also: Timer
Timer::resolution (member function) ===================================== Declaration: static double resolution(); Remarks: Determines the timer resolution for all timer objects. This value is hardware and OS dependent. See Also: Timer
Timer::start (member function) ================================ Declaration: void start(); Remarks: Ignored if the timer is running, otherwise starts the timer. The elapsed times from any previous start/stop sequences are accumulated until reset is called. See Also: Timer
Timer::status (member function) ================================ Declaration: int status(); Remarks: Returns 1 if the timer is running. See Also: Timer
Timer::stop (member function) =============================== Declaration: void stop(); Remarks: Stops the timer. The accumulated elapsed time is preserved until a reset call. See Also: Timer
Timer::time (member function) =============================== Declaration: double time(); Remarks: Returns the elapsed time. The precision is given by the value returned by the member function resolution. See Also: Timer
============================================== TShouldDelete class summary (SHDDEL.H) ============================================== TShouldDelete maintains the ownership state of a container. The fate of objects that are removed from a container can be made to depend on whether the container owns its elements or not. Similarly, when a container is destroyed, ownership can dictate the fate of contained objects that are still in scope. As a virtual base class for Container and Association, TShouldDelete provides ownership control for all containers and associations. The member function ownsElements can be used either to report or to change the ownership status of a container. delObj is used to determine if objects in containers or associations should be deleted or not. +--------------+ +-------------+ |TShouldDelete |-----+---| Association | +--------------+ | |-------------| +---| Container | +-------------+ Friend To: None Has Friends: None Constructor: TShouldDelete(DeleteType dt = Delete); Member Functions: TShouldDelete::ownsElements TShouldDelete::delObj See Also: Container Classes
TShouldDelete::TShouldDelete (public constructor) =================================================== Declaration: TShouldDelete( DeleteType dt = Delete ); Remarks: Creates a TShouldDelete object. By default, containers and associations own their elements. DeleteType is an enumeration declared within the class as follows: enum DeleteType { NoDelete, DefDelete, Delete }; See Also: TShouldDelete
TShouldDelete::ownsElements (member function) =============================================== Declaration: int ownsElements(); void ownsElements( int del ); Remarks: The first form returns 1 if the container owns its elements, otherwise it returns 0. The second form changes the ownership status as follows: if del is 0, ownership is turned off if del is nonzero ownership is turned on See Also: TShouldDelete
TShouldDelete::delObj (member function) ========================================= Declaration: int delObj( DeleteType dt ); Remarks: Tests the state of ownership and returns: * 1 if the contained objects should be deleted * 0 if the contained elements should not be deleted The factors determining this are: (i) the current ownership state (ii) the value of dt, as shown in the following table. delObj returns 1 if (dt is Delete) or (dt is DefDelete and the container currently owns its elements). | delObj ownsElements | no | yes -------------+-----+----- NoDelete | no | no DefDelete | no | yes Delete | yes | yes Thus a dt of NoDelete returns 0 (don't delete) regardless of ownership; a dt of Delete returns 1 (do delete) regardless of ownership; and a dt of DefDelete returns 1 (do delete) if the elements are owned, but a 0 (don't delete) if the objects are not owned. See Also: TShouldDelete