DataDirector API
Public Member Functions | Protected Member Functions | List of all members
DDD_StructuredMemoryAsset Class Reference
Inheritance diagram for DDD_StructuredMemoryAsset:
DDD_AssetBase DDD_AttributeObserver DDD_AttributeContainer DDD_Base DDD_LogFacade

Public Member Functions

 DDD_StructuredMemoryAsset (DDD_AssetContainer *container)
 
virtual ~DDD_StructuredMemoryAsset ()
 
virtual const char * Description ()
 
virtual void PopulateAttributeList ()
 
virtual void Calculate (double time)
 
virtual void Start ()
 
virtual void Stop ()
 
virtual void Pause ()
 
virtual void Resume ()
 
virtual bool Live ()
 
virtual const char * ClassName ()
 
void OnAttributeChanged (DDD_AttributeBase *attribute)
 
void SetParams (const DDD_AttributeList &params)
 
- Public Member Functions inherited from DDD_AssetBase
 DDD_AssetBase (DDD_AssetContainer *container)
 
virtual ~DDD_AssetBase ()
 
const char * DataDirectorVersion ()
 
DDD_AttributeBaseGetAttribute (const char *attributeName)
 
DDD_AttributeBaseGetAttribute (int index)
 
const char * GetAttributeNames ()
 
DDD_AssetContainerGetContainer ()
 
int NumberOfConnections ()
 
int NumberOfAttributes ()
 
virtual void AddDynamicAttribute (DDD_AttributeBase *attrib)
 
virtual void RefreshAttributesList ()
 
bool AddAssetObserver (DDD_AssetObserver *observer)
 
bool RemoveAssetObserver (DDD_AssetObserver *observer)
 
void RevertAttributes ()
 
virtual DDD_AttributeBaseFindAttributeLocalScope (const std::string &name, void *userData)
 
virtual void ExecuteLuaScript (const char *script, void *userData)
 
virtual bool EvaluateLuaScript (const char *script, void *userData)
 
- Public Member Functions inherited from DDD_Base
 DDD_Base ()
 
virtual ~DDD_Base ()
 
const char * GetInstanceName () const
 
virtual void SetInstanceName (const char *name)
 

Protected Member Functions

void CreateAttribute (std::string &attrName, ChunkAttribute *attr, bool receiveMode)
 
virtual DDD_AttributeBaseGetDictionaryAttribute (const char *attributeName)
 
void AddExposedParamsAsAttributes ()
 
void RemoveBaseClassParams (const DDD_AttributeList &params, DDD_AttributeList &newParams)
 
- Protected Member Functions inherited from DDD_AssetBase
void NotifyAttributeListAdded ()
 
void NotifyAttributeListDeleted ()
 
void CreateLua ()
 
void DestroyLua ()
 
virtual void GenerateInstanceName (const DDD_AssetList &assetList)
 

Additional Inherited Members

- Static Public Member Functions inherited from DDD_AssetBase
static bool IsAssetNameLegal (const std::string &assetName)
 
- Static Public Member Functions inherited from DDD_LogFacade
static void LogDebug (const char *format,...)
 
static void LogInfo (const char *format,...)
 
static void LogWarning (const char *format,...)
 
static void LogError (const char *format,...)
 
- Protected Attributes inherited from DDD_AssetBase
DDD_AttributeList _attributes
 
bool _refreshAttributeList
 
DDD_AssetContainer_container
 
void * _luaState
 
AssetObserverList _assetObserverList
 
- Protected Attributes inherited from DDD_Base
std::string _instanceName
 
DDD_AttributeList _params
 

Constructor & Destructor Documentation

Constructor

Parameters
containerThe container that owns this asset
virtual ~DDD_StructuredMemoryAsset ( )
virtual

Destructor

Member Function Documentation

void AddExposedParamsAsAttributes ( )
protected

Add the exposed params to the attribute list

virtual void Calculate ( double  time)
virtual

calculate to pump the asset

Implements DDD_AssetBase.

virtual const char* ClassName ( )
virtual

Returns asset type (class) name

Implements DDD_AssetBase.

void CreateAttribute ( std::string &  attrName,
ChunkAttribute attr,
bool  receiveMode 
)
protected

Creates a DataDirector attribute for the specified ChunkAttribute and also inserts it into the asset's attribute list and sets the back pointer between the StructuredMemory atribute and the DataDirector attribute

Parameters
attrNameThe name of the attribute, e.g. "datagram.attribute"
attrThe StructuredMemory attribute as specified by the XML config file
receiveModeTrue if this attribute is a receive attribute (i.e. it gets set by an inbound chunk) False if this attribute is a send attribute (i.e. it gets set from an outbound chunk)
virtual const char* Description ( )
inlinevirtual

Describes the Asset (for UI)

Implements DDD_AssetBase.

virtual DDD_AttributeBase* GetDictionaryAttribute ( const char *  attributeName)
protectedvirtual

Gets an attribute from the assets internal dictionary and add it to the list of published attributes for the asset.

Parameters
attributeNameThe name of the attribute to get
Returns
A pointer to the attribute or NULL if it doesn't exist.

Implements DDD_AssetBase.

virtual bool Live ( )
virtual

Is this asset currently running?

Implements DDD_AssetBase.

void OnAttributeChanged ( DDD_AttributeBase attribute)
virtual

A callback method that will be called when the attribute being observed changes if this observer has registered to be notified on attribute change

Parameters
attributeA pointer to the attribute that changed

Implements DDD_AttributeObserver.

virtual void Pause ( )
virtual

Pause asset

Reimplemented from DDD_AssetBase.

virtual void PopulateAttributeList ( )
virtual

Poll asset, put all "discovered" assets into _attributeList

Precondition
_attributeList is empty
Postcondition
_attributeList will contain the list of attributes discovered from the asset

Implements DDD_AssetBase.

void RemoveBaseClassParams ( const DDD_AttributeList params,
DDD_AttributeList newParams 
)
protected

Processes the passed in params, copies into newParams only the params that are not also listed in the internal member variable _params

Parameters
paramsA list of parameters passed to the asset
newParamsThe new list (returned) containing only what wasn't listed in _params
virtual void Resume ( )
virtual

Resume asset

Reimplemented from DDD_AssetBase.

void SetParams ( const DDD_AttributeList params)
virtual

Sets the initialization parameters. The params specified will be merged with the parameters in the asset. Parameters that don't exist will be added. Parameters that do exist will be updated.

Parameters
paramsA set of parameter values to update or add.

Reimplemented from DDD_Base.

virtual void Start ( )
virtual

Start asset

Reimplemented from DDD_AssetBase.

virtual void Stop ( )
virtual

Stop asset

Reimplemented from DDD_AssetBase.


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