FDO API Reference Feature Data Objects

FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION > Class Template Reference

#include <ReadOnlyNamedCollection.h>

Inherits FdoIDisposable.

Inheritance diagram for FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class OBJ, class BASECOLLECTION>
class FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >

FdoReadOnlyNamedCollection is an abstract template class that can be wrapped around a base collection of type specified by the BASECOLLECTION template argument. It allows access to the members of the base collection but disallows the adding or removing of members to or from the base collection.

Note1: the OBJ template argument must be set to the type of the members of the BASECOLLECTION.

Note2: BASECOLLECTION must be a type based on FdoNamedCollection.

Definition at line 37 of file ReadOnlyNamedCollection.h.


Public Member Functions

virtual bool Contains (const OBJ *value) const
 Returns true if the base collection contains the specified item, false otherwise.
virtual OBJ * FindItem (const wchar_t *name) const
 Finds the item in the base collection with the specified name.
virtual FdoInt32 GetCount () const
 Gets the number of items in the base collection.
virtual OBJ * GetItem (const wchar_t *name) const
 Gets the item in the base collection with the specified name. Throws an exception if the item is not found.
virtual OBJ * GetItem (FdoInt32 index) const
 Gets the item in the base 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 base collection or -1 if the item does not exist.

Protected Member Functions

 FdoReadOnlyNamedCollection (BASECOLLECTION *baseCollection)
 Read Only Named Collection constructor.
 FdoReadOnlyNamedCollection ()

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