Class Definition File | NmSpcMg.idl |
Class C++ Binding | NmSpcMg.xh |
Class Hierarchy |
SOMObject SOMClass ODObject ODBaseNameSpaceManager ODNameSpaceManager |
Description | An object of the ODNameSpaceManager class manages the creation and deletion of name spaces among OpenDoc and any associated parts. When a document is opened, the session object creates a single name-space-manager object. All parts of that document share the name-space manager; you can obtain a reference to it by calling the session object's GetNameSpaceManager method. A part creates a name space by calling the name-space manager's CreateNameSpace method. Name spaces can be arranged hierarchically to facilitate searches among multiple name spaces. To obtained a reference to an existing name spaces, a part calls the name-space manager's HasNameSpace method. For additional information related to name spaces, see the descriptions of the classes ODNameSpace, ODObjectNameSpace, and ODValueNameSpace. |
Methods | The methods defined by the ODNameSpaceManager class include: |
Overridden Methods | There are no methods overridden by the ODNameSpaceManager class. |
This method creates a new name space.
Signature
ODNameSpace *CreateNameSpace (ODISOStr spaceName, ODNameSpace *inheritsFrom, ODULong numExpectedEntries, ODNSTypeSpec type) |
Parameters
kODNSDataTypeODObject | An object name space. |
kODNSDataTypeODValue | An value name space. |
Returns
Remarks
This method creates a new object name space or a new value name space, as specified by the type parameter. The spaceName parameter should specify a unique name for the new name space.
If the inheritsFrom parameter is not null, it should specify a parent name space of the same type as the one being created.
Because the current implementation of name spaces uses a hash table, the value you specify in the numExpectedEntries parameter should be a prime number to make a hashing algorithm much more efficient. Choose a prime number close to the expected number of entries. The name space can accommodate more entries than you specify (at the expense of performance), but it cannot grow in size.
Related Methods
This method deletes the specified name space.
Signature
void DeleteNameSpace (ODNameSpace *theNameSpace) |
Parameters
Returns
None.
Remarks
This method deletes the specified name space by removing it from the name-space manager's internal tables and deallocating the memory associated with the object.
If the specified name space was a parent to any other name spaces, those name spaces no longer have a parent name space.
Related Methods
This method checks whether a specified name space exists and, if so, returns a reference to it.
Signature
ODNameSpace *HasNameSpace (ODISOStr spaceName) |
Parameters
Returns
Remarks
You can call this method to check whether a name space with the specified name exists or to obtain a reference to a specific name space.
When you create a name space, you specify its name in the spaceName parameter of the name-space manager's CreateNameSpace method.
Related Methods