This module contains functions for managing the Interface Repository (IFR). This documentation should be used in conjunction with the documentation in chapter 6 of Common Object Request Broker Architecture (CORBA) 2.0. Whenever the term IFR object is used in this manual page, it refers to a pseudo object used only for interaction with the IFR rather than a CORBA object.
The following functions are used to initialise the Interface Repository and to obtain the initial reference to the repository.
Nodes = list()Timeout = integer() | infinityThis function should be called to initialise the IFR. It creates the necessary mnesia-tables. A mnesia schema should exist, and mnesia must be running.
find_repository() -> #IFR_Repository_objref
Find the IFR object reference for the Repository. This reference should be used when adding objects to the IFR, and when extracting information from the IFR. The first time this function is called, it will create the repository and all the primitive definitions.
The following functions are the methods of the IFR. The first argument is always an #IFR_objref, i.e. the IFR (pseudo)object on which to apply this method. These functions are useful when the type of IFR object is not know, but they are somewhat slower than the specific functions listed below which only accept a particular type of IFR object as the first argument.
get_def_kind(Objref) -> Return
Objref = #IFR_objrefReturn = atom() (one of dk_none, dk_all, dk_Attribute,
dk_Constant, dk_Exception, dk_Interface, dk_Module,
dk_Operation, dk_Typedef, dk_Alias, dk_Struct, dk_Union,
dk_Enum, dk_Primitive, dk_String, dk_Sequence, dk_Array,
dk_Repository)Objref is an IFR object of any kind. Returns the definition kind of the IFR object.
Objref = #IFR_objectReturn = tuple()Objref is an IFR object of any kind except IRObject, Contained and Container. Destroys that object and its contents (if any). Returns whatever mnesia:transaction returns.
Objref = #IFR_objectReturn = string()Objref is an IFR object of any kind that inherits from Contained. Returns the repository id of that object.
Objref = #IFR_objectId = string()Objref is an IFR object of any kind that inherits from Contained. Sets the repository id of that object.
Objref = #IFR_objectReturn = string()Objref is an IFR object of any kind that inherits from Contained. Returns the name of that object.
Objref = #IFR_objectName = string()Objref is an IFR object of any kind that inherits from Contained. Sets the name of that object.
Objref = #IFR_objectReturn = string()Objref is an IFR object of any kind that inherits from Contained. Returns the version of that object.
set_version(Objref,Version) -> ok
Objref = #IFR_objectVersion = string()Objref is an IFR object of any kind that inherits from Contained. Sets the version of that object.
get_defined_in(Objref) -> Return
Objref = #IFR_objectReturn = #IFR_Container_objrefObjref is an IFR object of any kind that inherits from Contained. Returns the Container object that the object is defined in.
get_absolute_name(Objref) -> Return
Objref = #IFR_objectReturn = string()Objref is an IFR object of any kind that inherits from Contained. Returns the absolute (scoped) name of that object.
get_containing_repository(Objref) -> Return
Objref = #IFR_objectReturn = #IFR_Repository_objrefObjref is an IFR object of any kind that inherits from Contained. Returns the Repository that is eventually reached by recursively following the object's defined_in attribute.
Objref = #IFR_objectReturn = tuple() (a contained_description record) | {exception, _}Objref is an IFR object of any kind that inherits from Contained. Returns a tuple describing the object.
move(Objref,New_container,New_name,New_version) -> Return
Objref = #IFR_objrefNew_container = #IFR_Container_objrefNew_name = string()New_version = string()Return = ok | {exception, _}Objref is an IFR object of any kind that inherits from Contained. New_container is an IFR object of any kind that inherits from Container. Removes Objref from its current Container, and adds it to New_container. The name attribute is changed to New_name and the version attribute is changed to New_version.
lookup(Objref,Search_name) -> Return
Objref = #IFR_objrefSearch_name = string()Return = #IFR_objectObjref is an IFR object of any kind that inherits from Container. Returns an IFR object identified by search_name (a scoped name).
contents(Objref,Limit_type,Exclude_inherited) -> Return
Objref = #IFR_objrefLimit_type = atom() (one of dk_none, dk_all, dk_Attribute,
dk_Constant, dk_Exception, dk_Interface, dk_Module,
dk_Operation, dk_Typedef, dk_Alias, dk_Struct, dk_Union,
dk_Enum, dk_Primitive, dk_String, dk_Sequence, dk_Array,
dk_Repository)Exclude_inherited = atom() (true or false)Return = list() (a list of IFR#_objects)Objref is an IFR object of any kind that inherits from Container. Returns the contents of that IFR object.
lookup_name(Objref,Search_name,Levels_to_search,
Limit_type, Exclude_inherited) -> Return
Objref = #IFR_objrefSearch_name = string()Levels_to_search = integer()Limit_type = atom() (one of dk_none, dk_all, dk_Attribute,
dk_Constant, dk_Exception, dk_Interface, dk_Module,
dk_Operation, dk_Typedef, dk_Alias, dk_Struct, dk_Union,
dk_Enum, dk_Primitive, dk_String, dk_Sequence, dk_Array,
dk_Repository)Exclude_inherited = atom() (true or false)Return = list() (a list of #IFR_objects)Objref is an IFR object of any kind that inherits from Container. Returns a list of #IFR_objects with an id matching Search_name.
describe_contents(Objref,Limit_type,Exclude_inherited,Max_returned_objs) -> Return
Objref = #IFR_objrefLimit_type = atom() (one of dk_none, dk_all, dk_Attribute,
dk_Constant, dk_Exception, dk_Interface, dk_Module,
dk_Operation, dk_Typedef, dk_Alias, dk_Struct, dk_Union,
dk_Enum, dk_Primitive, dk_String, dk_Sequence, dk_Array,
dk_Repository)Exclude_inherited = atom() (true or false)Return = list() (a list of tuples (contained_description records) | {exception, _}Objref is an IFR object of any kind that inherits from Container. Returns a list of descriptions of the IFR objects in this Container's contents.
create_module(Objref,Id,Name,Version) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Return = #IFR_ModuleDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type ModuleDef.
create_constant(Objref,Id,Name,Version,Type,Value) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Type = #IFR_IDLType_objrefValue = any()Return = #IFR_ConstantDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type ConstantDef.
create_struct(Objref,Id,Name,Version,Members) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Members = list() (list of structmember records)Return = #IFR_StructDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type StructDef.
create_union(Objref,Id,Name,Version,Discriminator_type,Members) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Discriminator_type = #IFR_IDLType_ObjrefMembers = list() (list of unionmember records)Return = #IFR_UnionDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type UnionDef.
create_enum(Objref,Id,Name,Version,Members) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Members = list() (list of strings)Return = #IFR_EnumDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type EnumDef.
create_alias(Objref,Id,Name,Version,Original_type) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Original_type = #IFR_IDLType_ObjrefReturn = #IFR_AliasDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type AliasDef.
create_interface(Objref,Id,Name,Version,Base_interfaces) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Base_interfaces = list() (a list of IFR_InterfaceDef_objrefs that this interface inherits fromReturn = #IFR_InterfaceDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type InterfaceDef.
create_exception(Objref,Id,Name,Version,Members) -> Return
Objref = #IFR_objrefId = string()Name = string()Version = string()Members = list() (list of structmember records)Return = #IFR_ExceptionDef_objrefObjref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type ExceptionDef.
Objref = #IFR_objrefReturn = tuple() (a typecode tuple)Objref is an IFR object of any kind that inherits from IDLType or an IFR object of the kind ConstantDef, ExceptionDef or AttributeDef. Returns the typecode of the IFR object.
lookup_id(Objref,Search_id) -> Return
Objref = #IFR_Repository_objrefSearch_id = string()Return = #IFR_objrefReturns an IFR object matching the Search_id.
get_primitive(Objref,Kind) -> Return
Objref = #IFR_Repository_objrefKind = atom() (one of pk_null, pk_void, pk_short, pk_long,
pk_ushort, pk_ulong, pk_float, pk_double, pk_boolean, pk_char,
pk_octet, pk_any, pk_TypeCode, pk_Principal, pk_string,
pk_objref)Return = #IFR_PrimitiveDef_objrefReturns a PrimitiveDef of the specified kind.
create_string(Objref,Bound) -> Return
Objref = #IFR_Repository_objrefBound = integer() (unsigned long /= 0)Return = #IFR_StringDef_objrefCreates an IFR objref of the type StringDef.
create_sequence(Objref,Bound,Element_type) -> Return
Objref = #IFR_Repository_objrefBound = integer() (unsigned long)Element_type = #IFR_IDLType_objrefReturn = #IFR_SequenceDef_objrefCreates an IFR objref of the type SequenceDef.
create_array(Objref,Length,Element_type) -> Return
Objref = #IFR_Repository_objrefBound = integer() (unsigned long)Element_type = #IFR_IDLType_objrefReturn = #IFR_ArrayDef_objrefCreates an IFR objref of the type ArrayDef.
create_idltype(Objref,Typecode) -> Return
Objref = #IFR_Repository_objrefTypecode = tuple() (a typecode tuple)Return = #IFR_IDLType_objrefCreates an IFR objref of the type IDLType.
get_type_def(Objref) -> Return
Objref = #IFR_objrefReturn = #IFR_IDLType_objrefObjref is an IFR object of the kind ConstantDef or AttributeDef. Returns an IFR object of the type IDLType describing the type of the IFR object.
set_type_def(Objref,TypeDef) -> Return
Objref = #IFR_objrefTypeDef = #IFR_IDLType_objrefReturn = ok | {exception, _}Objref is an IFR object of the kind ConstantDef or AttributeDef. Sets the type_def of the IFR Object.
Objref = #IFR_ConstantDef_objrefReturn = any()Returns the value attribute of an IFR Object of the type ConstantDef.
set_value(Objref,Value) -> Return
Objref = #IFR_ConstantDef_objrefValue = any()Return = ok | {exception, _}Sets the value attribute of an IFR Object of the type ConstantDef.
Objref = #IFR_objrefReturn = list()Objref is an IFR object the kind StructDef, UnionDef, EnumDef or ExceptionDef. For StructDef, UnionDef and ExceptionDef: Returns a list of structmember records that are the constituent parts of the object. For EnumDef: Returns a list of strings describing the enumerations.
set_members(Objref,Members) -> Return
Objref = #IFR_objrefMembers = list()Return = ok | {exception, _}Objref is an IFR object the kind StructDef, UnionDef, EnumDef or ExceptionDef. For StructDef, UnionDef and ExceptionDef: Members is a list of structmember records. For EnumDef: Members is a list of strings describing the enumerations. Sets the members attribute, which are the constituent parts of the exception.
get_discriminator_type(Objref) -> Return
Objref = #IFR_UnionDef_objrefReturn = tuple() (a typecode tuple)Returns the discriminator typecode of an IFR object of the type UnionDef.
get_discriminator_type_def(Objref) -> Return
Objref = #IFR_UnionDef_objrefReturn = #IFR_IDLType_objrefReturns an IFR object of the type IDLType describing the discriminator type of an IFR object of the type UnionDef.
set_discriminator_type_def(Objref,TypeDef) -> Return
Objref = #IFR_UnionDef_objrefReturn = #IFR_IDLType_objrefSets the attribute discriminator_type_def, an IFR object of the type IDLType describing the discriminator type of an IFR object of the type UnionDef.
get_original_type_def(Objref) -> Return
Objref = #IFR_AliasDef_objrefReturn = #IFR_IDLType_objrefReturns an IFR object of the type IDLType describing the original type.
set_original_type_def(Objref,TypeDef) -> Return
Objref = #IFR_AliasDef_objrefTypedef = #IFR_IDLType_objrefReturn = ok | {exception, _}Sets the original_type_def attribute which describes the original type.
Objref = #IFR_PrimitiveDef_objrefReturn = atom()Returns an atom describing the primitive type (See CORBA 2.0 p 6-21).
Objref = #IFR_objrefReturn = integer (unsigned long)Objref is an IFR object the kind StringDef or SequenceDef. For StringDef: returns the maximum number of characters in the string. For SequenceDef: Returns the maximum number of elements in the sequence. Zero indicates an unbounded sequence.
set_bound(Objref,Bound) -> Return
Objref = #IFR_objrefBound = integer (unsigned long)Return = ok | {exception, _}Objref is an IFR object the kind StringDef or SequenceDef. For StringDef: Sets the maximum number of characters in the string. Bound must not be zero. For SequenceDef: Sets the maximum number of elements in the sequence. Zero indicates an unbounded sequence.
get_element_type(Objref) -> Return
Objref = #IFR_objrefReturn = tuple() (a typecode tuple)Objref is an IFR object the kind SequenceDef or ArrayDef. Returns the typecode of the elements in the IFR object.
get_element_type_def(Objref) -> Return
Objref = #IFR_objrefReturn = #IFR_IDLType_objrefObjref is an IFR object the kind SequenceDef or ArrayDef. Returns an IFR object of the type IDLType describing the type of the elements in Objref.
set_element_type_def(Objref,TypeDef) -> Return
Objref = #IFR_objrefTypeDef = #IFR_IDLType_objrefReturn = ok | {exception, _}Objref is an IFR object the kind SequenceDef or ArrayDef. Sets the element_type_def attribute, an IFR object of the type IDLType describing the type of the elements in Objref.
Objref = #IFR_ArrayDef_objrefReturn = integer() (unsigned long)Returns the number of elements in the array.
set_length(Objref,Length) -> Return
Objref = #IFR_ArrayDef_objrefLength = integer() (unsigned long)Sets the number of elements in the array.
Objref = #IFR_objrefReturn = atom()Objref is an IFR object the kind AttributeDef or OperationDef. For AttributeDef: Return is an atom ('ATTR_NORMAL' or 'ATTR_READONLY') specifying the read/write access for this attribute. For OperationDef: Return is an atom ('OP_NORMAL' or 'OP_ONEWAY') specifying the mode of the operation.
set_mode(Objref,Mode) -> Return
Objref = #IFR_objrefMode = atom()Return = ok | {exception, _}Objref is an IFR object the kind AttributeDef or OperationDef. For AttributeDef: Sets the read/write access for this attribute. Mode is an atom ('ATTR_NORMAL' or 'ATTR_READONLY'). For OperationDef: Sets the mode of the operation. Mode is an atom ('OP_NORMAL' or 'OP_ONEWAY').
Objref = #IFR_OperationDef_objrefReturn = tuple() (a typecode tuple)Returns a typecode describing the type of the value returned by the operation.
get_result_def(Objref) -> Return
Objref = #IFR_OperationDef_objrefReturn = #IFR_IDLType_objrefReturns an IFR object of the type IDLType describing the type of the result.
set_result_def(Objref,ResultDef) -> Return
Objref = #IFR_OperationDef_objrefResultDef = #IFR_IDLType_objrefReturn = ok | {exception, _}Sets the type_def attribute, an IFR Object of the type IDLType describing the result.
Objref = #IFR_OperationDef_objrefReturn = list() (list of parameter description records)Returns a list of parameter description records, which describes the parameters of the OperationDef.
set_params(Objref,Params) -> Return
Objref = #IFR_OperationDef_objrefParams = list() (list of parameterdescription records)Return = ok | {exception, _}Sets the params attribute, a list of parameterdescription records.
get_contexts(Objref) -> Return
Objref = #IFR_OperationDef_objrefReturn = list() (list of strings)Returns a list of context identifiers for the operation.
set_contexts(Objref,Contexts) -> Return
Objref = #IFR_OperationDef_objrefContexts = list() (list of strings)Return = ok | {exception, _}Sets the context attribute for the operation.
get_exceptions(Objref) -> Return
Objref = #IFR_OperationDef_objrefReturn = list() (list of #IFR_ExceptionDef_objrefs)Returns a list of exception types that can be raised by this operation.
set_exceptions(Objref,Exceptions) -> Return
Objref = #IFR_OperationDef_objrefExceptions = list() (list of #IFR_ExceptionDef_objrefs)Return = ok | {exception, _}Sets the exceptions attribute for this operation.
get_base_interfaces(Objref) -> Return
Objref = #IFR_InterfaceDef_objrefReturn = list() (list of #IFR_InterfaceDef_objrefs)Returns a list of InterfaceDefs from which this InterfaceDef inherits.
set_base_interfaces(Objref,BaseInterfaces) -> Return
Objref = #IFR_InterfaceDef_objrefBaseInterfaces = list() (list of #IFR_InterfaceDef_objrefs)Return = ok | {exception, _}Sets the BaseInterfaces attribute.
is_a(Objref,Interface_id) -> Return
Objref = #IFR_InterfaceDef_objrefInterface_id = #IFR_InterfaceDef_objrefReturn = atom() (true or false)Returns true if the InterfaceDef either is identical to or inherits from Interface_id.
describe_interface(Objref) -> Return
Objref = #IFR_InterfaceDef_objrefReturn = tuple() (a fullinterfacedescription record)Returns a full inter face description record describing the InterfaceDef.
create_attribute(Objref,Id,Name,Version,Type,Mode) -> Return
Objref = #IFR_InterfaceDef_objrefId = string()Name = string()Version = string()Type = #IFR_IDLType_objrefMode = atom() ('ATTR_NORMAL' or 'ATTR_READONLY')Return = #IFR_AttributeDef_objrefCreates an IFR object of the type AttributeDef contained in this InterfaceDef.
create_operation(Objref,Id,Name,Version,Result,Mode,Params,
Exceptions,Contexts) -> Return
Objref = #IFR_InterfaceDef_objrefId = string()Name = string()Version = string()Result = #IFR_IDLType_objrefMode = atom() ('OP_NORMAL' or 'OP_ONEWAY')Params = list() (list of parameterdescription records)Exceptions = list() (list of #IFR_ExceptionDef_objrefs)Contexts = list() (list of strings)Return = #IFR_OperationDef_objrefCreates an IFR object of the type OperationDef contained in this InterfaceDef.