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

RmNode Class Reference

Base RenderMonkey node class. More...

#include <RmEffect.h>

Inheritance diagram for RmNode:

RmCamera RmCameraReference RmClipboardNode RmEffect RmEffectGroup RmEffectWorkspace RmLightObject RmLightReference RmMaterialObject RmMaterialReference RmModelData RmModelReference RmPass RmPlugInData RmRegistryBranch RmRenderStateBlock RmRenderTarget RmSampler RmShader RmShaderConstant RmState RmStream RmStreamChannel RmStreamMap RmTextureObject RmTextureReference RmVariable List of all members.

Public Member Functions

 RmNode ()
 Default constructor.

 RmNode (const RM_TCHAR *strName, bool bHidden=false)
 Constructor.

 RmNode (RmNode *pParentNode, const RM_TCHAR *strName, bool bHidden=false)
 Constructor.

virtual ~RmNode ()
 Destructor.

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

virtual void CopyNode (RmNode *pDestinationNode, bool bUnregisterDestinationNode, bool bIncludeLoadedData)
 Copy contents of this node to the destination node.

virtual void CopyBranch (RmNode *pDestinationNode, bool bUnregisterDestinationNode, bool bIncludeLoadedData)
 Copy contents ( including children ).

void AddNodeTypeChildRule (const RM_TCHAR *pStrNodeType, const int nMinNumChildren, const int nMaxNumChildren)
 Add Node Type Rule.

void RemoveNodeTypeChildRule (const RM_TCHAR *pStrNodeType)
 Remove node type rules.

bool IsValidOwner (const RM_TCHAR *pStrNodeTypeChain, const RM_TCHAR *pStrAPI, int *pMaxNumChildrenOfType=NULL)
 Check whether a given node is a valid owner.

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

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

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 ()
virtual void SetDescription (const RM_TCHAR *pStrDescription)
 Description of the node.

const RmStringT & GetType ()
 Type string of the node.

const RmStringT & GetTypeChain () const
 ChainedType string.

bool IsKindOf (const RM_TCHAR *pStrType)
 Check if node is a given type.

const RmStringT & GetName () const
 Name of node.

const RmStringT & GetNameChain ()
 Chained Name.

virtual void SetName (const RM_TCHAR *strNewName)
 Set node's name.

const RmStringT & GetAPI () const
 Returns API for this Node.

bool IsHidden ()
 Hidden Flag.

RmNodeGetParent ()
 Parent Node.

void SetParent (RmNode *pParentNode)
 Set Parent.

int GetNumChildren ()
 Number of children.

bool IsChild (RmNode *pChild)
 IsChild.

virtual bool AddChild (RmNode *pChildNode, RmNode *pNextSibling=NULL)
 Add child.

void DeleteChild (RmNode *pChildNode)
 Delete Child.

void DeleteAllChildren ()
 Delete all children under this node.

void RemoveChild (RmNode *pChildNode)
 Remove child node.

RmNodeList GetDescendantListByType (const RM_TCHAR *strNodeType)
 Get list of children by type ( recursively ).

RmNodeList GetChildListByType (const RM_TCHAR *strNodeType)
 Get list of children by type.

RmNodeGetFirstChildOfType (const RM_TCHAR *strNodeType)
 Returns first child of given type.

RmNodeGetFirstChildOfTypeNamed (const RM_TCHAR *strNodeType, const RM_TCHAR *strNodeName)
 Returns the first child node with given name and type.

RmNodeGetFirstChildNamed (const RM_TCHAR *strNodeName)
 Returns first child with given name.

RmNodeGetChild (const RM_TCHAR *strChildName)
 Returns the child node with a given name.

RmNodeGetChild (int nIndex)
 Access a child node by index.

int GetChildNodeIndex (RmNode *pChildNode)
 Child node's index.

int GetChildNodeIndexByType (RmNode *pChildNode)
 Child node's index with type.

int GetNumDescendants ()
 Number of children ( recursively ).

bool IsParentOf (RmNode *pDescendant)
 IsParent of node.

bool IsChildOfAncestor (RmNode *pChild)
 IsChild of ancestor.

