IRsUnknownNode Interface Reference

Inherits IRsObject.

Inherited by CRcUiOpenStackPanel.

List of all members.

Public Member Functions

HRESULT OnDefaultValue ([in] CONID con_id,[out] VARIANT *pVtData,[in, out] RtBool *pHandled)
HRESULT OnGetValue ([in] CONID con_id,[in] IRsDataCache *pDataCache,[out] VARIANT *pVtData,[in, out] RtBool *pHandled)
HRESULT OnSetValue ([in] CONID con_id,[in] IRsDataCache *pDataCache,[out] VARIANT *pVtData,[in, out] RtBool *pHandled)
HRESULT OnInvalidate ([in] CONID con_id,[in, out] RtBool *pHandled)
HRESULT OnInitialize (void)
HRESULT OnLoadDefault (void)
HRESULT OnDestroy (void)


Detailed Description

Interface defining handlers for IRsBaseNode events.
Each object in the graph must implement IRsUnknownNode interface. This interface is used to extend functionality of base node and all custom functionality and initialization should be placed here. Base node then calls handlers of IRsUnknowNode interface when:
- object is initialized OnInitialized,
- object is in the initial state first time loaded OnLoadDefault
- new value is set to attribute OnSetValue
- a value is retrieved from attribute OnGetValue
- a value in attribute is invalided OnInvalidate
- default value is requested from attribute OnDefaultValue
- node is being destroyed OnDestory

See also:
IRsBaseNode

Member Function Documentation

HRESULT IRsUnknownNode::OnDefaultValue ( [in] CONID  con_id,
[out] VARIANT *  pVtData,
[in, out] RtBool *  pHandled 
)

Custom handler for retrieval of connector default value.

Parameters:
con_id [in] GUID of connector.
pVtData [out] Pointer to variant to be filled with data.
pHandled [in,out] Fill with true if handler provided default value for connector.
If kept false, fallback handling occurs.

HRESULT IRsUnknownNode::OnGetValue ( [in] CONID  con_id,
[in] IRsDataCache pDataCache,
[out] VARIANT *  pVtData,
[in, out] RtBool *  pHandled 
)

Custom handler for retrieval of connector current value. Most computation should be performed here as system uses lazy evaluation.
Generally, scheme is as follows : Gather values of connectors from which the queried connector depends.
Calculate new value of connector.
Retrieve data item for connector, fill the value and validate connector. See example below.

Parameters:
con_id [in] GUID of connector.
pDataCache [in] Data block for connector.
pVtData [out] New connector value.
pHandled [in,out] Set to true if handler fills pVtData, otherwise keep intact.

HRESULT IRsUnknownNode::OnSetValue ( [in] CONID  con_id,
[in] IRsDataCache pDataCache,
[out] VARIANT *  pVtData,
[in, out] RtBool *  pHandled 
)

Custom handler called when connector value is set.

Parameters:
con_id [in] Connector for which the value has just changed.
pDataCache [in] Data block of connector.
pVtData [out] New connector data.
pHandled [in,out] Set to true if you handle value by yourself (kept intact in most cases).

HRESULT IRsUnknownNode::OnInvalidate ( [in] CONID  con_id,
[in, out] RtBool *  pHandled 
)

Invalidates specified connector.

Parameters:
con_id [in]Connector to invalidate.
pHandled [in,out] Set to true if you handle validity state of connectory by yourself (kept intact in most cases).

HRESULT IRsUnknownNode::OnInitialize ( void   ) 

Custom handler for node being created.

HRESULT IRsUnknownNode::OnLoadDefault ( void   ) 

Custom handler for node being created. Usually, all node connectors are created here.
Also connector dependencies should be set here.

HRESULT IRsUnknownNode::OnDestroy ( void   ) 

Release any additional data node holds.
Releasing them here, not in FinalRelease or even destructor may prevent circular references from being created.


Generated on Wed May 20 21:32:28 2009 for trueSpace7.6 SDK by  doxygen 1.5.5