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

FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION > Class Template Reference

#include <ReadOnlyNamedCollection.h>

Inherits FdoIDisposable.

Inheritance diagram for FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >:

[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 ()

Constructor & Destructor Documentation

template<class OBJ, class BASECOLLECTION>
FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >::FdoReadOnlyNamedCollection  )  [inline, protected]
 

Definition at line 40 of file ReadOnlyNamedCollection.h.

template<class OBJ, class BASECOLLECTION>
FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >::FdoReadOnlyNamedCollection BASECOLLECTION *  baseCollection  )  [inline, protected]
 

Read Only Named Collection constructor.

Parameters:
baseCollection Input collection to wrap around. This collection provides read-only access to the base collection.

Definition at line 48 of file ReadOnlyNamedCollection.h.

References FDO_SAFE_ADDREF.


Member Function Documentation

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

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

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

Definition at line 118 of file ReadOnlyNamedCollection.h.

template<class OBJ, class BASECOLLECTION>
virtual OBJ* FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >::FindItem const wchar_t *  name  )  const [inline, virtual]
 

Finds the item in the base collection with the specified name.

Parameters:
name Input item name
Returns:
Returns the item in the base collection with the specified name. Returns NULL if the item was not found.

Definition at line 104 of file ReadOnlyNamedCollection.h.

template<class OBJ, class BASECOLLECTION>
virtual FdoInt32 FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >::GetCount  )  const [inline, virtual]
 

Gets the number of items in the base collection.

Returns:
Returns number of items in the base collection

Definition at line 61 of file ReadOnlyNamedCollection.h.

References FdoInt32.

template<class OBJ, class BASECOLLECTION>
virtual OBJ* FdoReadOnlyNamedCollection< OBJ, BASECOLLECTION >::GetItem const wchar_t *  name  )  const [inline, virtual]
 

Gets the item in the base collection with the specified name. Throws an exception if the item is not found.

Parameters:
name Input item name
Returns:
Returns the item in the base collection with the specified name

Definition at line 89 of file ReadOnlyNamedCollection.h.

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

Gets the item in the base 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 base collection at the specified index

Definition at line 75 of file ReadOnlyNamedCollection.h.

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

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

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

Definition at line 132 of file ReadOnlyNamedCollection.h.

References FdoInt32.


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