RmNodeGetNodeParent (const RM_TCHAR *strParentType)
 Returns node parent.

RmNodeGetDescendant (const RM_TCHAR *strNodeName, bool bUseNameChain=false)
 Get descendant node by its node name.

RmNodeGetDescendant (const RM_TCHAR *strNodeName, const RM_TCHAR *strType, bool bUseNameChain=false)
 Get descendant by its name and type.

virtual bool IsArtistEditable ()
 Is this node an artist variable.

virtual bool IsNodeValid ()
 Check node's validity.

virtual bool IsNodeNameValid (RmNode *pParent, const RM_TCHAR *pStrNodeName=NULL, const RM_TCHAR *pStrNodeType=NULL)
 Check node's name is valid.

void UpdateAll (RmNodeUpdateType nodeUpdateType, RmNode *pRmUpdateRootNode)
 Update all.

void UpdateAllChildren (RmNodeUpdateType nodeUpdateType, RmNode *pRmUpdateRootNode)
 e Update all children

bool CheckAllNodeNames (RmLinkedList< RmStringT > *pStringList)
 Check all node names.

void AutoInitializeNode ()
 Auto initialize node's contents.

void TransferNode (RmNode *pDestinationNode)
 Transfer vode information to destination node.

RmNodeSearchBackForNodeTypeNamed (const RM_TCHAR *strType, const RM_TCHAR *strName)
 Search back in the workspace for a node of given type and name.

RmNodeSearchBackForNodeType (const RM_TCHAR *strType)
 Search back in the workspace for a node of given type.

RmNodeSearchBackForNodeNamed (const RM_TCHAR *strName)
 Search back in the workspace for a node of given name.

RmNodeID GetNodeID () const
 Retrieve node ID.

void SetNodeID (RmNodeID id)
 Set node ID.

void InvalidateNodeID (bool bRecursive)
 Invalidate vode iD.

RmNodeListIterator BeginChildren ()
 Begin children iterator.

RmNodeListConstIterator BeginChildren () const
 Begin children iterator.

RmNodeListIterator EndChildren ()
 End children iterator.

RmNodeListConstIterator EndChildren () const
 End children iterator.

RmNodeTypeChildRuleListConstIterator BeginNodeTypeChildRule ()
 Node's child rule iterator.

RmNodeTypeChildRuleListConstIterator EndNodeTypeChildRule ()
 Node's child rule iterator.


Static Public Member Functions

RmStringToPtrMap * GetNodeTypeOrderMap ()
 Retrieve node type order map.

void RmInitNodeTypeChildRuleLists ()
void RmUninitializeNodeTypeChildRuleLists ()

Protected Member Functions

virtual void CopyNodeData (RmNode *pDestinationNode, bool bIncludeLoadedData)
 Copy node contents into a destination node.

virtual void SetType (const RM_TCHAR *strNewType)
 Set node type.

void SetAPI (const RM_TCHAR *pStrAPI, bool bOverride=false)
 Set API version for this node.

void SetIsHidden (bool bHidden)
 Set whether this node is hidden.

virtual RmNodeTypeChildRuleListGetNodeTypeChildRuleList ()
 Retrieve node type rules.

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

const RmNodeTypeChildRuleStruct * GetNodeTypeChildRule (const RM_TCHAR *pStrNodeTypeChain)
 Returns node rule lists.

virtual bool SaveXMLNode (int hDoc, const RM_TCHAR *strXPath, bool bSortChildren)
 Save node contents to XML.

void SortChildren ()
 Sort children of this node to match XML DTD ordering.


Protected Attributes

RmStringT m_strDescription
 Used to store tooltip string description for the node.

RmStringT m_strUserDescription
 Used to store user defined tooltip string description for the node.

RmStringT m_strAPI
bool m_bHidden
 Is this node visible in the workspace view or not? (true = visible).

RmNodeList m_childrenList
 Children nodes of this node.

RmNodem_pParent
 Node that is the parent of the given node.

RmNodeID m_nodeID
 Node ID.


Detailed Description

Base RenderMonkey node class.

The main node type data structure for RenderMonkey. Every node in the workspace should always inherit from this data type.


Constructor & Destructor Documentation

