NonStop Serverware

Container

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

Subtopics

Container Syntax
Container::contents( )
Container::create_alias( )
Container::create_constant( )
Container::create_enum( )
Container::create_exception( )
Container::create_interface( )
Container::create_module( )
Container::create_struct( )
Container::create_union( )
Container::describe_contents( )
Container::lookup( )
Container::lookup_name( )
See Also

The Container interface describes attributes and operations that can contain objects:

Container Syntax

typedef sequence Contained ContainerSeq;

interface Container : IRObject {

Contained lookup(in ScopedName <search_name>);

   ContainedSeq contents(
      in DefinitionKind <limit_type>,
      in boolean <exclude_inherited>);
   ContainedSeq lookup_name(
      in Identifier <search_name>,
      in long <levels_to_search>,
      in DefinitionKind <limit_type>,
      in boolean <exclude_inherited>);
   struct Description {
      Contained <contained_object>;
      DefinitionKind kind;
      any <value>;
   }
   typedef sequence<Description> DescriptionSeq;
   
   DescriptionSeq describe_contents(
      DefinitionKind <limit_type>,
      in boolean <exclude_inherited>,
      in long <max_returned_objs>);
   ModuleDef create_module(
      in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>);
   ConstantDef create_constant(in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>,
      in IDLType <type>,
      in any <value>);
  StructDef <create_struct>(
      in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>,
      in StructMemberSeq <members>);
  UnionDef <create_union>(
      in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>,
      in IDLType <discriminator_type>,
      in UnionMemberSeq <members>);
  EnumDef create_enum(in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>,
      in EnumMemberSeq <members>);
  AliasDef create_alias(in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>,
      in IDLType <original_type>);
  InterfaceDef create_interface(
      in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>,
      in InterfaceDefSeq <base_interfaces>);
  ExceptionDef create_exception(in RepositoryId <id>,
      in Identifier <name>,
      in VersionSpec <version>,
      in StructMemberSeq <members>);
};

Container::contents( )

This operation returns a list of all objects contained by the object.

Syntax

ContainedSeq contents(
   in InterfaceName <restrict_type>,
   in boolean <exclude_inherited>);

Parameters

<restrict_type>
Specifies which of the Interface Repository objects to return: all means return all, specifying a type returns only objects of that type.

<exclude_inherited>
Specifies which objects to return to interfaces: TRUE means don't return inherited objects, and false means return all objects.

Container::create_alias( )

This creates a new AliasDef object within the target Container. The defined_in attribute is set to the target Container. The containing_repository attribute is set to the Repository in which the new AliasDef object is defined.

Syntax

AliasDef create_alias(in RepositoryId <id>,
    in Identifier <name>,
    in VersionSpec <version>,
	in IDLType <original_type>);

Parameters

<id>
The Repository ID for the new AliasDef object. An error is returned if an Interface Repository object with the same <id> already exists in the object repository.

<name>
The name for the new AliasDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new AliasDef.

<original_type>
The original type that is being aliased.

Container::create_constant( )

This operation creates a ConstantDef object within the target Container. The containing_repository attribute is set to the Repository in which the new ConstantDef object is defined.

Syntax

ConstantDef create_constant(in RepositoryId <id>,
  in Identifier <name>,
  in VersionSpec <version>,
  in IDLType <type>,
  in any <value>);

Parameters

<id>
The Repository ID for the new ConstantDef object. An error is returned if an Interface Repository object with the same id already exists in the object repository.

<name>
The name for the new ConstantDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new ConstantDef.

<type>
The type of the defined constant. It must be one of the simple types (long, short, ulong, ushort, float, double, char, string, boolean).
<value>
The value of the defined constant.

Container::create_enum( )

This operation creates a EnumDef object within the target Container. The containing_repository attribute is set to the Repository in which the new EnumDef object is defined.

Syntax

EnumDef create_enum(in RepositoryId <id>,
  in Identifier <name>,
  in VersionSpec <version>,
  in EnumMemberSeq <members>);

Parameters

<id>
The Repository ID for the new EnumDef object. An error is returned if an Interface Repository object with the same <id> already exists in the Object Repository.

<name>
The name for the new EnumDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new EnumDef.

<members>
A sequence of EnumMember structures that describe each member of the new EnumDef object.

Container::create_exception( )

This operation creates a ExceptionDef object within the target Container. The defined_in attribute is set to Container. The containing_repository attribute is set to the Repository in which the new ExceptionDef object is defined. The <type> attribute of the StructMember structures is ignored.

Syntax

ExceptionDef create_exception(in RepositoryId <id>,
  in Identifier <name>,
  in VersionSpec <version>,
  in StructMemberSeq <members>);

Parameters

<id>
The Repository ID for the new ExceptionDef object. An error is returned if an Interface Repository object with the same <id> already exists in the Object Repository.

