---
name: "orber_ifr"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:19.2.1+dfsg-2+deb9u3"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/orber_ifr"
---

# orber\_ifr(3erl)

The Interface Repository stores representations of IDL information

## NAME

orber\_ifr - The Interface Repository stores representations of IDL information

## DESCRIPTION

This module contains functions for managing the Interface Repository (IFR). This documentation should be used in conjunction with the documentation in chapter 6 of 2.3. 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.

## INITIALIZATION OF THE IFR

The following functions are used to initialize the Interface Repository and to obtain the initial reference to the repository.

## EXPORTS

**init(Nodes,Timeout) -\> ok**\

Types:

Nodes = list()\
 Timeout = integer() \| infinity\

This function should be called to initialize 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.

## GENERAL METHODS

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.

## EXPORTS

**get\_def\_kind(Objref) -\> Return**\

Types:

Objref = #IFR\_objref\
 Return = 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\_Wstring, dk\_Fixed, dk\_Sequence, dk\_Array, dk\_Repository)\

Objref is an IFR object of any kind. Returns the definition kind of the IFR object.

**destroy(Objref) -\> Return**\

Types:

Objref = #IFR\_object\
 Return = 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.

**get\_id(Objref) -\> Return**\

Types:

Objref = #IFR\_object\
 Return = string()\

Objref is an IFR object of any kind that inherits from Contained. Returns the repository id of that object.

**set\_id(Objref,Id) -\> ok**\

Types:

Objref = #IFR\_object\
 Id = string()\

Objref is an IFR object of any kind that inherits from Contained. Sets the repository id of that object.

**get\_name(Objref) -\> Return**\

Types:

Objref = #IFR\_object\
 Return = string()\

Objref is an IFR object of any kind that inherits from Contained. Returns the name of that object.

**set\_name(Objref,Name) -\> ok**\

Types:

Objref = #IFR\_object\
 Name = string()\

Objref is an IFR object of any kind that inherits from Contained. Sets the name of that object.

**get\_version(Objref) -\> Return**\

Types:

Objref = #IFR\_object\
 Return = string()\

Objref is an IFR object of any kind that inherits from Contained. Returns the version of that object.

**set\_version(Objref,Version) -\> ok**\

Types:

Objref = #IFR\_object\
 Version = string()\

Objref is an IFR object of any kind that inherits from Contained. Sets the version of that object.

**get\_defined\_in(Objref) -\> Return**\

Types:

Objref = #IFR\_object\
 Return = #IFR\_Container\_objref\

Objref 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**\

Types:

Objref = #IFR\_object\
 Return = 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**\

Types:

Objref = #IFR\_object\
 Return = #IFR\_Repository\_objref\

Objref 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.

**describe(Objref) -\> Return**\

Types:

Objref = #IFR\_object\
 Return = 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**\

Types:

Objref = #IFR\_objref\
 New\_container = #IFR\_Container\_objref\
 New\_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**\

Types:

Objref = #IFR\_objref\
 Search\_name = string()\
 Return = #IFR\_object\

Objref 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**\

Types:

Objref = #IFR\_objref\
 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\_Wstring, dk\_Fixed, 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**\

Types:

Objref = #IFR\_objref\
 Search\_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\_Wstring, dk\_Fixed, 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**\

Types:

Objref = #IFR\_objref\
 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\_Wstring, dk\_Fixed, 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Return = #IFR\_ModuleDef\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Type = #IFR\_IDLType\_objref\
 Value = any()\
 Return = #IFR\_ConstantDef\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Members = list() (list of structmember records)\
 Return = #IFR\_StructDef\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Discriminator\_type = #IFR\_IDLType\_Objref\
 Members = list() (list of unionmember records)\
 Return = #IFR\_UnionDef\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Members = list() (list of strings)\
 Return = #IFR\_EnumDef\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Original\_type = #IFR\_IDLType\_Objref\
 Return = #IFR\_AliasDef\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Base\_interfaces = list() (a list of IFR\_InterfaceDef\_objrefs that this interface inherits from\
 Return = #IFR\_InterfaceDef\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Members = list() (list of structmember records)\
 Return = #IFR\_ExceptionDef\_objref\

Objref is an IFR object of any kind that inherits from Container. Creates an IFR object of the type ExceptionDef.

**get\_type(Objref) -\> Return**\

Types:

Objref = #IFR\_objref\
 Return = 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**\

Types:

Objref = #IFR\_Repository\_objref\
 Search\_id = string()\
 Return = #IFR\_objref\

