Application Classes and Enumerations

The document is organized into the following major sections:

Class mastermind_precondition

predicate
type: String


Class mastermind_effect

assignment
type: String


Class idl_array

This object models arrays in IDL. Arrays have a type specification and a dimension specification. Dimensions are specified as a sequence of short's.

element_type
type: idl_type

The type of the array. Once again we just use an object of type idl_type to model the type.

dimensions
type: Short
multi valued: Yes

A sequence of short values, which specify the various dimensions of the array. A dimension with a value of -1 indicates the dimension is not being used.


Class idl_attribute

Derived from: idl_field
Inherited attributes: name, type

Models attributes in IDL. Attributes in IDL have a name, a type specification, and an optional attribute specifying if the attribute is readonly or read-write.

is_readonly
type: Boolean

Is this attribute readonly or read-write.


Class idl_constant

Constants in IDL have names, types, and values. A constant in IDL can only be of a primitive type.

name
type: String

The name of the constant.

type
type: idl_type_enum

The type of the constant. Since the type can only be a primitive type, it is enough to just have an enumeration here. Hence we use an object of type idl_type_enum.

value
type: idl_value_or_type

The value is being stored in an object of type value_or_type


Class idl_enum

Models enumerations in IDL. An enumeration has a name and a sequence of enum_value objects.

name
type: String

The name of the enumeration.

enum_ids
type: idl_enum_value
multi valued: Yes

Sequence of enum_value objects. Each object represents an enumeration.


Class idl_enum_value

This object models a single value in an enumeration. A sequence of such objects is used to model enumerations in IDL.

name
type: String

The name of the enumeration.

value
type: Short

The value of the enumeration.


Class idl_exception

Models exceptions in IDL. Exceptions in IDL can have data members too. Hence we have a name and a sequence of idl_field objects.

name
type: String

The name of the exception.

fields
type: idl_field
multi valued: Yes

Sequence of idl_field objects which comprise the data members of an exception.


Class idl_field

Sub-classes: idl_attribute

A field has a name and a type. The type of the field is modelled using the object idl_type defined above. The name of a field is just a string.

name
type: String

The name of the field.

type
type: idl_type

The type of the field.


Class idl_interface

This object models interfaces in IDL. Interfaces in IDL are similar to class definitions in C++ without definitions for methods. Although, interfaces in IDL can define attributes, the IDL compiler does not generate any storage for them. Both attribute and method declarations are used to define the interface that can be used to manipulate instances of the interfaces. Instances in IDL can also contain definitions of constants, typedefs, enumerations, structs, and exceptions. This object just contains sequences of objects of the respective types.

name
type: String

The name of the interface.

typedefs
type: idl_typedef
multi valued: Yes

The types defined in the interface. Sequence of idl_typedef objects.

constants
type: idl_constant
multi valued: Yes

The constants defined in the interface. Sequence of idl_constant objects.

enums
type: idl_enum
multi valued: Yes

The enumerations defined in the interface. Sequence of idl_enum objects.

structs
type: idl_struct
multi valued: Yes

The structs defined in the interface. Sequence of idl_struct objects.

attributes
type: idl_attribute
multi valued: Yes

The attributes defined in the interface. Sequence of idl_attribute objects.

exceptions
type: idl_exception
multi valued: Yes

The exceptions defined in the interface. Sequence of idl_exception objects.

methods
type: idl_method
multi valued: Yes

The methods defined in the interface. Sequence of idl_method objects.


Class idl_method

Methods in IDL have a name, a return type, an ordered sequence of parameters, and a sequence of exceptions. The mastermind extension to IDL methods adds preconditions, and effects to methods.

name
type: String

The name of the method.

return_value
type: idl_type

The type of the return value. An object of type idl_type.

parameters
type: idl_parameter
multi valued: Yes

An ordered sequence of objects of type idl_parameter.

exceptions
type: idl_exception
multi valued: Yes

A sequence of objects of type idl_exception. These define the exceptions that a method can raise.

pre_condition
type: mastermind_precondition

A expression which defines the pre condition for a method. It is still not clear what the structure for this will be like.

effects
type: mastermind_effect
multi valued: Yes

Another expression which defines the effects of a method invocation. Again the structure of this is not clear.


Class idl_parameter

This object models, parameters in IDL. Parameters have name, type and mode.

name
type: String

The name of the parameter.

type
type: idl_type

The type of the parameter.

mode
type: idl_mode

The mode of the parameter.


Class idl_sequence

Models sequences in IDL. Sequences in IDL have a type, and a size. The size determines the bound of the sequence. The sequence is unbounded if the size is -1.

element_type
type: idl_type

The type of the sequence. This is an object of type idl_type. Since, idl_type contains the object idl_value_or_type, which in turn contains references to objects of type idl_sequence, modelling recursive sequences is not a problem.

number_of_elements
type: Short

The maximum size of this sequence. The sequence is unbounded, if the size is -1.


Class idl_struct

Models structures in IDL. Structures have a name and a sequence of idl_field objects.

name
type: String

The name of the structure.

fields
type: idl_field
multi valued: Yes

Sequence of idl_field objects. Each object represents a field in a structure.


Class idl_type

The objects defined above are brought together in this object. This object can model any type that can be defined in the IDL language.

type
type: idl_type_enum

The IDL type we are dealing with. This variable will contain a value from the enumeration.

value
type: idl_value_or_type

More information about the type, if we need it. The name value is partly incorrect.


Class idl_typedef

Models type defines in IDL. A type define has a type, and a name.

name
type: String

The name of the typedef.

type
type: idl_type

The type that is being defined.