RmNode::RmNode  ) 
 

Default constructor.

Creates an empty node with no chilren and no description

RmNode::RmNode const RM_TCHAR *  strName,
bool  bHidden = false
 

Constructor.

Creates a node with a given name and specifies whether this node will be hidden. If bHidden = true, this node will be hidden in the workspace tree view, and if it's set to false, the node will be visible in the tree view

Parameters:
strName Name of the node
bHidden flag to specify if node is hidden in the workspace tree view

RmNode::RmNode RmNode pParentNode,
const RM_TCHAR *  strName,
bool  bHidden = false
 

Constructor.

Constructor: creates a node with a given name and parent and specifies whether this node will be hidden (same as above)

Parameters:
pParentNode parent node for this node
strName the name of the node
bHidden a flag to specify if the node is hidden in workspace tree view

virtual RmNode::~RmNode  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual bool RmNode::AddChild RmNode pChildNode,
RmNode pNextSibling = NULL
[virtual]
 

Add child.

Add a new child node. If this node already contains the specified input node as a child, this method doesn't do anything. If 'pNextSibling' node is specified then the input child node is inserted before the sibling node.

Parameters:
pChildNode Child node to add
pNextSibling If NULL, child node is inserted before this sibling
Returns:
True on success

Reimplemented in RmPass, RmGLPass, and RmEffect.

void RmNode::AddNodeTypeChildRule const RM_TCHAR *  pStrNodeType,
const int  nMinNumChildren,
const int  nMaxNumChildren
 

Add Node Type Rule.

Parent / Child rule access functions. These functions are used to set up rules for relationships between various node types in the workspace.

NOTE: Because all these node type child rule functions require use of the virtual GetNodeTypeChildRuleList() function, they could not be made static. Because of this, even though logically these functions act mostly on class (i.e. type) specific data, instead of instance specific data, an actual node instance must be created to use these functions .

Parameters:
pStrNodeType the name of the node type
nMinNumChildren Minimum number of children
nMaxNumChildren Maximum number of children
Returns:
None

void RmNode::AutoInitializeNode  ) 
 

Auto initialize node's contents.

This method initializes node state according to the definition specified in the DefaultWorkspace.rfx file in data directory. This allows user to specify what data they want the node to contain every time they create it.

Returns:
None

RmNodeListConstIterator RmNode::BeginChildren  )  const [inline]
 

Begin children iterator.

Utility functions to iterate through children node arrays

Returns:
Begin iterator for children

RmNodeListIterator RmNode::BeginChildren  )  [inline]
 

Begin children iterator.

Utility functions to iterate through children node arrays

Returns:
Begin iterator for children nodes

RmNodeTypeChildRuleListConstIterator RmNode::BeginNodeTypeChildRule  ) 
 

Node's child rule iterator.

Utility methods to iterate through the child rule list for this node

Returns:
Iterator for node type rule

bool RmNode::CheckAllNodeNames RmLinkedList< RmStringT > *  pStringList  ) 
 

Check all node names.

Checks all node names of this node and its children for the specified list of names Returns true if the names were found, false otherwise

Parameters:
List of names to check
Returns:
True is names were found

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

Clone this node.

Creates a clone of this node

Returns:
Cloned node. Returns NULL if cloning failed.

Reimplemented in RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, Rm2DTextureVariable, RmCubemapVariable, Rm3DTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmSampler, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmState, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmOpenGLEffect, RmDirectXEffect, RmEffectGroup, RmEffectWorkspace, RmRegistryBranch, RmPlugInData, and RmClipboardNode.

virtual void RmNode::CopyBranch RmNode pDestinationNode,
bool  bUnregisterDestinationNode,
bool  bIncludeLoadedData
[virtual]
 

Copy contents ( including children ).

Copies this node's contents (including children) into the destination node The nodes ID gets copied into the destination, so care must be taken to ensure the node registration / unregistration takes place. NOTE: Remember that a node gets unregistered by default upon destruction.

Parameters:
pDestinationNode the destination node that recieves copied contents
bUnregisterDestinationNode A flag to specify if the destination node will be unregistered from the database
Returns:
None

virtual void RmNode::CopyNode RmNode pDestinationNode,
bool  bUnregisterDestinationNode,
bool  bIncludeLoadedData
[virtual]
 

Copy contents of this node to the destination node.

Copies this node's contents (not including children) into the destination node The nodes ID gets copied into the destination, so care must be taken to ensure the node registration / unregistration takes place. NOTE: Remember that a node gets unregistered by default upon destruction.

Parameters:
pDestinationNode the destination node that recieves copied contents
bUnregisterDestinationNode A flag to specify if the destination node will be unregistered from the database
Returns:
None

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

Copy node contents into a destination node.

Copies this node's contents (not including children) into the destination node. The nodes ID gets copied into the destination, so care must be taken to ensure the node registration / unregistration takes place. NOTE: Remember that a node gets unregistered by default upon destruction.

Parameters:
pDestinationNode the destination node
Returns:
None

Reimplemented in RmVariable, RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmSampler, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmState, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmEffectGroup, RmEffectWorkspace, RmRegistryBranch, RmPlugInData, and RmClipboardNode.

void RmNode::DeleteAllChildren  ) 
 

Delete all children under this node.

Deletes all children from this node. Note that this method actually calls destructors for the children nodes.

Returns:
None

void RmNode::DeleteChild RmNode pChildNode  ) 
 

Delete Child.

Delete a given child node from the list of children of this node. This method actually deletes the child node as well as remove it from the list of children

Parameters:
pChildNode Child node to delete
Returns:
None

RmNodeListConstIterator RmNode::EndChildren  )  const [inline]
 

End children iterator.

Utility functions to iterate through children node arrays

Returns:
End iterator for children

RmNodeListIterator RmNode::EndChildren  )  [inline]
 

End children iterator.

Utility functions to iterate through children node arrays

Returns:
End iterator for children

RmNodeTypeChildRuleListConstIterator RmNode::EndNodeTypeChildRule  ) 
 

Node's child rule iterator.

Utility methods to iterate through the child rule list for this node

Returns:
Iterator for node type rule

const RmStringT& RmNode::GetAPI  )  const [inline]
 

Returns API for this Node.

Retrieve the graphics API affiliation for this node. Each node can support only a specific graphics API, for example DirectX or OpenGL, or it can be API-agnostic, thus not containing any restrictions for use. Use definitions in RmTypes.h to determine what API the node supports. For example, if pNode->GetAPI() == RM_DX_API that node only supports DirectX graphics API and should be treated accordingly.

Returns:
API string for Node

RmNode* RmNode::GetChild int  nIndex  ) 
 

Access a child node by index.

Returns the child node by its index in the children list of this node

Parameters:
nIndex Index to of child
Returns:
Child node at given index

RmNode* RmNode::GetChild const RM_TCHAR *  strChildName  ) 
 

Returns the child node with a given name.

Returns the child node with a given name

Parameters:
strNodeName Name of child node
Returns:
Child node with given name

RmNodeList RmNode::GetChildListByType const RM_TCHAR *  strNodeType  ) 
 

Get list of children by type.

Returns a list of children nodes with a given type

Parameters:
strNodeType Type string
Returns:
List of Node

int RmNode::GetChildNodeIndex RmNode pChildNode  ) 
 

Child node's index.

Returns the index of a given child node in this node's child list

Parameters:
pChildNode Child node
Returns:
Index of this child node

int RmNode::GetChildNodeIndexByType RmNode pChildNode  ) 
 

Child node's index with type.

Returns the index of the child node in the array of children of the same type

Parameters:
pChildNode Child node
Returns:
Index of this child node

RmNode* RmNode::GetDescendant const RM_TCHAR *  strNodeName,
const RM_TCHAR *  strType,
bool  bUseNameChain = false
 

Get descendant by its name and type.

Retrieve descendant node specified by its name and type. Returns the node if found and NULL if a match is not found

Parameters:
strNodeName Node's name
strType Type string
bUseNameChain A flag to specify if chained name is used
Returns:
Node with given name

RmNode* RmNode::GetDescendant const RM_TCHAR *  strNodeName,
bool  bUseNameChain = false
 

Get descendant node by its node name.