Returns an IFR object matching the Search\_id.

**get\_primitive(Objref,Kind) -\> Return**\

Types:

Objref = #IFR\_Repository\_objref\
 Kind = 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\_wstring, pk\_fixed, pk\_objref)\
 Return = #IFR\_PrimitiveDef\_objref\

Returns a PrimitiveDef of the specified kind.

**create\_string(Objref,Bound) -\> Return**\

Types:

Objref = #IFR\_Repository\_objref\
 Bound = integer() (unsigned long /= 0)\
 Return = #IFR\_StringDef\_objref\

Creates an IFR objref of the type StringDef.

**create\_wstring(Objref,Bound) -\> Return**\

Types:

Objref = #IFR\_Repository\_objref\
 Bound = integer() (unsigned long /= 0)\
 Return = #IFR\_WstringDef\_objref\

Creates an IFR objref of the type WstringDef.

**create\_fixed(Objref,Digits,Scale) -\> Return**\

Types:

Objref = #IFR\_Repository\_objref\
 Digits = Scale = integer()\
 Return = #IFR\_FixedDef\_objref\

Creates an IFR objref of the type FixedDef.

**create\_sequence(Objref,Bound,Element\_type) -\> Return**\

Types:

Objref = #IFR\_Repository\_objref\
 Bound = integer() (unsigned long)\
 Element\_type = #IFR\_IDLType\_objref\
 Return = #IFR\_SequenceDef\_objref\

Creates an IFR objref of the type SequenceDef.

**create\_array(Objref,Length,Element\_type) -\> Return**\

Types:

Objref = #IFR\_Repository\_objref\
 Bound = integer() (unsigned long)\
 Element\_type = #IFR\_IDLType\_objref\
 Return = #IFR\_ArrayDef\_objref\

Creates an IFR objref of the type ArrayDef.

**create\_idltype(Objref,Typecode) -\> Return**\

Types:

Objref = #IFR\_Repository\_objref\
 Typecode = tuple() (a typecode tuple)\
 Return = #IFR\_IDLType\_objref\

Creates an IFR objref of the type IDLType.

**get\_type\_def(Objref) -\> Return**\

Types:

Objref = #IFR\_objref\
 Return = #IFR\_IDLType\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 TypeDef = #IFR\_IDLType\_objref\
 Return = ok \| {exception, \_}\

Objref is an IFR object of the kind ConstantDef or AttributeDef. Sets the type\_def of the IFR Object.

**get\_value(Objref) -\> Return**\

Types:

Objref = #IFR\_ConstantDef\_objref\
 Return = any()\

Returns the value attribute of an IFR Object of the type ConstantDef.

**set\_value(Objref,Value) -\> Return**\

Types:

Objref = #IFR\_ConstantDef\_objref\
 Value = any()\
 Return = ok \| {exception, \_}\

Sets the value attribute of an IFR Object of the type ConstantDef.

**get\_members(Objref) -\> Return**\

Types:

Objref = #IFR\_objref\
 Return = 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**\

Types:

Objref = #IFR\_objref\
 Members = 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**\

Types:

Objref = #IFR\_UnionDef\_objref\
 Return = tuple() (a typecode tuple)\

Returns the discriminator typecode of an IFR object of the type UnionDef.

**get\_discriminator\_type\_def(Objref) -\> Return**\

Types:

Objref = #IFR\_UnionDef\_objref\
 Return = #IFR\_IDLType\_objref\

Returns 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**\

Types:

Objref = #IFR\_UnionDef\_objref\
 Return = #IFR\_IDLType\_objref\

Sets 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**\

Types:

Objref = #IFR\_AliasDef\_objref\
 Return = #IFR\_IDLType\_objref\

Returns an IFR object of the type IDLType describing the original type.

**set\_original\_type\_def(Objref,TypeDef) -\> Return**\

Types:

Objref = #IFR\_AliasDef\_objref\
 Typedef = #IFR\_IDLType\_objref\
 Return = ok \| {exception, \_}\

Sets the original\_type\_def attribute which describes the original type.

**get\_kind(Objref) -\> Return**\

Types:

Objref = #IFR\_PrimitiveDef\_objref\
 Return = atom()\

Returns an atom describing the primitive type (See CORBA 2.0 p 6-21).

**get\_bound(Objref) -\> Return**\

Types:

Objref = #IFR\_objref\
 Return = 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**\

Types:

Objref = #IFR\_objref\
 Bound = 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**\

Types:

Objref = #IFR\_objref\
 Return = 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**\

