DataDirector API
Public Member Functions | List of all members
DDD_RevertableAttributeList Class Reference

List of revertable attributes. More...

#include <DDD_RevertableAttribute.h>

Inheritance diagram for DDD_RevertableAttributeList:
DynamicPtrArray< DDD_RevertableAttribute * >

Public Member Functions

 ~DDD_RevertableAttributeList ()
 
void Insert (DDD_AttributeBase *defaultAttribute, DDD_AttributeBase *attribute)
 
void RemoveAttribute (DDD_AttributeBase *attribute)
 
void RevertAll ()
 
void SetAttribute (DDD_AttributeBase *attribute, DDD_AttributeBase *param=NULL)
 
void ClearAllAttributes ()
 
DDD_RevertableAttributeFind (const std::string &name)
 
DDD_RevertableAttributeFindByDefaultAttribute (const DDD_AttributeBase *defaultAttr)
 
DDD_RevertableAttributeFindByAttribute (const DDD_AttributeBase *attr)
 
- Public Member Functions inherited from DynamicPtrArray< DDD_RevertableAttribute * >
unsigned int Size () const
 
 DynamicPtrArray (int initialSize=0)
 
 ~DynamicPtrArray (void)
 
unsigned int Count () const
 
void InsertObject (const DDD_RevertableAttribute * &obj, unsigned int loc)
 
unsigned int InsertObject (const DDD_RevertableAttribute * &obj)
 
void PushObject (const DDD_RevertableAttribute * &obj)
 
void InsertObjectAfter (const DDD_RevertableAttribute * &obj, unsigned int loc)
 
bool DeleteObject (const DDD_RevertableAttribute * &obj)
 
bool DeleteObjectAtIndex (unsigned int index)
 
bool RemoveAndDeallocateObjectAtIndex (unsigned int index)
 
int Position (const DDD_RevertableAttribute * &obj)
 
bool RemoveAndDeallocate (DDD_RevertableAttribute * &obj)
 
void Swap (unsigned int a, unsigned int b)
 
void EmptyList (void)
 
void ClearList (void)
 
DDD_RevertableAttribute * & operator[] (int index)
 
const DDD_RevertableAttribute * & operator[] (int index) const
 
DDD_RevertableAttribute * * InternalArray (void)
 
DynamicPtrArray< DDD_RevertableAttribute * > & operator= (const DynamicPtrArray< DDD_RevertableAttribute * > &right)
 
bool IsEmpty (void) const
 

Additional Inherited Members

- Protected Member Functions inherited from DynamicPtrArray< DDD_RevertableAttribute * >
void GrowArray (void)
 
void Size (unsigned int newSize)
 
- Protected Attributes inherited from DynamicPtrArray< DDD_RevertableAttribute * >
unsigned int _count
 
DDD_RevertableAttribute * * _objects
 

Detailed Description

List of revertable attributes.

Constructor & Destructor Documentation

Destructor

Member Function Documentation

void ClearAllAttributes ( )

Clears the attributes, default attributes remain however

DDD_RevertableAttribute* Find ( const std::string &  name)

Finds the revertable attribute by name

Parameters
nameName to look for.
Returns
Pointer to revertable attribute with matching name; NULL if not found
DDD_RevertableAttribute* FindByAttribute ( const DDD_AttributeBase attr)

Finds the revertable attribute by attribute instance.

Parameters
attrAttribute instance to look for.
Returns
Pointer to revertable attribute with matching attribute; NULL if not found
DDD_RevertableAttribute* FindByDefaultAttribute ( const DDD_AttributeBase defaultAttr)

Finds the revertable attribute by default attribute instance. This is more efficient than the Find() method since it uses faster pointer comparisons.

Parameters
defaultAttrDefault attribute to look for.
Returns
Pointer to revertable attribute with matching default attribute; NULL if not found
void Insert ( DDD_AttributeBase defaultAttribute,
DDD_AttributeBase attribute 
)

Inserts a new attribute into the list using both attributes.

Parameters
defaultAttributeAttribute with default value- this will not be changed by either this list or DDD_RevertableAttribute
attributeAttribute to be reverted.
void RemoveAttribute ( DDD_AttributeBase attribute)
Parameters
attribute
void RevertAll ( )

Resets all attributes based on param values.

void SetAttribute ( DDD_AttributeBase attribute,
DDD_AttributeBase param = NULL 
)

Sets the attribute, either by searching for Param name

Parameters
attributeNew attribute instance replacement. By default, the name of this attribute is matched to the corresponding param name.
paramIf this is specified, this method does a quicker check based on the param pointer.

The documentation for this class was generated from the following file: