FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoCollection< OBJ, EXC > Class Template Reference

#include <Collection.h>

Inherits FdoIDisposable.

Inherited by FdoNamedCollection< OBJ, EXC >, FdoStack< OBJ, EXC > [private], and FdoStack< StackElement, FdoXmlException > [private].

Inheritance diagram for FdoCollection< OBJ, EXC >:

[legend]
List of all members.

Detailed Description

template<class OBJ, class EXC>
class FdoCollection< OBJ, EXC >

FdoCollection is an abstract template class for defining standard collection access for all collection classes.

Definition at line 29 of file Collection.h.


Public Member Functions

virtual FdoInt32 Add (OBJ *value)
 Adds the specified item to the end of the collection. Returns the index of the newly added item.
virtual void Clear ()
 Removes all items from the collection.
virtual bool Contains (const OBJ *value) const
 Returns true if the collection contains the specified item, false otherwise.
virtual FdoInt32 GetCount () const
 Gets the number of items in the collection.
virtual OBJ * GetItem (FdoInt32 index) const
 Gets the item in the collection at the specified index. Throws an invalid argument exception if the index is out of range.
virtual FdoInt32 IndexOf (const OBJ *value) const
 Returns the index of the specified item in the collection or -1 if the item does not exist.
virtual void Insert (FdoInt32 index, OBJ *value)
 Inserts the specified item at the specified index within the collection. Items following the insertion point are moved down to accommodate the new item. Throws an invalid argument exception if the specified index is out of range.
virtual void Remove (const OBJ *value)
 Removes the specified item from the collection. Throws an invalid argument exception if the item does not exist within the collection.
virtual void RemoveAt (FdoInt32 index)
 Removes the specified item from the collection. Throws an invalid argument exception if the item does not exist within the collection.
virtual void SetItem (FdoInt32 index, OBJ *value)
 Sets the item in the collection at the specified index to the specified value. Throws an invalid argument exception if the index is out of range.

Protected Member Functions

 FdoCollection ()
virtual ~FdoCollection ()

Static Protected Attributes

const FdoInt32 INIT_CAPACITY = 10

Constructor & Destructor Documentation

template<class OBJ, class EXC>
FdoCollection< OBJ, EXC >::FdoCollection  )  [inline, protected]
 

Definition at line 34 of file Collection.h.

template<class OBJ, class EXC>
virtual FdoCollection< OBJ, EXC >::~FdoCollection  )  [inline, protected, virtual]
 

Definition at line 41 of file Collection.h.


Member Function Documentation

template<class OBJ, class EXC>
virtual FdoInt32 FdoCollection< OBJ, EXC >::Add OBJ *  value  )  [inline, virtual]
 

Adds the specified item to the end of the collection. Returns the index of the newly added item.

Parameters:
value Input value
Returns:
Returns the index of the newly added item

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoIdentifierCollection, FdoPhysicalElementMappingCollection< OBJ >, FdoDataPropertyDefinitionCollection, FdoSchemaCollection< OBJ >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, FdoNamedCollection< ElementMap, FdoException >, FdoPhysicalElementMappingCollection< FdoXmlClassMapping >, FdoPhysicalElementMappingCollection< FdoXmlElementMapping >, FdoSchemaCollection< FdoClassDefinition >, FdoSchemaCollection< FdoFeatureSchema >, FdoSchemaCollection< FdoFeatureClass >, FdoSchemaCollection< FdoPropertyDefinition >, and FdoSchemaCollection< FdoDataPropertyDefinition >.

Definition at line 110 of file Collection.h.

Referenced by FdoNamedCollection< ElementMap, FdoException >::Add(), FdoIdentifierCollection::Add(), and FdoStack< StackElement, FdoXmlException >::Push().

template<class OBJ, class EXC>
virtual void FdoCollection< OBJ, EXC >::Clear  )  [inline, virtual]
 

Removes all items from the collection.

Returns:
Returns nothing

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoStack< OBJ, EXC >, FdoIdentifierCollection, FdoPhysicalElementMappingCollection< OBJ >, FdoSchemaCollection< OBJ >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, FdoNamedCollection< ElementMap, FdoException >, FdoStack< StackElement, FdoXmlException >, FdoPhysicalElementMappingCollection< FdoXmlClassMapping >, FdoPhysicalElementMappingCollection< FdoXmlElementMapping >, FdoSchemaCollection< FdoClassDefinition >, FdoSchemaCollection< FdoFeatureSchema >, FdoSchemaCollection< FdoFeatureClass >, FdoSchemaCollection< FdoPropertyDefinition >, and FdoSchemaCollection< FdoDataPropertyDefinition >.