Types:

Objref = #IFR\_objref\
 Return = #IFR\_IDLType\_objref\

Objref 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**\

Types:

Objref = #IFR\_objref\
 TypeDef = #IFR\_IDLType\_objref\
 Return = 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.

**get\_length(Objref) -\> Return**\

Types:

Objref = #IFR\_ArrayDef\_objref\
 Return = integer() (unsigned long)\

Returns the number of elements in the array.

**set\_length(Objref,Length) -\> Return**\

Types:

Objref = #IFR\_ArrayDef\_objref\
 Length = integer() (unsigned long)\

Sets the number of elements in the array.

**get\_mode(Objref) -\> Return**\

Types:

Objref = #IFR\_objref\
 Return = 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**\

Types:

Objref = #IFR\_objref\
 Mode = 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').

**get\_result(Objref) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Return = tuple() (a typecode tuple)\

Returns a typecode describing the type of the value returned by the operation.

**get\_result\_def(Objref) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Return = #IFR\_IDLType\_objref\

Returns an IFR object of the type IDLType describing the type of the result.

**set\_result\_def(Objref,ResultDef) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 ResultDef = #IFR\_IDLType\_objref\
 Return = ok \| {exception, \_}\

Sets the type\_def attribute, an IFR Object of the type IDLType describing the result.

**get\_params(Objref) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Return = 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**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Params = list() (list of parameter description records)\
 Return = ok \| {exception, \_}\

Sets the params attribute, a list of parameter description records.

**get\_contexts(Objref) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Return = list() (list of strings)\

Returns a list of context identifiers for the operation.

**set\_contexts(Objref,Contexts) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Contexts = list() (list of strings)\
 Return = ok \| {exception, \_}\

Sets the context attribute for the operation.

**get\_exceptions(Objref) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Return = list() (list of #IFR\_ExceptionDef\_objrefs)\

Returns a list of exception types that can be raised by this operation.

**set\_exceptions(Objref,Exceptions) -\> Return**\

Types:

Objref = #IFR\_OperationDef\_objref\
 Exceptions = list() (list of #IFR\_ExceptionDef\_objrefs)\
 Return = ok \| {exception, \_}\

Sets the exceptions attribute for this operation.

**get\_base\_interfaces(Objref) -\> Return**\

Types:

Objref = #IFR\_InterfaceDef\_objref\
 Return = list() (list of #IFR\_InterfaceDef\_objrefs)\

Returns a list of InterfaceDefs from which this InterfaceDef inherits.

**set\_base\_interfaces(Objref,BaseInterfaces) -\> Return**\

Types:

Objref = #IFR\_InterfaceDef\_objref\
 BaseInterfaces = list() (list of #IFR\_InterfaceDef\_objrefs)\
 Return = ok \| {exception, \_}\

Sets the BaseInterfaces attribute.

**is\_a(Objref,Interface\_id) -\> Return**\

Types:

Objref = #IFR\_InterfaceDef\_objref\
 Interface\_id = #IFR\_InterfaceDef\_objref\
 Return = atom() (true or false)\

Returns true if the InterfaceDef either is identical to or inherits from Interface\_id.

**describe\_interface(Objref) -\> Return**\

Types:

Objref = #IFR\_InterfaceDef\_objref\
 Return = tuple() (a fullinterfacedescription record)\

Returns a full inter face description record describing the InterfaceDef.

**create\_attribute(Objref,Id,Name,Version,Type,Mode) -\> Return**\

Types:

Objref = #IFR\_InterfaceDef\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Type = #IFR\_IDLType\_objref\
 Mode = atom() ('ATTR\_NORMAL' or 'ATTR\_READONLY')\
 Return = #IFR\_AttributeDef\_objref\

Creates an IFR object of the type AttributeDef contained in this InterfaceDef.

**create\_operation(Objref,Id,Name,Version,Result,Mode,Params, Exceptions,Contexts) -\> Return**\

Types:

Objref = #IFR\_InterfaceDef\_objref\
 Id = string()\
 Name = string()\
 Version = string()\
 Result = #IFR\_IDLType\_objref\
 Mode = atom() ('OP\_NORMAL' or 'OP\_ONEWAY')\
 Params = list() (list of parameter description records)\
 Exceptions = list() (list of #IFR\_ExceptionDef\_objrefs)\
 Contexts = list() (list of strings)\
 Return = #IFR\_OperationDef\_objref\

Creates an IFR object of the type OperationDef contained in this InterfaceDef.
