# IRsBaseNode Interface Reference

Base interface for all objects in the object constraint graph. More...

Inherits IRsNode.

List of all members.

## Public Member Functions
HRESULT | AddConnector ([in] IRsConnector *pCon)
HRESULT | RemoveConnector ([in] IRsConnector *pCon)
HRESULT | GetLinks ([in] CONID con_Id,[in, out] SAFEARRAY **pConnection)
HRESULT | FindConById ([in] CONID con_id,[out, retval] IRsConnector **ppCon)
HRESULT | FindConByName ([in] LPCWSTR bstrName,[out, retval] IRsConnector **ppCon)
HRESULT | DisconnectAllConnectors (void)
HRESULT | CreateConnector ([in] IRsConDescriptor *pConDesc,[out, retval] IRsConnector **ppCon)
HRESULT | AddNewConnector ([in] RtConDesc *pDesc,[out, retval] IRsConnector **ppCon=NULL)
HRESULT | AddRegisteredConnector ([in] CONID con_Id,[in, out] IRsConnector **ppCon)
HRESULT | CreateConnectorDescriptor ([in] RtConDesc *desc,[out, retval] IRsConDescriptor **ppConDesc)
HRESULT | ConnectorLinksCount ([in] CONID con_id,[out, retval] RtUlong *numCon)
HRESULT | ConnectorsCount ([out, retval] RtUlong *pCount)
HRESULT | GetConnector ([in] RtUlong uIndex,[out, retval] IRsConnector **ppCon)
HRESULT | GetConnectors ([out, retval] SAFEARRAY **ppConectors)
HRESULT | GenerateConnectorName ([in] const BSTR bstrBaseName,[out, retval] BSTR *pRetName)
HRESULT | ConnectToConnector ([in] CONID con_Id,[in] IRsBaseNode *pRemNode,[in] CONID remConID)
HRESULT | DisconnectFromConnector ([in] CONID con_Id,[in] IRsBaseNode *pRemNode,[in] CONID remConId)
HRESULT | Notify ([in] IRsNotifyEvent *pEvent)
HRESULT | SentNotifyEvent ([in] RtNotifyEvent eEvent,[in] IRsConnector *pCon,[in] VARIANT *pVtData)
HRESULT | Hook ([in] IRsNotify *pListener)
HRESULT | HookEx ([in] IRsNotify *pListener,[in] RtDWORD dwEventMask,[in] RtBool bFullRollbackScan)
HRESULT | Unhook ([in] IRsNotify *pListener)
HRESULT | EnumNotifiedNodes ([out] IRsEnumNodes **ppEnum)
HRESULT | GetDesc ([out, retval] IUnknown **ppDesc)
HRESULT | IsDirty (void)
HRESULT | Load ([in] IStream *pStm,[in] RtObjFileHeaderInfo *pObjFileHeaderInfo)
HRESULT | Save ([in] IStream *pStm, RtBOOL fClearDirty)
HRESULT | GetFileHeaderInfo ([out, retval] RtObjFileHeaderInfo *pcbSize)
HRESULT | GetPersistentID (RtPersistId *pPersistId)
HRESULT | PostLoad (IRsConSolver *pPostLoad)

## Detailed Description

Base interface for all objects in the object constraint graph.

Interface to base object that defines the main building block of all nodes in the object constraint graph. It provides low-level functionality for handling connections and attributes(connectors) of the node. Each node in the graph has to aggregate the base node object.

## Member Function Documentation

HRESULT IRsBaseNode::AddConnector | ( | [in] IRsConnector * | pCon | ) |

Adds new connector into node.

Parameters:

  | pCon | [in] Fully initialized connector.

HRESULT IRsBaseNode::RemoveConnector | ( | [in] IRsConnector * | pCon | ) |

Removes connector from node.

Parameters:

  | pCon | [in] Connector to remove.

HRESULT IRsBaseNode::GetLinks | ( | [in] CONID | con_Id,
|  | [in, out] SAFEARRAY ** | pConnection |
| ) |  |  |

