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

FdoSchemaCollection< OBJ > Class Template Reference

#include <SchemaCollection.h>

Inherits FdoNamedCollection< OBJ, FdoSchemaException >.

Inheritance diagram for FdoSchemaCollection< OBJ >:

[legend]
List of all members.

Detailed Description

template<class OBJ>
class FdoSchemaCollection< OBJ >

FdoSchemaCollection is an abstract template class that is used to define schema collections; FdoClassCollection, FdoDatapropertyDefinitionCollection, FdoFeatureClassCollection, FdoFeatureSchemaCollection, FdoPropertyDefinitionCollection, and FdoRelationCollection.

Definition at line 35 of file SchemaCollection.h.


Public Member Functions

virtual FDO_API FdoInt32 Add (OBJ *value)
 Adds the specified item to the end of the collection. Returns the index of the newly added item.
virtual FDO_API void Clear ()
 Removes all items from the collection.
virtual FDO_API 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 FDO_API 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 FDO_API 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 FDO_API 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

virtual void _AcceptChanges ()
virtual void _BeginChangeProcessing ()
virtual void _EndChangeProcessing ()
virtual void _RejectChanges ()
virtual void _StartChanges ()
 FdoSchemaCollection (FdoSchemaElement *parent)
 FdoSchemaCollection ()
 DOXYGEN-IGNORE
virtual ~FdoSchemaCollection ()

Protected Attributes

FdoByte m_changeInfoState
 FdoFeatureSchema::RejectChanges() support.
OBJ ** m_listCHANGED
FdoSchemaElementm_parent
bool m_setItemParent
FdoInt32 m_sizeCHANGED

Static Protected Attributes

const unsigned int CHANGEINFO_PRESENT = 0x00000001
 States stored in the m_changeInfoState bitfield flag.
const unsigned int CHANGEINFO_PROCESSED = 0x00000004
const unsigned int CHANGEINFO_PROCESSING = 0x00000002

Constructor & Destructor Documentation

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

DOXYGEN-IGNORE

Definition at line 40 of file SchemaCollection.h.

template<class OBJ>
FdoSchemaCollection< OBJ >::FdoSchemaCollection FdoSchemaElement parent  )  [inline, protected]
 

Definition at line 44 of file SchemaCollection.h.

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

When the collection disappears, the ownership does too. So NULL out the parent. This is necessary because the parent reference within items is not refcounted to avoid circular references/memory leaks.

Warning:
The pitem->GetParent() should always equal m_parent, but we cannot verify this because the call to pitem->GetParent() might AddRef() an item that has already been disposed. So we just NULL it out.
Dispose of change information

Definition at line 56 of file SchemaCollection.h.


Member Function Documentation

template<class OBJ>
virtual void FdoSchemaCollection< OBJ >::_AcceptChanges  )  [inline, protected, virtual]
 

Already processed.

Reset.

Accept changes to items once in this collection.

Release from change list.

Accept changes to items currently in this collection.

Really remove items marked for deletion.

Definition at line 396 of file SchemaCollection.h.

template<class OBJ>
virtual void FdoSchemaCollection< OBJ >::_BeginChangeProcessing  )  [inline, protected, virtual]
 

Already marked for processing.

Definition at line 476 of file SchemaCollection.h.

template<class OBJ>
virtual void FdoSchemaCollection< OBJ >::_EndChangeProcessing  )  [inline, protected, virtual]
 

Processing flag already cleared.

Definition at line 492 of file SchemaCollection.h.

template<class OBJ>
virtual void FdoSchemaCollection< OBJ >::_RejectChanges  )  [inline, protected, virtual]
 

Already processed.

Restore. Reject changes to items currently in this collection.

Reset.

Reject changes to items now in this collection.

Definition at line 435 of file SchemaCollection.h.

template<class OBJ>
virtual void FdoSchemaCollection< OBJ >::_StartChanges  )  [inline, protected, virtual]
 

Definition at line 374 of file SchemaCollection.h.

Referenced by FdoSchemaCollection< FdoDataPropertyDefinition >::Add(), FdoSchemaCollection< FdoDataPropertyDefinition >::Clear(), FdoSchemaCollection< FdoDataPropertyDefinition >::Insert(), FdoSchemaCollection< FdoDataPropertyDefinition >::Remove(), FdoSchemaCollection< FdoDataPropertyDefinition >::RemoveAt(), and FdoSchemaCollection< FdoDataPropertyDefinition >::SetItem().