Class idl_value_or_type

This structure is used to store the value in the case of primitive types, and more information about the type itself in the case of non-primitive types. For example, in the case of a structure, the name of the structure is stored, and in the case of sequences information about the type of the sequence is stored. This together with the enumeration above can be used to model any IDL type. See the object idl_type for more information. Since the attribute of primitive types is straight forward, only non-primitive types are described below.

value_short
type: Short

value_long
type: Long

value_ushort
type: Unsigned_Short

value_ulong
type: Unsigned_Long

value_float
type: Double

value_double
type: Double

value_boolean
type: Boolean

value_char
type: Char

value_octet
type: Octet

value_any
type: Long

value_string
type: String

info_enum
type: String

Contains the name of the enumeration. Names are used so that any changes to the definition of the enumeration can take place without any knowledge of the places it is being used.

info_union
type: String

The name of the union is stored.

info_struct
type: String

The name of the structure is stored.

info_sequence
type: idl_sequence

In this case, just storing the name will not help, since the sequence can be nested. But, since sequences are always anonymous, the update problem discussed above is not a problem here. This variable is of type idl_sequence. The object idl_sequence (discussed below) can model nested sequences to any depth.

info_array
type: idl_array

Once again, just storing names will not help. And once again since arrays are anonymous, we don't have any update problems. The type of this variable is idl_array. The object idl_array is discussed below.


Class idl_module

This object models modules in IDL. An IDL module defines a namespace. Modules can consist of typedefs, constants, enumerations, structs, interfaces, exceptions and other modules. This object just contains sequences of objects of the respective type.

name
type: String

The name of the module.

typedefs
type: idl_typedef
multi valued: Yes

The types defined in the module. Sequence of idl_typedef objects.

constants
type: idl_constant
multi valued: Yes

The constants defined in the module. Sequence of idl_constant objects.

enums
type: idl_enum
multi valued: Yes

The enumerations defined in the module. Sequence of idl_enum objects.

structs
type: idl_struct
multi valued: Yes

The structs defined in the module. Sequence of idl_struct objects.

interfaces
type: idl_interface
multi valued: Yes

The interfaces defined in the module. Sequence of idl_interface objects.

exceptions
type: idl_exception
multi valued: Yes

The exceptions defined in the module. Sequence of idl_exception objects.

modules
type: idl_module
multi valued: Yes

The modules defined in the module. Sequence of idl_module objects.


Class idl_triple

This object models a single member of a IDL union. Since IDL unions represent the discriminator explicitly, each member of the union has a variable, a type specification for the variable, and a value for the discriminator when this variable is to be used.

discriminator_ids
type: idl_value_or_type
multi valued: Yes

A sequence of values representing the values that the discriminator may take on to select this union member.

element_name
type: String

The name of the variable for this union member.

element_type
type: idl_type

Type specification for the variable of this union member


Class idl_union

This object models unions in IDL. Unions in IDL have a name, a discriminator, and a sequence of objects of type idl_triple.

name
type: String

The name of the IDL union.

discriminator_type
type: String

The type of the discriminator for this union. Once again we use names instead of an object if type idl_type so that the definition of the discriminator can be changed independently.

cases
type: idl_triple
multi valued: Yes

Sequence of objects of type idl_triple.


Enum idl_mode

Enumeration of parameter modes. A parameter of a method can either be input only, input-output, or output only.

Values

in
Parameter mode in input only.
out
Parameter mode in output only.
inout
Parameter mode is input-output.

Enum idl_type_enum

Enumeration of all types in IDL. This forms the basis for modelling IDL types in the application model. IDL supports primitive types like short, long, unsigned short, unsigned long, float, double, char, octet, and boolean. The type octet is basically a byte. IDL however, doesn't support the types int or unsigned int. Apart from these primitive types, IDL also supports other types including structured types. These are explained below.

Values

t_void
t_short
t_long
t_ushort
t_ulong
t_float
t_double
t_boolean
t_char
t_octet
t_object
The type object can be used to represent any CORBA object. Since, user defined interfaces are eventually translated into CORBA objects, the type object can be used to represent user defined interfaces too.
t_struct
A structured type in IDL that provides an aggregation mechanism. Structures in IDL are very similar to structures in C and are quite different from structures in C++. Unlike C++, structures in IDL cannot participate in inheritance. Structures in IDL are also different from interfaces in IDL. An interface in IDL defines only the API. It doesn't define any storage. Structures in IDL on the other hand only define storage.
t_any
This is the equivalent of 'void *' in C++. A variable of type any can hold values that can be held by any type in IDL.
t_union
Unions in IDL are different from unions in C or C++. Unions in IDL have a discriminator. The value of the discriminator defines the value the union contains. Discriminators exist in C or C++ too, but are external to the union. In IDL however, discriminators are part of the union definition. The reason for this is that, different values in the union need to be encoded different ways, when values are distributed. CORBA uses the value of the discriminator to determine the type of encoding to use for the value.
t_enum
An enumeration in IDL is very similar to an enumeration in C. Enumerations in IDL are also tied very closely to unions. The discriminator of a union should be an IDL enumeration.
t_string
Strings in IDL, can be used to contain arbitrarily long sequences of characters. Strings in IDL may be defined to have a maximum bound, or no bound at all.
t_sequence
Sequences in IDL can be used to construct sequences of objects. The objects can be primitive types, or constructed types or user defined types. Sequences in IDL can be bounded or unbounded.
t_array
Arrays in IDL are similar to arrays in C or C++. The type of an array can be primitive, structured or user defined.

Object Index


Enumerations Index


Mastermind Home | Documentation Top Level