Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmEffectWorkspace Class Reference

Workspace. More...

#include <RmEffect.h>

Inheritance diagram for RmEffectWorkspace:

RmNode List of all members.

Public Member Functions

 RmEffectWorkspace ()
 Default Constructor.

 RmEffectWorkspace (const RM_TCHAR *strWorkspaceName)
 Constructor.

virtual ~RmEffectWorkspace ()
 Destructor.

virtual bool IsArtistEditable ()
 Artist editable flag.

virtual void Update (RmNodeUpdateType nodeUpdateType, RmNode *pRmUpdateRootNode)
 Update.

virtual bool LoadXMLData (int hDoc, const RM_TCHAR *strXPath, const RM_TCHAR *strRmXMLVersion)
 Load node data from XML.

virtual bool SaveXMLData (int hDoc, const RM_TCHAR *strXPath)
 Save node data to XML.

virtual RmNodeClone (bool bIncludeLoadedData)
 Clone this node.

virtual const RM_TCHAR * GetDescription ()
void SetValidationString (const RM_TCHAR *strValidation)
 Set validation string to the specified string.

RmEffectGetActiveEffect ()
 Get active effect.

void SetActiveEffect (RmEffect *pEffect)
 Set active effect.

void DeleteActiveEffectAndUpdate (RmNode *pRmNode)
 Delete active effect.

bool AddDefaultEffect (RmEffect *pDefaultEffect)
 Add default effect.

RmEffectGetDefaultEffect (const RM_TCHAR *pStrAPI)
 Get default effect.

RmEffectGetDefaultEffectNamed (const RM_TCHAR *pStrName)
 Get default effect by name.

RmEffectGroupAddEffectGroup (const RM_TCHAR *strName)
 Add effect group.

int GetNumEffectGroups ()
 Get number of effect group.

RmEffectGroupGetEffectGroup (const RM_TCHAR *strGroupName)
 Get effect group.

RmEffectGroupGetEffectGroup (int nEffectGroupIndex)
 Get effect group.

int GetEffectGroupIndex (RmEffectGroup *pEffectGroup)
 Get effect group index.

RmEffectGroupGetEffectGroup (RmNode *pNode)
 Get effect group.

RmEffectGroupListIterator BeginEffectGroups ()
 Iterators.

RmEffectGroupListConstIterator BeginEffectGroups () const
RmEffectGroupListIterator EndEffectGroups ()
RmEffectGroupListConstIterator EndEffectGroups () const
const RM_TCHAR * GetPath ()
 Get path.

void SetPath (const RM_TCHAR *strPath)
 Set path.

const RM_TCHAR * GetFile ()
 Get File.

void SetFile (const RM_TCHAR *strFile)
 Set file.

RmEffectGetEffect (RmNode *pNode)
 Get effect.

RmPassGetPass (RmNode *pNode)
 Get Pass.

RmShaderGetShader (const RM_TCHAR *strAPI, const RM_TCHAR *strEffectGroupName, const RM_TCHAR *strEffectName, const RM_TCHAR *strEffectPassName, const RM_TCHAR *strShaderName)
 GetShader.

RmStringT & ActiveEffectName ()
 Active effect name.


Protected Member Functions

virtual void CopyNodeData (RmNode *pDestinationNode, bool bIncludeLoadedData)
 Copy node data.

virtual RmNodeTypeChildRuleListGetNodeTypeChildRuleList ()
 Parent / Child rule list function.

virtual void SetNodeTypeChildRuleList (RmNodeTypeChildRuleList *pRmNodeChildRuleList)
 Sets the node child rule list for the given node.


Protected Attributes

RmEffectm_pActiveEffect
 Currently active effect.

RmStringT m_strActiveEffect
 Active Effect node name.

RmEffectGroupList m_effectGroupList
 All effect groups that this workspace holds.

RmStringToPtrMap m_defaultEffectMap
 Default effect map.

RM_TCHAR m_path [RM_PATH_SIZE]
 Workspace path.

RM_TCHAR m_file [RM_PATH_SIZE]
RmStringT m_strValidation
 Workspace validation string.


Detailed Description

Workspace.

RmEffectWorkspace structure contains any number of RmEffectGroup structures as well as a default effect that is used as a basis for all other effects in the workspace


Constructor & Destructor Documentation

