CreateNameSpace
TheCreateNameSpacemethod creates a new name space.
ODNameSpace CreateNameSpace ( in ODISOStr spaceName, in ODNameSpace inheritsFrom, in ODULong numExpectedEntries, in ODNSTypeSpec type);
spaceName- A unique name for the new name space.
inheritsFrom- A reference to the parent name space of the new name space, or
kODNULLif this name space has no parent.numExpectedEntries- The expected number of entries to be stored in the new name space.
type- The type of the new name space. The type must be either object name space (
kODNSDataTypeODObject) or value name space (kODNSDataTypeODValue).- return value
- A reference to the newly created name space, or
kODNULLif a name space already exists with the specified name.DISCUSSION
You call this method to create either a new object name space or a new value name space, as specified by thetypeparameter. ThespaceNameparameter should specify a unique name for the new name space.If the
inheritsFromparameter 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
numExpectedEntriesparameter should be a prime number to make the hashing algorithm much more efficient. Choose a prime number close to, and greater than, 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.SEE ALSO
TheODISOStrtype (page 875).
TheODNameSpaceManager::DeleteNameSpacemethod (page 437).
TheODNameSpaceManager::HasNameSpacemethod (page 438).
TheODNameSpaceclass (page 428).
TheODObjectNameSpaceclass (page 450).
TheODValueNameSpaceclass (page 820).
Table 11-1 on page 466 in OpenDoc Programmer's Guide.