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

The DDD_AssetList class. Maintains a list of Data Director assets. More...

#include <DDD_AssetList.h>

Inheritance diagram for DDD_AssetList:
DynamicPtrArray< DDD_AssetBase * >

Public Member Functions

 DDD_AssetList ()
 
 ~DDD_AssetList ()
 
DDD_AssetBaseFind (const std::string &name)
 
bool InList (const std::string &name) const
 
void Replace (const std::string &name, DDD_AssetBase *newAsset)
 
bool MoveUp (DDD_AssetBase *newAsset)
 
bool MoveDown (DDD_AssetBase *newAsset)
 
- Public Member Functions inherited from DynamicPtrArray< DDD_AssetBase * >
unsigned int Size () const
 
 DynamicPtrArray (int initialSize=0)
 
 ~DynamicPtrArray (void)
 
unsigned int Count () const
 
void InsertObject (const DDD_AssetBase * &obj, unsigned int loc)
 
unsigned int InsertObject (const DDD_AssetBase * &obj)
 
void PushObject (const DDD_AssetBase * &obj)
 
void InsertObjectAfter (const DDD_AssetBase * &obj, unsigned int loc)
 
bool DeleteObject (const DDD_AssetBase * &obj)
 
bool DeleteObjectAtIndex (unsigned int index)
 
bool RemoveAndDeallocateObjectAtIndex (unsigned int index)
 
int Position (const DDD_AssetBase * &obj)
 
bool RemoveAndDeallocate (DDD_AssetBase * &obj)
 
void Swap (unsigned int a, unsigned int b)
 
void EmptyList (void)
 
void ClearList (void)
 
DDD_AssetBase * & operator[] (int index)
 
const DDD_AssetBase * & operator[] (int index) const
 
DDD_AssetBase * * InternalArray (void)
 
DynamicPtrArray< DDD_AssetBase * > & operator= (const DynamicPtrArray< DDD_AssetBase * > &right)
 
bool IsEmpty (void) const
 

Additional Inherited Members

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

Detailed Description

The DDD_AssetList class. Maintains a list of Data Director assets.

Constructor & Destructor Documentation

Constructor

Destructor The DDD_AssetList does NOT manage the storage of its assets. Prior to calling this destructor, the calling code should free all of the assets in this list.

Member Function Documentation

DDD_AssetBase* Find ( const std::string &  name)
Returns
Returns a pointer to the asset with the given instance name Returns NULL if the asset is not found
Parameters
nameThe name of the asset to find
bool InList ( const std::string &  name) const

Searches list for asset with given instance name; unlike Find(), this is const-safe

Parameters
nameThe name of the asset to find
Returns
true if asset with matching instance name found; false otherwise
bool MoveDown ( DDD_AssetBase newAsset)

Moves an asset "DOWN" in the list, which means it gets moved closer towards the beginning of the list. (It moves "DOWN" in draw order so it draws earlier)

Parameters
newAssetThe asset to reorder
Returns
True if if the asset was moved, false otherwise
bool MoveUp ( DDD_AssetBase newAsset)

Moves an asset "UP" in the list, which means it gets moved further towards the end of the list. (It moves "UP" in draw order so it draws later)

Parameters
newAssetThe asset to reorder
Returns
True if if the asset was moved, false otherwise
void Replace ( const std::string &  name,
DDD_AssetBase newAsset 
)

Finds the asset with the given name and replaces it with the supplied asset

Parameters
nameThe name of the asset to find
newAssetPointer to the asset that will replace the asset

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