class CollectionOf

All collections are created using the form 'CollOf<Type>' and contain collections of _pointers_ to 'Type'. More...

Definition#include <sysadm/CollectionOf.h>
Template formCollectionOf<template class Type>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

All collections are created using the form 'CollOf<Type>' and contain collections of _pointers_ to 'Type'. These pointer are not owned by the collection, though there is a utility function at the bottom of this header that can be used to delete the contents of a collection.

Collections of 'Type' can be iterated over by using IteratorOver<Type>. Though, in the case of ArrayOf, care must be taken. ArrayOf, because it can be used just like a 'C' vector, may have NULL elements, which may cause early termination of an iterator. Arrays can be iterated over using a traditional 'for()' loop and index safely.

Collections should not be added to or removed from directly while being iterated over. To do so would confuse the iterator. Use the provided iterator insert/remove operations instead.

Class CollectionOf is a generic, non-ordered collection or 'Bag'.

inline  CollectionOf ()

inline  CollectionOf ( const CollectionOf& copy )

inline ~ CollectionOf ()

This destructor is intentionally non-virtual. All state should be in the impl class, which is destructed here. Subclasses of this template should have empty destructors!!!

inline CollectionOf&  operator= ( const CollectionOf& copy )

inline int  getSize ()

[const]

inline void  add ( Type* element )

inline Type*  remove ( const Type& element )

inline Type*  removePointer ( const Type* element )

inline void  removeAll ()

inline  CollectionOf ( CollectionOfImpl* adoptedImpl )

[protected]

inline CollectionOfImpl*  getImpl ()

[protected]

inline const CollectionOfImpl*  getImpl ()

[protected const]


Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36.