RmEffectWorkspace::RmEffectWorkspace  ) 
 

Default Constructor.

Constructor

RmEffectWorkspace::RmEffectWorkspace const RM_TCHAR *  strWorkspaceName  ) 
 

Constructor.

Creates a new workspace with a given name

Parameters:
strWorkspaceName Name of Node

virtual RmEffectWorkspace::~RmEffectWorkspace  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

RmStringT& RmEffectWorkspace::ActiveEffectName  )  [inline]
 

Active effect name.

Retrieve the name of the active effect

Returns:
Active effect name

bool RmEffectWorkspace::AddDefaultEffect RmEffect pDefaultEffect  ) 
 

Add default effect.

Adds default effect to the workspace node

DefaultEffect Effect to add as default

Returns:
True on success

RmEffectGroup* RmEffectWorkspace::AddEffectGroup const RM_TCHAR *  strName  ) 
 

Add effect group.

Add new effect group node to the workspace with the specified name

Parameters:
strName Name of new effect group
Returns:
Newly created effect group

virtual RmNode* RmEffectWorkspace::Clone bool  bIncludeLoadedData  )  [virtual]
 

Clone this node.

Creates a clone of this node

Returns:
Cloned node. Returns NULL if cloning failed.

Reimplemented from RmNode.

virtual void RmEffectWorkspace::CopyNodeData RmNode pDestinationNode,
bool  bIncludeLoadedData
[protected, virtual]
 

Copy node data.

Copies this node's contents (not including children) into the destination node. See RmNode::CopyNodeData for details

Parameters:
pDestinationNode the destination node
Returns:
None

Reimplemented from RmNode.

void RmEffectWorkspace::DeleteActiveEffectAndUpdate RmNode pRmNode  ) 
 

Delete active effect.

This method reacts to deletion of currently active effect. It figures out the next effect that needs to be active and sets it if possible.

Parameters:
pNode 
See also:
RmNode
Returns:
None

RmEffect* RmEffectWorkspace::GetActiveEffect  )  [inline]
 

Get active effect.

Retrieve active effect in the workspace

Returns:
Active effect
See also:
RmEffect

RmEffect* RmEffectWorkspace::GetDefaultEffect const RM_TCHAR *  pStrAPI  ) 
 

Get default effect.

Retrieve default effect from the workspace

Returns:
Default Effect
See also:
RmEffect

RmEffect* RmEffectWorkspace::GetDefaultEffectNamed const RM_TCHAR *  pStrName  ) 
 

Get default effect by name.

Retrieve default effect from the workspace

Parameters:
pStrName Name to seach default effect for
Returns:
Default Effect
See also:
RmEffect

virtual const RM_TCHAR* RmEffectWorkspace::GetDescription  )  [virtual]
 

Returns description of the node: used for displaying a tooltip in the workspace tree view for the given node.

Returns:
Returns description string

Reimplemented from RmNode.

RmEffect* RmEffectWorkspace::GetEffect RmNode pNode  ) 
 

Get effect.

Retrieve effect node that the specified node belongs to

Parameters:
pNode 
See also:
RmNode
Returns:
Effect
See also:
RmEffect

RmEffectGroup* RmEffectWorkspace::GetEffectGroup RmNode pNode  ) 
 

Get effect group.

Retrieve effect group which owns this particular node

Parameters:
pNode 
See also:
RmNode return Found effect group

RmEffectGroup* RmEffectWorkspace::GetEffectGroup int  nEffectGroupIndex  ) 
 

Get effect group.

Retrieves effect group for a given nIndex

Parameters:
nEffectGroupIndex Index to effect group
Returns:
Effect group
See also:
RmEffectGroup

RmEffectGroup* RmEffectWorkspace::GetEffectGroup const RM_TCHAR *  strGroupName  ) 
 

Get effect group.

Retrieve effect group by its name

Parameters:
strGroupName Name to search for
Returns:
Found effect group
See also:
RmEffectGroup

int RmEffectWorkspace::GetEffectGroupIndex RmEffectGroup pEffectGroup  ) 
 

Get effect group index.

Retrieve the nIndex of the given effect group. Effect group nIndex in the workspace group list or -1 if failed to find the specified group in the workspace.

Parameters:
pEffectGroup 
See also:
RmEffectGroup
Returns:
Index to effect group