Retrieve descendant node specified by its name

Parameters:
strNodeName Node's name
bUseNameChain A flag to specify if chained name is used
Returns:
Node with given name

RmNodeList RmNode::GetDescendantListByType const RM_TCHAR *  strNodeType  ) 
 

Get list of children by type ( recursively ).

Retrieve a list of all descendants of certain type. Note that the order in which these nodes will be arranged relates to the order of their "appearance" in this node: first the direct children, then children's children, etc.

Parameters:
strNodeType Type string
Returns:
List of Node

virtual const RM_TCHAR* RmNode::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 in RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, Rm2DTextureVariable, RmCubemapVariable, Rm3DTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmSampler, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmState, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmEffectGroup, RmEffectWorkspace, RmRegistryBranch, RmPlugInData, and RmClipboardNode.

RmNode* RmNode::GetFirstChildNamed const RM_TCHAR *  strNodeName  ) 
 

Returns first child with given name.

Returns the first child node with given name

Parameters:
strNodeName Name of the child node
Returns:
Child node with given name

RmNode* RmNode::GetFirstChildOfType const RM_TCHAR *  strNodeType  ) 
 

Returns first child of given type.

Returns the first child node of a given type

Parameters:
strNodeType Type string
Returns:
Child node of a given type

RmNode* RmNode::GetFirstChildOfTypeNamed const RM_TCHAR *  strNodeType,
const RM_TCHAR *  strNodeName
 

Returns the first child node with given name and type.

Returns the first child node with given name and type

Parameters:
strNodeType Type string
strNodeName Name of the child node
Returns:
Child node with the given type and name

const RmStringT& RmNode::GetName  )  const [inline]
 

Name of node.

Returns the actual name of this node

Returns:
Name string of this node

const RmStringT& RmNode::GetNameChain  ) 
 

Chained Name.

Returns the name chain for this node. The name chain contains the name of this node, preceded recursively by the name of all of the parents in the node type chain. For example: 'Effect Workspace.Effect Group 1.Effect 1'

Returns:
Chained Name string

RmNodeID RmNode::GetNodeID  )  const [inline]
 

Retrieve node ID.

Retrieve node ID value for this node. See RmTypes.h for RmNodeID type definition

Returns:
Node ID

RmNode* RmNode::GetNodeParent const RM_TCHAR *  strParentType  ) 
 

Returns node parent.

This method returns a parent node for the specified input node that matches the type string specified. This doesn't mean that the returned parent node is a direct parent of the specified input node. For example: GetNodeParent( strParentType = "RmEffectGroup" ) returns the effect group that owns the node. Returns NULL if unable to find a parent node of specified type.

Parameters:
strParentType Parent node type string
Returns:
Parent Node with give type. NULL if not found

const RmNodeTypeChildRuleStruct* RmNode::GetNodeTypeChildRule const RM_TCHAR *  pStrNodeTypeChain  )  [protected]
 

Returns node rule lists.

Retrieve the node child rule for the specified node type chain. This rule can be used to determine whether the node defined by the 'pStrNodeTypeChain' can be added as a child to the given node.

Parameters:
pStrNodeTypeChain Chained type name
Returns:
List of node type rules

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

Retrieve node type rules.

Retrieve the node child rule list for the given node. This list specifies which nodes are valid nodes to be added as children for the given node.

Returns:
List of node child rule

Reimplemented in RmVariable, RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmEffectGroup, RmEffectWorkspace, RmRegistryBranch, RmPlugInData, and RmClipboardNode.

RmStringToPtrMap* RmNode::GetNodeTypeOrderMap  )  [static]
 

Retrieve node type order map.

Returns the node type order map used to pre-sort the nodes before saving into xml. This step ensures the nodes will not violate a DTD node ordering limitation. The map will return an index using the node type string as a key. This function is called internally by the application during the database save procedures.

int RmNode::GetNumChildren  )  [inline]
 

Number of children.

Get the number of chilren. Note that this method doesn't include the count of children's children, only the number of direct children of this node.

Returns:
Number of children this node has

int RmNode::GetNumDescendants  ) 
 

Number of children ( recursively ).

