Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# TAO_CDR_Encaps_Codec Class Reference

Implementation of a CDR encapsulation coder/decoder (Codec). More...

`#include <CDR_Encaps_Codec.h>`

Inheritance diagram for TAO_CDR_Encaps_Codec:

[legend]
Collaboration diagram for TAO_CDR_Encaps_Codec:

[legend]
List of all members.

## Public Methods
| TAO_CDR_Encaps_Codec (CORBA::Octet major, CORBA::Octet minor)
| Constructor. More...
virtual CORBA::OctetSeq * | encode (const CORBA::Any &data ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, IOP::Codec::InvalidTypeForEncoding)
| Encode the given data, including the TypeCode, into an octet sequence. More...
virtual CORBA::Any * | decode (const CORBA::OctetSeq &data ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, IOP::Codec::FormatMismatch)
| Extract the TypeCode and the value from the octet sequence and place them into an Any. More...
virtual CORBA::OctetSeq * | encode_value (const CORBA::Any &data ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, IOP::Codec::InvalidTypeForEncoding)
| Encode the given data, excluding the TypeCode, into an octet sequence. More...
virtual CORBA::Any * | decode_value (const CORBA::OctetSeq &data, CORBA::TypeCode_ptr tc ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, IOP::Codec::FormatMismatch, IOP::Codec::TypeMismatch)
| Extract the value from the octet sequence, based on the given TypeCode, and place it into an Any. More...
## Protected Methods
| ~TAO_CDR_Encaps_Codec (void)
| Destructor. More...
void | check_type_for_encoding (const CORBA::Any &data ACE_ENV_ARG_DECL)
| Verify that it is possible to encode the given data using this Codec. More...
## Private Methods
| TAO_CDR_Encaps_Codec (const TAO_CDR_Encaps_Codec &)
| Prevent copying through the copy constructor and the assignment operator. More...
void | operator= (const TAO_CDR_Encaps_Codec &)
## Private Attributes
CORBA::Octet | major_
| The major GIOP version associated with this Codec. More...
CORBA::Octet | minor_
| The minor GIOP version associated with this Codec. More...

## Detailed Description

Implementation of a CDR encapsulation coder/decoder (Codec).

This coder/decoder (Codec) class encodes and decodes data to and from a CDR encapsulation, respectively. It is useful for creation of octet sequences that contain CDR encapsulations. Those octet sequences can then be placed in a IOP::ServiceContext or an IOP::TaggedComponent, for example.

Note:
  This Codec should not be used for operations internal to the ORB core since it uses interpretive marshaling rather than compiled marshaling.

## Constructor & Destructor Documentation

TAO_CDR_Encaps_Codec::TAO_CDR_Encaps_Codec | ( | CORBA::Octet | major,
|  | CORBA::Octet | minor
| ) |

| Constructor.

TAO_CDR_Encaps_Codec::~TAO_CDR_Encaps_Codec | ( | void |  | ) | `[protected]`

| Destructor. Only allow this class to be instantiated on the heap since it is reference counted.

TAO_CDR_Encaps_Codec::TAO_CDR_Encaps_Codec | ( | const TAO_CDR_Encaps_Codec & |  | ) | `[private]`

| Prevent copying through the copy constructor and the assignment operator.

## Member Function Documentation

void TAO_CDR_Encaps_Codec::check_type_for_encoding | ( | const CORBA::Any &data | ACE_ENV_ARG_DECL | ) | `[protected]`

| Verify that it is possible to encode the given data using this Codec. Typical reasons for failure include attempting to encode a type that isn't supported for the version of GIOP associated with this Codec.

CORBA::Any * TAO_CDR_Encaps_Codec::decode | ( | const CORBA::OctetSeq &data | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, IOP::Codec::FormatMismatch)`[virtual]`

| Extract the TypeCode and the value from the octet sequence and place them into an Any.

CORBA::Any * TAO_CDR_Encaps_Codec::decode_value | ( | const CORBA::OctetSeq & | data,
|  | CORBA::TypeCode_ptr tc | ACE_ENV_ARG_DECL
| ) | throw (CORBA::SystemException, IOP::Codec::FormatMismatch, IOP::Codec::TypeMismatch)`[virtual]`

| Extract the value from the octet sequence, based on the given TypeCode, and place it into an Any.

CORBA::OctetSeq * TAO_CDR_Encaps_Codec::encode | ( | const CORBA::Any &data | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, IOP::Codec::InvalidTypeForEncoding)`[virtual]`

| Encode the given data, including the TypeCode, into an octet sequence.

CORBA::OctetSeq * TAO_CDR_Encaps_Codec::encode_value | ( | const CORBA::Any &data | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, IOP::Codec::InvalidTypeForEncoding)`[virtual]`

| Encode the given data, excluding the TypeCode, into an octet sequence.

void TAO_CDR_Encaps_Codec::operator= | ( | const TAO_CDR_Encaps_Codec & |  | ) | `[private]`

## Member Data Documentation

CORBA::Octet TAO_CDR_Encaps_Codec::major_`[private]`

| The major GIOP version associated with this Codec.

CORBA::Octet TAO_CDR_Encaps_Codec::minor_`[private]`

| The minor GIOP version associated with this Codec.

The documentation for this class was generated from the following files:

- CDR_Encaps_Codec.h
- CDR_Encaps_Codec.cpp