# IRnEncapsulator Interface Reference

Inherits IRsObject.

List of all members.

## Public Member Functions
HRESULT | AddSubObject ([in] IRsNode *pNode)
HRESULT | GetSubObjectCount ([out, retval] RtUlong *pNumSubObjs)
HRESULT | GetSubObject ([in] RtUlong index,[out, retval] IRsNode **ppSubObj)
HRESULT | GetSubObjects ([out, retval] SAFEARRAY **ppSubObjs)
HRESULT | GetOwner ([out, retval] IRnEncapsulator **ppOwner)
HRESULT | RemoveSubObject ([in] IRsNode *pSubObj)
HRESULT | Type ([out, retval] GUID *pId)
HRESULT | FindNodeByName ([in] LPCWSTR bstrName,[out, retval] IRsNode **ppNode)
HRESULT | FindConByFullName ([in] LPCWSTR bstrName,[out, retval] IRsConnector **ppCon)
HRESULT | GenerateNodeName ([in] const BSTR bstrBaseName,[out, retval] BSTR *pRetName)
HRESULT | RegisterNodeName ([in] IRsNode *pNode,[in] const BSTR bstrName)
HRESULT | UnregisterNodeName ([in] IRsNode *pNode,[in] const BSTR bstrName)
HRESULT | EnumSubObjects ([out] IRsEnumNodes **ppEnum)

## Detailed Description

Encapsulator node containing capable of containing sub-nodes:

## Member Function Documentation

HRESULT IRnEncapsulator::AddSubObject | ( | [in] IRsNode * | pNode | ) |

Adds new subobject into encapsulator.

Parameters:

  | pNode | [in] .

HRESULT IRnEncapsulator::GetSubObjectCount | ( | [out, retval] RtUlong * | pNumSubObjs | ) |

Get count of subobjects in encapsulator.

Returns:
  pNumSubObjs [out,retval] .

HRESULT IRnEncapsulator::GetSubObject | ( | [in] RtUlong | index,
|  | [out, retval] IRsNode ** | ppSubObj |
| ) |  |  |

Gets direct subobject on specified index.

Parameters:

  | index | [in] .

Returns:
  ppSubObj [out,retval] .

HRESULT IRnEncapsulator::GetSubObjects | ( | [out, retval] SAFEARRAY ** | ppSubObjs | ) |

Gets number of direct subobjects

Returns:
  ppSubObjs [out,retval] .

HRESULT IRnEncapsulator::GetOwner | ( | [out, retval] IRnEncapsulator ** | ppOwner | ) |

GEts the owner of node.

Returns:
  ppOwner [out,retval] .

HRESULT IRnEncapsulator::RemoveSubObject | ( | [in] IRsNode * | pSubObj | ) |

Removes specified subobject from encapsulator.

Parameters:

  | pSubObj | [in] .

HRESULT IRnEncapsulator::Type | ( | [out, retval] GUID * | pId | ) |

Returns CLSID of node.

Returns:
  pId [out,retval] .

HRESULT IRnEncapsulator::FindNodeByName | ( | [in] LPCWSTR | bstrName,
|  | [out, retval] IRsNode ** | ppNode |
| ) |  |  |

Recursively searches for node by name (levels are separated by / (slash)).

Parameters:

  | bstrName | [in] .

Returns:
  ppNode [out,retval] .

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

Searches for connector specified by [node_name]/[connector_name] (e.g. Projec/Space 3D/Sphere/Mesh).

Parameters:

  | bstrName | [in] .

Returns:
  ppCon [out,retval] .

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

Generates appropriate name for specified subobject to secure its uniqueness.

Parameters:

  | bstrBaseName | [in] .

Returns:
  pRetName [out,retval] .

HRESULT IRnEncapsulator::RegisterNodeName | ( | [in] IRsNode * | pNode,
|  | [in] const BSTR | bstrName |
| ) |  |  |

Registers specified node with specified name. No other node can have the same name afterwards.

Parameters:

  | pNode | [in] .
  | bstrName | [in] .

HRESULT IRnEncapsulator::UnregisterNodeName | ( | [in] IRsNode * | pNode,
|  | [in] const BSTR | bstrName |
| ) |  |  |

Removes registration of node name.

Parameters:

  | pNode | [in] .
  | bstrName | [in] .

HRESULT IRnEncapsulator::EnumSubObjects | ( | [out] IRsEnumNodes ** | ppEnum | ) |

Returns enumerator of subobjects.

Parameters:

  | ppEnum | [out] .