template<class OBJ>
virtual FDO_API FdoInt32 FdoSchemaCollection< OBJ >::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

Validate parentage for object to add. Membership in a collection implys parentage, and a object can only have one parent.

Adding to a non-owning class does not change the state.

Warning:
Do not change states during Accept/RejectChanges.

Reimplemented from FdoNamedCollection< OBJ, FdoSchemaException >.

Reimplemented in FdoDataPropertyDefinitionCollection.

Definition at line 168 of file SchemaCollection.h.

Referenced by FdoSchemaCollection< FdoDataPropertyDefinition >::_RejectChanges().

template<class OBJ>
virtual FDO_API void FdoSchemaCollection< OBJ >::Clear  )  [inline, virtual]
 

Removes all items from the collection.

Returns:
Returns nothing

When an object is removed from a collection, that collection's owner is no longer the object's parent.

Reimplemented from FdoNamedCollection< OBJ, FdoSchemaException >.

Definition at line 260 of file SchemaCollection.h.

template<class OBJ>
virtual FDO_API void FdoSchemaCollection< OBJ >::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

Validate parentage for object to add. Membership in a collection implys parentage, and a object can only have one parent.

OK, just restoring collection.

Adding to a non-owning class does not change the state.

Warning:
Do not change states during Accept/RejectChanges.

Reimplemented from FdoNamedCollection< OBJ, FdoSchemaException >.

Reimplemented in FdoDataPropertyDefinitionCollection.

Definition at line 217 of file SchemaCollection.h.

template<class OBJ>
virtual FDO_API void FdoSchemaCollection< OBJ >::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

Cast drops const.

When an object is removed from a collection, that collection's owner is no longer the object's parent.

Reimplemented from FdoNamedCollection< OBJ, FdoSchemaException >.

Definition at line 298 of file SchemaCollection.h.

template<class OBJ>
virtual FDO_API void FdoSchemaCollection< OBJ >::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

When an object is removed from a collection, that collection's owner is no longer the object's parent.

Reimplemented from FdoNamedCollection< OBJ, FdoSchemaException >.

Reimplemented in FdoPropertyDefinitionCollection.

Definition at line 333 of file SchemaCollection.h.

Referenced by FdoSchemaCollection< FdoDataPropertyDefinition >::_AcceptChanges().

template<class OBJ>
virtual FDO_API void FdoSchemaCollection< OBJ >::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

Validate parentage for object to add. Membership in a collection implys parentage, and a object can only have one parent.

OK, just restoring collection.

Adding to a non-owning class does not change the state.

Warning:
Do not change states during Accept/RejectChanges.

When an object is removed from a collection, that collection's owner is no longer the object's parent.

Reimplemented from FdoNamedCollection< OBJ, FdoSchemaException >.

Reimplemented in FdoDataPropertyDefinitionCollection.

Definition at line 104 of file SchemaCollection.h.


Member Data Documentation

template<class OBJ>
const unsigned int FdoSchemaCollection< OBJ >::CHANGEINFO_PRESENT = 0x00000001 [static, protected]
 

States stored in the m_changeInfoState bitfield flag.

Definition at line 362 of file SchemaCollection.h.

template<class OBJ>
const unsigned int FdoSchemaCollection< OBJ >::CHANGEINFO_PROCESSED = 0x00000004 [static, protected]
 

Definition at line 364 of file SchemaCollection.h.

template<class OBJ>
const unsigned int FdoSchemaCollection< OBJ >::CHANGEINFO_PROCESSING = 0x00000002 [static, protected]
 

Definition at line 363 of file SchemaCollection.h.

template<class OBJ>
FdoByte FdoSchemaCollection< OBJ >::m_changeInfoState [protected]
 

FdoFeatureSchema::RejectChanges() support.

Definition at line 370 of file SchemaCollection.h.

template<class OBJ>
OBJ** FdoSchemaCollection< OBJ >::m_listCHANGED [protected]
 

Definition at line 371 of file SchemaCollection.h.

template<class OBJ>
FdoSchemaElement* FdoSchemaCollection< OBJ >::m_parent [protected]
 

Definition at line 366 of file SchemaCollection.h.

template<class OBJ>
bool FdoSchemaCollection< OBJ >::m_setItemParent [protected]
 

Definition at line 367 of file SchemaCollection.h.

template<class OBJ>
FdoInt32 FdoSchemaCollection< OBJ >::m_sizeCHANGED [protected]
 

Definition at line 372 of file SchemaCollection.h.


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