NonStop Serverware

Repository

Previous Topic | Next Topic | Contents | Index
Getting Started | Administration Guide | Programmer's Guide

Subtopics

Repository Syntax
Repository::create_array( )
Repository::create_sequence( )
Repository::create_string( )
Repository::get_primitive( )
Repository::describe_contents( )
Repository::lookup_id( )

Repository is a public interface that provides global access to the Interface Repository, which is used to contain the definitions of objects that are available to clients. The Repository object can contain constants, typedefs, exceptions, interfaces, and modules. It inherits from Container; therefore, you can use its methods for storing and retrieving definitions (whether globally defined or defined in a module or interface).

Repository Syntax

module CORBA {

    interface Repository : Container {
    Contained lookup_id (in RepositoryId <search_id>);
	
    PrimitiveDef get_primitive (in PrimitiveKind <kind>);
	
    StringDef create_string (in unsigned long <bound>);
	
    SequenceDef create_sequence (
    in unsigned long <bound>,
    in IDLType <element_type>);

    ArrayDef create_array (
    in unsigned long length,
    in IDLType <element_type>);
    };
};

Repository::create_array( )

This returns a new array object defining an anonymous type. The array object is used in the definition of one other object and is deleted when the object in which it is contained is deleted. The application must delete any anonymous type object it creates if the object is not used in the definition of a Contained object.

Syntax

ArrayDef create_array (in unsigned long <length>,
    in IDLType <element_type>);

Parameters

<length>
The number of elements in the array.

<element_type>
The type of element the array will contain.

See Also

ArrayDef
IRObject

Repository::create_sequence( )

This returns a sequence object defining an anonymous type. The sequence object must be used in the definition of another object and is deleted when the object in which it is contained is deleted. The application must delete any anonymous type object it creates if the object is not used in the definition of a Contained object.

Syntax

SequenceDef create_sequence (in unsigned long <bound>,
    in IDLType <element_type>);

Parameters

<bound>
The number of elements in the sequence where 0 indicates an unbound sequence.

<element_type>
The type of element that the sequence will contain.

See Also

SequenceDef

Repository::create_string( )

This returns a string object defining an anonymous type. The string object must be used in the definition of another object and is deleted when the object in which it is contained is deleted. The application must delete any anonymous type object it creates if the object is not used in the definition of a Contained object.

Syntax

StringDef create_string (in unsigned long <bound>);

Parameters

<bound>
The maximum number of characters in the string (the number must be greater than 0).

Repository::get_primitive( )

This returns a reference to a PrimitiveDef of the specified PrimitiveKind. All PrimitiveDefs are owned by the repository, one primitive object per primitive type (for example, short, long, unsigned short, unsigned long, etc.

Syntax

PrimitiveDef get_primitive (in PrimitiveKind kind);

Repository::describe_contents( )

This operation is inherited from the Container interface. It returns a sequence of Container::Description structures. The structure is defined as follows:

struct Description {
  Contained <contained_object>
  DefinitionKind <kind>;
  any <value>;
};

where:

<contained_object>
The object reference of type Contained of the top-level object. The describe( ) function can be called on an object reference of type Contained to get further information on a top-level object in the repository.

<kind>
The kind of the object being described.

<value>
An any that can contain one of the following structs:

ModuleDescription
ConstantDescription
TypeDescription
ExceptionDescription
AttributeDescription
ParameterDescription
OperationDescription
InterfaceDescription

Syntax

sequence<Description> describe_contents (
    in InterfaceName restrict_type,
	in boolean exclude_inherited,
	in long max_returned_objs);

See Also

Container::describe_contents( )

Repository::lookup_id( )

This operation returns an object contained within the repository given its RepositoryId.

Syntax

Contained lookup_id (in RepositoryId <search_id>);

See Also

Contained


Previous Topic | Next Topic | Contents | Top
Getting Started Guide | Administration Guide | Programmer's Guide
Bibliography | Glossary | Index
© Tandem, a division of Compaq. All rights reserved. Legal notices.