const RM_TCHAR* RmEffectWorkspace::GetFile  )  [inline]
 

Get File.

Retrieve workspace file name

Returns:
Filename

virtual RmNodeTypeChildRuleList* RmEffectWorkspace::GetNodeTypeChildRuleList  )  [inline, protected, virtual]
 

Parent / Child rule list function.

Retrieves the rule list for adding child nodes for a given node type

Returns:
Returns node type child list rules

Reimplemented from RmNode.

int RmEffectWorkspace::GetNumEffectGroups  )  [inline]
 

Get number of effect group.

Retrieve number of effect groups in the workspace

Returns:
Number of effect group

RmPass* RmEffectWorkspace::GetPass RmNode pNode  ) 
 

Get Pass.

Retrieve effect pass node that the specified node belongs to

Parameters:
pNode 
See also:
RmNode
Returns:
Pass
See also:
RmPass

const RM_TCHAR* RmEffectWorkspace::GetPath  )  [inline]
 

Get path.

Retrieve workspace path

Returns:
Workspace path

RmShader* RmEffectWorkspace::GetShader const RM_TCHAR *  strAPI,
const RM_TCHAR *  strEffectGroupName,
const RM_TCHAR *  strEffectName,
const RM_TCHAR *  strEffectPassName,
const RM_TCHAR *  strShaderName
 

GetShader.

Retrieve shader given the name of the effect group that it belongs to, effect node, effect pass and the name of the actual shader.

Parameters:
strAPI API string
strEffectGroupName Effect group name
strEffectName Effect name
strEffectPassName Pass name
strShaderName Shader name
Returns:
Shader
See also:
RmShader

virtual bool RmEffectWorkspace::IsArtistEditable  )  [inline, virtual]
 

Artist editable flag.

Artist-editable property:

Returns:
True

Reimplemented from RmNode.

virtual bool RmEffectWorkspace::LoadXMLData int  hDoc,
const RM_TCHAR *  strXPath,
const RM_TCHAR *  strRmXMLVersion
[virtual]
 

Load node data from XML.

Loads versioned XML node data. Note that this method will only load the contents of each node, not the data for all of the children nodes. Each child will have its own XML loading function called by the API.

Parameters:
hDoc Handle to the XML document
strXPath Node path in XML
strRmXMLVersion XML version
Returns:
True if load succeeded. False otherwise.

Reimplemented from RmNode.

virtual bool RmEffectWorkspace::SaveXMLData int  hDoc,
const RM_TCHAR *  strXPath
[virtual]
 

Save node data to XML.

Saves node's contents to XML. Note that this method will only save the contents of each node, not the data for all of the children nodes. Each child will have its own XML saving function called by the API.

Parameters:
hDoc Handle to the XML document
strXPath Node path in XML
Returns:
True if save succeeded. False otherwise.

Reimplemented from RmNode.

void RmEffectWorkspace::SetActiveEffect RmEffect pEffect  ) 
 

Set active effect.

Set specified effect as active effect in the workspace. Note: input effect = NULL means that this workspace does not have an active effect

Parameters:
pEffect Effect to set active
Returns:
None

void RmEffectWorkspace::SetFile const RM_TCHAR *  strFile  ) 
 

Set file.

Set workspace file to the specified value

Parameters:
strFile Filename
Returns:
None

virtual void RmEffectWorkspace::SetNodeTypeChildRuleList RmNodeTypeChildRuleList pRmNodeChildRuleList  )  [inline, protected, virtual]
 

Sets the node child rule list for the given node.

Sets the child addition rule list for the given node.

Parameters:
pRmNodeChildRuleList new node rules list
None 

Reimplemented from RmNode.

void RmEffectWorkspace::SetPath const RM_TCHAR *  strPath  ) 
 

Set path.

Set workspace path to the specified value

strPath Path string to set return None

virtual void RmEffectWorkspace::Update RmNodeUpdateType  nodeUpdateType,
RmNode pRmUpdateRootNode
[virtual]
 

Update.

Updates the internal values of the node

Parameters:
nodeUpdateType Update type
See also:
RmNodeUpdateType
Parameters:
pRmUpdateRootNode Root node for update
Returns:
None

Reimplemented from RmNode.


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 16:09:00 2005 for RenderMonkey SDK by doxygen 1.3.6