![]() |
Overview The create_module operation creates a new module definition (ModuleDef) in the Interface Repository. Original interface CORBA module: Container Interface Exceptions CORBA::SystemException
Intended Usage
The create_module operation returns a new empty ModuleDef object after it creates a corresponding new module representation in the Interface Repository persistent database. Definitions can be added using Container::create_ operations on the new module, or by using the Contained::move operation.
IDL Syntax
ModuleDef create_module (in RepositoryId id, in Identifier name, in VersionSpec version);
Input parameters
- name
- The name that will be associated with this ModuleDef object in the Interface Repository.
- id
- The id represents the CORBA::RepositoryId that will uniquely identify this ModuleDef within the Interface Repository.
- version
- The version number that will be associated with this ModuleDef object in the Interface Repository.
Return values
- ModuleDef_ptr
- A pointer to the created ModuleDef object is returned to the caller. The memory associated with this object can later be released by invoking CORBA::release.
Example
// C++ // repository_ptr has already been initialized . . . CORBA::Repository * repository_ptr; CORBA::ModuleDef * new_module; CORBA::RepositoryId modules_rep_id; CORBA::Identifier modules_name; CORBA::VersionSpec version; // establish the id, name, and version values for the module modules_rep_id = CORBA::string_dup ("unique RepositoryID for my module"); modules_name = CORBA::string_dup ("module new"); version = CORBA::string_dup ("1.0"); // create the new module new_module = repository_ptr-> create_module (modules_rep_id, modules_name