Returns the total count of all descendant nodes that belong to this node Includes count of child node's children, etc.

Returns:
Total count of all descendants

RmNode* RmNode::GetParent  )  [inline]
 

Parent Node.

Retrieve the parent node of this node

Returns:
Parent node

const RmStringT& RmNode::GetType  ) 
 

Type string of the node.

Returns the type string for a given node. This method returns the individual node type, for example: RmVectorVariable or RmEffect. Use types defined in RmTypes.h to determine specific type of a node

Returns:
Type string

const RmStringT& RmNode::GetTypeChain  )  const [inline]
 

ChainedType string.

Returns the type chain string for a given node. This includes all of the inheritance type chain for the node. For example if it is a vector variable, it inherits from a RmVariable class and from RmNode class, therefore its' node chain will look like this: RmNode.RmVariable.RmVectorVariable or the type chain for effect workspace will be 'RmNode.RmEffectWorkspace'.

Returns:
Chained Type string

void RmNode::InvalidateNodeID bool  bRecursive  ) 
 

Invalidate vode iD.

Force the node ID for this node to be invalid

Parameters:
bRecursive flag to specify if invalidation happens recursively
Returns:
None

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

Is this node an artist variable.

Return whether this node is tagged as an artist editable node( true ) or not This method is over-written for each specific node type individually.

Returns:
Returns true if this node is artist editable

Reimplemented in RmVariable, RmEffect, RmEffectGroup, and RmEffectWorkspace.

bool RmNode::IsChild RmNode pChild  ) 
 

IsChild.

Returns whether the specified node is a direct child of the given node

Returns:
True if spcified node is a direct child of the given node

bool RmNode::IsChildOfAncestor RmNode pChild  ) 
 

IsChild of ancestor.

Returns whether the specified node is a child of some ancestor node of this node. For example: if an effect workspace node has a color variable named myColor and and effect group node named pEffectGroup1, then calling this below pEffectGroup1->IsChildOfAncestor( myColor ) will return true.

Parameters:
Child Node to check for
Returns:
True if pChild belongs to this node ( directly or indirectly )

bool RmNode::IsHidden  ) 
 

Hidden Flag.

Return whether a given node is hidden (true) or visible (false) in the workspace tree view.

Returns:
True if node is hidden from the workspace view, false otherwise

bool RmNode::IsKindOf const RM_TCHAR *  pStrType  ) 
 

Check if node is a given type.

Checks of a node is related to a specific type. This method checks the entire node type chain to determine whether the specified input type ('pStrType') is one of the base types of a given node. Returns true if that's the case and returns false if the input type is not present in the node type chain.

Parameters:
pStrType Type string
Returns:
True if this node is a give type

virtual bool RmNode::IsNodeNameValid RmNode pParent,
const RM_TCHAR *  pStrNodeName = NULL,
const RM_TCHAR *  pStrNodeType = NULL
[virtual]
 

Check node's name is valid.

Validates the name of the node in the given workspace. This is used to avoid naming collisions for nodes of some types (for example, variables) in the workspace Returns true if the node is in a valid state, false otherwise.

Parameters:
pParent Parent node
pStrNodeName Name of node
pStrNodeType Type string
Returns:
True if node's name is valid

virtual bool RmNode::IsNodeValid  )  [virtual]
 

Check node's validity.

Returns whether this node is a valid node. This method implements checks that are specific to each node type. For example, if the node is a model reference node, then this method will check whether the node that this model reference points to exists in the workspace. If that's not the case, then the model reference node will be tagged as an invalid node.

Returns:
True if node is valid

Reimplemented in RmTextureVariable, Rm2DTextureVariable, RmCubemapVariable, Rm3DTextureVariable, RmStreamMap, RmShaderConstant, RmSampler, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmCameraReference, and RmPass.

bool RmNode::IsParentOf RmNode pDescendant  ) 
 

IsParent of node.

Returns whether the specified node is a descendant of this node (true) or not (false)

Parameters:
pDescendant node to check
Returns:
True if this node is parent of pDescendant ( directly or indirectly )

