The Implementation Repository can be accessed and updated dynamically using the programmatic interface provided by the ImplRepository class (defined in "implrep.idl"). The global variable SOMD_ImplRepObject is initialized by SOMD_Init to point to the ImplRepositor object. The following methods are defined on it:
void add_impldef (in ImplementationDef impldef)
Adds an implementation definition to the Implementation Repository. (Note: The value of the "impl_id" attribute is ignored. A unique ImplId will be generated for the newly added ImplementationDef.)
void delete_impldef (in ImplId implid);
Deletes an implementation definition from the Implementation Repository.
void update_impldef(in ImplementationDef impldef);
Updates the implementation definition (defined by the "impl_id" of the supplied implementationDef) in the Implementation Repository.
ImplementationDef find_impldef(in ImplId implid);
Returns a server implementation definition given its ID.
ImplementationDef find_impldef_by_alias(in string alias_name);
Returns a server implementation definition, given its user-friendly alias.
sequence<ImplementationDef> find_impldef_by_class (in string classname)
Returns a sequence of ImplementationDefs for those servers that have an association with the specified class. Typically, a server is associated with the classes it knows how to implement, by registering its known classes via the add_class_to_impldef method.
ORBStatus find_all_impldefs (out sequence<ImplementationDef> outimpldefs);
Retrieves all ImplementationDef objects in the Implementation Repository.
The following methods maintain an association between server implementations and the names of the classes they implement. These methods effectively maintain a mapping of <className, Implid>.
void add_class_to_impldef (in ImplId implid, in string classname);
Associates a class, identified by name, with a server, identified by its ImplId. This type of association is used to lookup server implementations via the find_impldef_by_class method.
void remove_class_from_impldef ( in ImplId implid, in string classname);
Removes the association of a particular class with a server.
void remove_class_from_all ( in string classname ) ;
Removes the association of a particular class from all server implementations in the Implementation Repository.
sequence<string> find_classes_by_impldef (in ImplId implid);
Returns a sequence of class names associated with a server.
With the ImplRepository programmatic interface, it is possible for an application to define additional server implementations at run time.