Definition at line 155 of file Collection.h.

Referenced by FdoStack< StackElement, FdoXmlException >::Clear(), FdoNamedCollection< ElementMap, FdoException >::Clear(), and FdoIdentifierCollection::Clear().

template<class OBJ, class EXC>
virtual bool FdoCollection< OBJ, EXC >::Contains const OBJ *  value  )  const [inline, virtual]
 

Returns true if the collection contains the specified item, false otherwise.

Parameters:
value Input value
Returns:
Returns true if the collection contains the specified item, false otherwise

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, and FdoNamedCollection< ElementMap, FdoException >.

Definition at line 234 of file Collection.h.

template<class OBJ, class EXC>
virtual FdoInt32 FdoCollection< OBJ, EXC >::GetCount  )  const [inline, virtual]
 

Gets the number of items in the collection.

Returns:
Returns number of items in the collection

Definition at line 58 of file Collection.h.

Referenced by FdoSchemaCollection< FdoDataPropertyDefinition >::_StartChanges(), FdoNamedCollection< ElementMap, FdoException >::Contains(), FdoIdentifierCollection::Contains(), FdoNamedCollection< ElementMap, FdoException >::FindItem(), FdoIdentifierCollection::IndexOf(), FdoStack< StackElement, FdoXmlException >::Peek(), and FdoStack< StackElement, FdoXmlException >::Pop().

template<class OBJ, class EXC>
virtual OBJ* FdoCollection< OBJ, EXC >::GetItem FdoInt32  index  )  const [inline, virtual]
 

Gets the item in the collection at the specified index. Throws an invalid argument exception if the index is out of range.

Parameters:
index Input index
Returns:
Returns the item in the collection at the specified index

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, and FdoNamedCollection< ElementMap, FdoException >.

Definition at line 72 of file Collection.h.

Referenced by FdoNamedCollection< ElementMap, FdoException >::GetItem(), FdoIdentifierCollection::GetItem(), and FdoStack< StackElement, FdoXmlException >::Peek().

template<class OBJ, class EXC>
virtual FdoInt32 FdoCollection< OBJ, EXC >::IndexOf const OBJ *  value  )  const [inline, virtual]
 

Returns the index of the specified item in the collection or -1 if the item does not exist.

Parameters:
value Input value
Returns:
Returns the index of the specified item in the collection or -1 if the item does not exist

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, and FdoNamedCollection< ElementMap, FdoException >.

Definition at line 257 of file Collection.h.

Referenced by FdoNamedCollection< ElementMap, FdoException >::IndexOf(), and FdoIdentifierCollection::IndexOf().

template<class OBJ, class EXC>
virtual void FdoCollection< OBJ, EXC >::Insert FdoInt32  index,
OBJ *  value
[inline, virtual]
 

Inserts the specified item at the specified index within the collection. Items following the insertion point are moved down to accommodate the new item. Throws an invalid argument exception if the specified index is out of range.

Parameters:
index Input index
value Input value
Returns:
Returns nothing

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoIdentifierCollection, FdoPhysicalElementMappingCollection< OBJ >, FdoDataPropertyDefinitionCollection, FdoSchemaCollection< OBJ >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, FdoNamedCollection< ElementMap, FdoException >, FdoPhysicalElementMappingCollection< FdoXmlClassMapping >, FdoPhysicalElementMappingCollection< FdoXmlElementMapping >, FdoSchemaCollection< FdoClassDefinition >, FdoSchemaCollection< FdoFeatureSchema >, FdoSchemaCollection< FdoFeatureClass >, FdoSchemaCollection< FdoPropertyDefinition >, and FdoSchemaCollection< FdoDataPropertyDefinition >.

Definition at line 132 of file Collection.h.

Referenced by FdoNamedCollection< ElementMap, FdoException >::Insert(), and FdoIdentifierCollection::Insert().

template<class OBJ, class EXC>
virtual void FdoCollection< OBJ, EXC >::Remove const OBJ *  value  )  [inline, virtual]
 

Removes the specified item from the collection. Throws an invalid argument exception if the item does not exist within the collection.