bool RmNode::IsValidOwner const RM_TCHAR *  pStrNodeTypeChain,
const RM_TCHAR *  pStrAPI,
int *  pMaxNumChildrenOfType = NULL
 

Check whether a given node is a valid owner.

Checks if the input node defined by the 'pStrNodeTypeChain' is a valid child of this node based on the specified parent/child rules Returns true if this node is a valid owner for the node specified by the child node type chain string. Typical usage of this method: if (pParent->IsValidOwner(pNode->GetTypeChain(),pNode->GetAPI())==false)

Parameters:
pStrNodeTypeChain Chained name of queried node type
pStrAPI API Type ( D3D or OpenGL )
pMaxNumChildrenOfType < 0 indicates the node type is always allowed
0 indicates the node type is strictly not allowed
> 0 indicates the node type is allowed, but in limited quantity
Returns:
True if this node is a valid owner for the given node type and API

virtual bool RmNode::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 in RmVariable, RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmSampler, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmState, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmEffectGroup, RmEffectWorkspace, RmRegistryBranch, RmPlugInData, and RmClipboardNode.

bool RmNode::LoadXMLNode int  hDoc,
const RM_TCHAR *  strXPath,
const RM_TCHAR *  strRmXMLVersion
 

Load node data from XML.

Loading versioned XML node data.

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

void RmNode::RemoveChild RmNode pChildNode  ) 
 

Remove child node.

Remove a given child node from the list of children of this node. This method only removes the child node from the list of children of the given node, but doesn't actually delete the child node itself.

Parameters:
pChildNode Child to remove
Returns:
None

void RmNode::RemoveNodeTypeChildRule const RM_TCHAR *  pStrNodeType  ) 
 

Remove node type rules.

Removes NodeType rules (reserved for internal usage)

Parameters:
pStrNodeType the name of the node type
Returns:
None

void RmNode::RmInitNodeTypeChildRuleLists  )  [static]
 

These are called by the application during startup and shutdown to initialize and uninitialize the static child rule lists. These lists govern the valid relationshipd between parent and child nodes of various types.

virtual bool RmNode::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 in RmVariable, RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmSampler, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmState, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmEffectGroup, RmEffectWorkspace, RmRegistryBranch, RmPlugInData, and RmClipboardNode.

virtual bool RmNode::SaveXMLNode int  hDoc,
const RM_TCHAR *  strXPath,
bool  bSortChildren
[protected, virtual]
 

Save node contents to XML.

Save XML data for the node given a pointer to the XML document

Parameters:
hDoc Handle to XML document
strXPath path to this node in XML
bSortChildren Flag to sort children
Returns:
True on success

virtual bool RmNode::SaveXMLNode int  hDoc,
const RM_TCHAR *  strXPath
[inline, virtual]
 

Save node to XML.

Saves given node to XML

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

Reimplemented in RmClipboardNode.

RmNode* RmNode::SearchBackForNodeNamed const RM_TCHAR *  strName  ) 
 

Search back in the workspace for a node of given name.

Searches up the workspace tree starting with the given node to find a node of specified name. Returns the node if one is found and NULL if not.

Parameters:
Name of node
Returns:
Found Node or NULL if no node was found

RmNode* RmNode::SearchBackForNodeType const RM_TCHAR *  strType  ) 
 

Search back in the workspace for a node of given type.

Searches up the workspace tree starting with the given node to find a node of specified type. Returns the node if one is found and NULL if not.

Parameters:
strType Type string
Returns:
Found Node

RmNode* RmNode::SearchBackForNodeTypeNamed const RM_TCHAR *  strType,
const RM_TCHAR *  strName
 

Search back in the workspace for a node of given type and name.

Searches up the workspace tree starting with the given node to find a node of specified type and name. Returns the node if one is found and NULL if not.

Parameters:
strType Type string
strName Name of node
Returns:
Found Node

void RmNode::SetAPI const RM_TCHAR *  pStrAPI,
bool  bOverride = false
[protected]
 

Set API version for this node.

Set API specification for this node

Parameters:
pStrAPI API Name
bOverride Override flag
Returns:
None

virtual void RmNode::SetDescription const RM_TCHAR *  pStrDescription  )  [inline, virtual]
 

Description of the node.