Gets array of connectors associated with specified connector.

Parameters:

  | con_id | [in] GUID of connector.
  | pConnection | [in,out] Output array of connectors.

HRESULT IRsBaseNode::FindConById | ( | [in] CONID | con_id,
|  | [out, retval] IRsConnector ** | ppCon |
| ) |  |  |

Searches for connector with specified ID in node.

Parameters:

  | con_id | [in] Connector GUID to search.

Returns:
  ppCon [out,retval] Found connector (or NULL if no connector found).
  Null reference can also be specified for just querying the connector existence.
  If connector exists, S_OK will be returned.

HRESULT IRsBaseNode::FindConByName | ( | [in] LPCWSTR | bstrName,
|  | [out, retval] IRsConnector ** | ppCon |
| ) |  |  |

Searches for connector with specified name in node.

Parameters:

  | bstrName | [in] Name of connector.

Returns:
  ppCon [out,retval] Found connector (or null if no connector found.

HRESULT IRsBaseNode::DisconnectAllConnectors | ( | void |  | ) |

Disconnect all connections on all connectors.
Mostly called before removing node from encapsulator.

HRESULT IRsBaseNode::CreateConnector | ( | [in] IRsConDescriptor * | pConDesc,
|  | [out, retval] IRsConnector ** | ppCon |
| ) |  |  |

Creates new connector based on specified descriptor.

Parameters:

  | pConDesc | [in] Connector descriptor.

Returns:
  ppCon [out,retval] Created connector.

HRESULT IRsBaseNode::AddNewConnector | ( | [in] RtConDesc * | pDesc,
|  | [out, retval] IRsConnector ** | ppCon = `NULL` |
| ) |  |  |

Creates and adds new connector based on specified descriptor.

Parameters:

  | pConDesc | [in] Connector descriptor.

Returns:
  ppCon [out,retval] Created connector.
  Connection with specified ID must not exist in node in order to succeed.

HRESULT IRsBaseNode::AddRegisteredConnector | ( | [in] CONID | con_Id,
|  | [in, out] IRsConnector ** | ppCon |
| ) |  |  |

Adds registered connector to node. Registered connectors' descriptors are enumerated in package node factory. Method lookups connector descriptor, creates connector and adds it into node.

Parameters:

  | con_Id | [in] Id of connector.
  | ppCon | [in,out] Created connector.

HRESULT IRsBaseNode::CreateConnectorDescriptor | ( | [in] RtConDesc * | desc,
|  | [out, retval] IRsConDescriptor ** | ppConDesc |
| ) |  |  |

Creates connector descriptor from specified structure.

Parameters:

  | desc | [in] Structure containing connector data.

Returns:
  ppConDesc [out,retval] Descriptor of connector.

HRESULT IRsBaseNode::ConnectorLinksCount | ( | [in] CONID | con_id,
|  | [out, retval] RtUlong * | numCon |
| ) |  |  |

Counts connections for specified connector.

Parameters:

  | con_id | [in] Connector ID.

Returns:
  numCon [out,retval] Number of connections to fill.

HRESULT IRsBaseNode::ConnectorsCount | ( | [out, retval] RtUlong * | pCount | ) |

Counts node connectors.

Returns:
  pCount [out,retval] Number of connectors to fill.

HRESULT IRsBaseNode::GetConnector | ( | [in] RtUlong | uIndex,
|  | [out, retval] IRsConnector ** | ppCon |
| ) |  |  |

Gets connector by index.

Parameters:

  | uIndex | [in] Index of connector.

Returns:
  ppCon [out,retval] Connector returned.

HRESULT IRsBaseNode::GetConnectors | ( | [out, retval] SAFEARRAY ** | ppConectors | ) |

Gets connectors as array.

Returns:
  ppConnectors [out,retval] Filled array of connectors.

HRESULT IRsBaseNode::GenerateConnectorName | ( | [in] const BSTR | bstrBaseName,
|  | [out, retval] BSTR * | pRetName |
| ) |  |  |

Generates unique connector name by adding number suffix if needed.

Parameters:

  | bstrBaseName | [in] Connector name.

Returns:
  pRetName [out,retval] Generated connector name.

HRESULT IRsBaseNode::ConnectToConnector | ( | [in] CONID | con_Id,
|  | [in] IRsBaseNode * | pRemNode,
|  | [in] CONID | remConID |
| ) |  |  |

Connect specified node connector to connector of other node with specified connector ID.

Parameters:

  | con_Id | [in] This node's connector.
  | pRemNode | [in] Other node.
  | remConID | [in] Id of remote connector.

HRESULT IRsBaseNode::DisconnectFromConnector | ( | [in] CONID | con_Id,
|  | [in] IRsBaseNode * | pRemNode,
|  | [in] CONID | remConId |
| ) |  |  |

Disconnects connector from remote node.

Parameters:

  | con_Id | [in] Connector Id.
  | pRemNode | [in] Remote node.
  | remConId | [in] Remote node connector's ID.

HRESULT IRsBaseNode::Notify | ( | [in] IRsNotifyEvent * | pEvent | ) |

Send notification event to all hooked listeners nodes and pass notification to owner

Parameters:

  | pEvent | [in] notifcation event.

HRESULT IRsBaseNode::SentNotifyEvent | ( | [in] RtNotifyEvent | eEvent,
|  | [in] IRsConnector * | pCon,
|  | [in] VARIANT * | pVtData |
| ) |  |  |

Sends notify event with connector as parameter.

Parameters:

  | eEvent | [in] .
  | pCon | [in] .
  | pVtData | [in] .

HRESULT IRsBaseNode::Hook | ( | [in] IRsNotify * | pListener | ) |

Adds new listener for node events.

Parameters:

  | pListener | [in] .

HRESULT IRsBaseNode::HookEx | ( | [in] IRsNotify * | pListener,
|  | [in] RtDWORD | dwEventMask,
|  | [in] RtBool | bFullRollbackScan |
| ) |  |  |

Adds new listener for node events with specified mask and specification of event rollback.

Parameters:

  | pListener | [in] .
  | dwEventMask | [in] .
  | bFullRollbackScan | [in] .

HRESULT IRsBaseNode::Unhook | ( | [in] IRsNotify * | pListener | ) |

Removes event listener.

Parameters:

  | pListener | [in] .

HRESULT IRsBaseNode::EnumNotifiedNodes | ( | [out] IRsEnumNodes ** | ppEnum | ) |

Returns node enumerator which are registered as listener for events.

Parameters:

  | ppEnum | [out] .

HRESULT IRsBaseNode::GetDesc | ( | [out, retval] IUnknown ** | ppDesc | ) |

Returns object descriptor.

Returns:
  ppDesc [out,retval] .

HRESULT IRsBaseNode::IsDirty | ( | void |  | ) |

Is dirty.

HRESULT IRsBaseNode::Load | ( | [in] IStream * | pStm,
|  | [in] RtObjFileHeaderInfo * | pObjFileHeaderInfo |
| ) |  |  |

Parameters:

  | pStm | [in] .
  | pObjFileHeaderInfo | [in] .

HRESULT IRsBaseNode::Save | ( | [in] IStream * | pStm,
|  | RtBOOL | fClearDirty |
| ) |  |  |

Parameters:

  | pStm | [in] .

HRESULT IRsBaseNode::GetFileHeaderInfo | ( | [out, retval] RtObjFileHeaderInfo * | pcbSize | ) |

Returns:
  pcbSize [out,retval] .

HRESULT IRsBaseNode::GetPersistentID | ( | RtPersistId * | pPersistId | ) |

GetPersistentID

HRESULT IRsBaseNode::PostLoad | ( | IRsConSolver * | pPostLoad | ) |

PostLoad