Previous Table of Contents Next


13.8.2 Codec Factory


   module IOP { typedef short EncodingFormat; const EncodingFormat ENCODING_CDR_ENCAPS = 0;

   struct Encoding {EncodingFormat format;octet major_version;octet minor_version;

   };

   local interface CodecFactory { exception UnknownEncoding {}; Codec create_codec (in Encoding enc)

   raises (UnknownEncoding);};};

   13.8.2.1 Encoding Structure

   The Encoding structure defines the encoding format of a Codec. It details the encoding format, such as CDR Encapsulation encoding, and the major and minor versions of that format.

   The encodings which shall be supported are:

   Vendors are free to support additional encodings.

   13.8.2.2 CodecFactory Interface

   create_codec

   Create a Codec of the given encoding.

   This operation raises UnknownEncoding if this factory cannot create a Codec of the given encoding.

   Parameter

   enc The Encoding for which to create a Codec.

   Return Value

   A Codec obtained with the given encoding.