<name>
The name for the new ExceptionDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new ExceptionDef.

<members>
A sequence of StructMember structures that describe each member of the new ExceptionDef object.

Container::create_interface( )

This operation creates a new empty InterfaceDef object within the target Container. The defined_in attribute is set to Container. The containing_repository attribute is set to the Repository in which the new InterfaceDef object is defined.

Syntax

InterfaceDef create_interface(
  in RepositoryId <id>,
  in Identifier <name>,
  in VersionSpec <version>,
  in InterfaceDefSeq <base_interfaces>);

Parameters

<id>
The Repository ID for the new InterfaceDef object. An error is returned if an Interface Repository object with the same <id> already exists in the Object Repository.

<name>
The name for the new InterfaceDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new InterfaceDef.

<base_interfaces>
A sequence of InterfaceDef objects from which the new interface inherits.

Container::create_module( )

This operation creates an empty ModuleDef object within the target Container. The defined_in attribute is set to Container. The containing_repository attribute is set to the Repository in which the newly created ModuleDef object is defined.

Syntax

ModuleDef create_module(
  in RepositoryId <id>,
  in Identifier <name>,
  in VersionSpec <version>);

Parameters

<id>
The Repository ID for the new ModuleDef object. An error is returned if an Interface Repository object with the same <id> already exists in the Object Repository.

<name>
The name for the new ModuleDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new ModuleDef.

Container::create_struct( )

This operation creates a StructDef object within the target Container. The defined_in attribute is set to Container. The containing_repository attribute is set to the Repository in which the new StructDef object is defined. The type attribute of the StructMember structures is ignored.

Syntax

StructDef create_struct(
  in RepositoryId <id>,
  in Identifier <name>,
  in VersionSpec <version>,
  in StructMemberSeq <members>);

Parameters

<id>
The Repository ID for the new StructDef object. An error is returned if an Interface Repository object with the same <id> already exists in the Object Repository.

<name>
The name for the new StructDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new StructDef.

<members>
A sequence of StructMember structures that describe each member of the new StructDef object.

Container::create_union( )

This operation creates a UnionDef object within the target Container. The defined_in attribute is set to Container. The containing_repository attribute is set to the Repository in which the new UnionDef object is defined. The type attribute of the UnionMember structures is ignored.

Syntax

UnionDef create_union(
  in RepositoryId <id>,
  in Identifier <name>,
  in VersionSpec <version>,
  in IDLType <discriminator_type>,
  in UnionMemberSeq <members>);

Parameters

<id>
The Repository ID for the new UnionDef object. An error is returned if an Interface Repository object with the same <id> already exists in the Object Repository.

<name>
The name for the new UnionDef object. It is an error to specify a name that already exists in the object's Container when multiple versions are not supported.

<version>
A version for the new UnionDef.

<discriminator_type>
The type of the union discriminator.

<members>
A sequence of UnionMember structures that describe each member of the new UnionDef object.

Container::describe_contents( )

This operation returns a sequence of structures of type Container::Description. It is actually a combination of Contained::describe(nbsp;) and Container::contents(nbsp;).

Syntax

DescriptionSeq describe_contents(
    in DefinitionKind <limit_type>,
	in boolean <exclude_inherited>,
	in long <max_returned_objs>);

Parameters

<limit_type>
Specifies which of the Interface Repository objects to return. If set to DefinitionKind for a specific interface, it returns only objects of that type.

<exclude_inherited>
Specifies which objects to return to interfaces: TRUE means don't return inherited objects, and FALSE means return all objects including those inherited.

<max_returned_objs>
Specifies the maximum number of objects to return (the maximum length of the returned sequence). A value of -1 indicates no restriction.

Container::lookup( )

This operation locates an object name within the target container. The objects can be directly or indirectly defined in or inherited into the target container.

Syntax

Contained lookup(in ScopedName <search_name>);

Parameters

<search_name>
Specifies the name of the object to search for relative to the target container. If a relative name is used, the object is searched for relative to the target container. If an absolute name is used, the object is located relative to the containing repository.

Container::lookup_name( )

This operation returns all objects with the name <search_name> from within an Interface Repository object.

Syntax

ContainedSeq lookup_name(
    in Identifier <search_name>,
	in long <levels_to_search>,
	in InterfaceName <limit_type>,
	in boolean <exclude_inherited>);

Parameters

<search_name>
Specifies the name of the object to return.

<levels_to_search>
Specifies whether the search is limited to the current object or should include all Interface Repository objects contained by the object. If set to -1, the current object and all contained Interface Repository objects are searched. If set to 1, only the current object is searched.

<limit_type>
Specifies which of the Interface Repository objects to return. If set to DefinitionKind for a specific interface, it returns only objects of that type.

<exclude_inherited>
Specifies which objects to return to interfaces: TRUE means don't return inherited objects, and FALSE means return all objects including those inherited.

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.