Set description of node

Parameters:
pStrDescription Description string
Returns:
None

void RmNode::SetIsHidden bool  bHidden  )  [protected]
 

Set whether this node is hidden.

Set whether a given node is hidden (true) or not (false)

Parameters:
bHidden Hidden flag
Returns:
None

virtual void RmNode::SetName const RM_TCHAR *  strNewName  )  [virtual]
 

Set node's name.

Set the name of the node to the specified value

Parameters:
strNewName New name for node
Returns:
None

Reimplemented in RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, and RmFloatVariable.

void RmNode::SetNodeID RmNodeID  id  )  [inline]
 

Set node ID.

Set the new ID for this node to the specified value

Parameters:
id New ID for this node
Returns:
None

virtual void RmNode::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 in RmVariable, RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmEffectGroup, RmEffectWorkspace, RmRegistryBranch, RmPlugInData, and RmClipboardNode.

void RmNode::SetParent RmNode pParentNode  )  [inline]
 

Set Parent.

Set a parent node for a given node

Parameters:
pParentNode New parent for this node

virtual void RmNode::SetType const RM_TCHAR *  strNewType  )  [protected, virtual]
 

Set node type.

Compose the type string chain

Parameters:
strNewType New type string
Returns:
None

Reimplemented in RmVariable, RmTextureVariable, Rm2DTextureVariable, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmPass, and RmEffect.

void RmNode::SortChildren  )  [protected]
 

Sort children of this node to match XML DTD ordering.

Sort children to match XML DTD ordering

Returns:
None

void RmNode::TransferNode RmNode pDestinationNode  ) 
 

Transfer vode information to destination node.

This methos copies information from the source node, while maintaining state information in the destination node.

Parameters:
pDestRmNode Destination node
Returns:
None

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

Update node contents.

Updates the value of this node. May perform actions specific to each node type to ensure that the given node is a valid node in the workspace.

Parameters:
nodeUpdateType used to specify the type of an update action for the given node. This results from a specific update type requested by either the application or a plug-in.
See also:
RmNodeUpdateType
Parameters:
pRmUpdateRootNode The node originating this update message.
Returns:
None

Reimplemented in RmDynamicVariable, RmLightVariable, RmMaterialVariable, RmVectorVariable, RmMatrixVariable, RmFloatVariable, RmIntegerVariable, RmStringVariable, RmBooleanVariable, RmTextureVariable, RmColorVariable, RmStreamChannel, RmStream, RmStreamMap, RmShaderConstant, RmSampler, RmShader, RmHLShader, RmHLSLShader, RmGLShader, RmModelData, RmModelReference, RmRenderableTexture, RmRenderTarget, RmState, RmTextureReference, RmTextureObject, RmLightReference, RmLightObject, RmMaterialReference, RmMaterialObject, RmRenderStateBlock, RmCamera, RmCameraReference, RmPass, RmGLPass, RmEffect, RmEffectGroup, RmEffectWorkspace, and RmPlugInData.

void RmNode::UpdateAll RmNodeUpdateType  nodeUpdateType,
RmNode pRmUpdateRootNode
 

Update all.

Forces a node update for all child nodes of the given nodes. The 'nodeUpdateType' (defined in RmTypes.h) specifies what type of node update has been requested by the application (signifying what kind of action caused the update to happen). 'pRmUpdateRootNode' is the node that caused the original update message.

Parameters:
nodeUpdateType Update Type
See also:
RmNodeUpdateType
Parameters:
pRmUpdateRootNode Node that triggered update
Returns:
None

void RmNode::UpdateAllChildren RmNodeUpdateType  nodeUpdateType,
RmNode pRmUpdateRootNode
 

e Update all children

Update all chidlren

Parameters:
nodeUpdateType Update Type
See also:
RmNodeUpdateType
Parameters:
pRmUpdateRootNode Node that triggered update
Returns:
None


Member Data Documentation

RmStringT RmNode::m_strAPI [protected]
 

What API does this node support? Allowable values:
RM_API_AGNOSTIC - no restrictions for the graphics API
RM_OPENGL_API - OpenGL-only node
RM_DX_API - DirectX-only node


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