Parameters:
value Input value
Returns:
Returns nothing

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoIdentifierCollection, FdoPhysicalElementMappingCollection< OBJ >, FdoSchemaCollection< OBJ >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, FdoNamedCollection< ElementMap, FdoException >, FdoPhysicalElementMappingCollection< FdoXmlClassMapping >, FdoPhysicalElementMappingCollection< FdoXmlElementMapping >, FdoSchemaCollection< FdoClassDefinition >, FdoSchemaCollection< FdoFeatureSchema >, FdoSchemaCollection< FdoFeatureClass >, FdoSchemaCollection< FdoPropertyDefinition >, and FdoSchemaCollection< FdoDataPropertyDefinition >.

Definition at line 176 of file Collection.h.

Referenced by FdoNamedCollection< ElementMap, FdoException >::Remove(), and FdoIdentifierCollection::Remove().

template<class OBJ, class EXC>
virtual void FdoCollection< OBJ, EXC >::RemoveAt FdoInt32  index  )  [inline, virtual]
 

Removes the specified item from the collection. Throws an invalid argument exception if the item does not exist within the collection.

Parameters:
index Input index
Returns:
Returns nothing

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoIdentifierCollection, FdoPhysicalElementMappingCollection< OBJ >, FdoPropertyDefinitionCollection, FdoSchemaCollection< OBJ >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, FdoNamedCollection< ElementMap, FdoException >, FdoPhysicalElementMappingCollection< FdoXmlClassMapping >, FdoPhysicalElementMappingCollection< FdoXmlElementMapping >, FdoSchemaCollection< FdoClassDefinition >, FdoSchemaCollection< FdoFeatureSchema >, FdoSchemaCollection< FdoFeatureClass >, FdoSchemaCollection< FdoPropertyDefinition >, and FdoSchemaCollection< FdoDataPropertyDefinition >.

Definition at line 208 of file Collection.h.

Referenced by FdoStack< StackElement, FdoXmlException >::Pop(), FdoNamedCollection< ElementMap, FdoException >::RemoveAt(), and FdoIdentifierCollection::RemoveAt().

template<class OBJ, class EXC>
virtual void FdoCollection< OBJ, EXC >::SetItem FdoInt32  index,
OBJ *  value
[inline, virtual]
 

Sets the item in the collection at the specified index to the specified value. Throws an invalid argument exception if the index is out of range.

Parameters:
index Input index
value Input value
Returns:
Returns nothing

Reimplemented in FdoNamedCollection< OBJ, EXC >, FdoIdentifierCollection, FdoPhysicalElementMappingCollection< OBJ >, FdoDataPropertyDefinitionCollection, FdoSchemaCollection< OBJ >, FdoNamedCollection< FdoFunctionDefinition, FdoConnectionException >, FdoNamedCollection< FdoDataPropertyDefinition, FdoSchemaException >, FdoNamedCollection< PrefixMapping, FdoXmlException >, FdoNamedCollection< ClassRef, FdoException >, FdoNamedCollection< FdoClassDefinition, FdoSchemaException >, FdoNamedCollection< UniqueConstraintRef, FdoException >, FdoNamedCollection< FdoXmlClassMapping, FdoCommandException >, FdoNamedCollection< FdoXmlAttribute, FdoXmlException >, FdoNamedCollection< FdoPropertyDefinition, FdoSchemaException >, FdoNamedCollection< FdoXmlElementMapping, FdoCommandException >, FdoNamedCollection< OBJ, FdoSchemaException >, FdoNamedCollection< FdoFeatureSchema, FdoSchemaException >, FdoNamedCollection< OBJ, FdoCommandException >, FdoNamedCollection< StringsRef, FdoException >, FdoNamedCollection< FdoFeatureClass, FdoSchemaException >, FdoNamedCollection< FdoDictionaryElement, FdoException >, FdoNamedCollection< ElementMap, FdoException >, FdoPhysicalElementMappingCollection< FdoXmlClassMapping >, FdoPhysicalElementMappingCollection< FdoXmlElementMapping >, FdoSchemaCollection< FdoClassDefinition >, FdoSchemaCollection< FdoFeatureSchema >, FdoSchemaCollection< FdoFeatureClass >, FdoSchemaCollection< FdoPropertyDefinition >, and FdoSchemaCollection< FdoDataPropertyDefinition >.

Definition at line 90 of file Collection.h.

Referenced by FdoNamedCollection< ElementMap, FdoException >::SetItem(), and FdoIdentifierCollection::SetItem().


Member Data Documentation

template<class OBJ, class EXC>
const FdoInt32 FdoCollection< OBJ, EXC >::INIT_CAPACITY = 10 [static, protected]
 

Definition at line 32 of file Collection.h.


The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.