union case.
More...
#include <TypeCode_Case_T.h>
Inheritance diagram for TAO::TypeCode::Case_T< DiscriminatorType, StringType, TypeCodeType >:


Public Member Functions | |
| Case_T (DiscriminatorType member_label, char const *member_name, TypeCodeType member_type) | |
| Constructor. | |
| Case_T (DiscriminatorType member_label) | |
| Constructor. | |
@c TAO::TypeCode::Case Methods | |
| Case< StringType, TypeCodeType > * | clone (void) const |
| Cloning/copying operation. | |
| virtual CORBA::Any * | label (ACE_ENV_SINGLE_ARG_DECL) const |
| virtual bool | marshal_label (TAO_OutputCDR &cdr) const |
| virtual bool | equal_label (CORBA::ULong index, CORBA::TypeCode_ptr tc ACE_ENV_ARG_DECL) const |
| Verify equality of member labels. | |
Private Attributes | |
| DiscriminatorType const | label_ |
IDL union case/member label value. | |
union case.
A Case_T contains the corresponding case label value, name and pointer to the CORBA::TypeCode for a given OMG IDL union case. For example, the cases in following OMG IDL union:
union Foo switch (short) { case 0: case 1: short a; case 2: long b; default: octet c; };
would be represented using the following statically instantiated TAO::TypeCode::Case_T array:
typedef TAO::TypeCode::Case_T<CORBA::Short, char const *> Foo_Case; Foo_Case _tao_cases_Foo[] = { Foo_Case (0, "a", &CORBA::_tc_short), Foo_Case (1, "a", &CORBA::_tc_short), Foo_Case (2, "b", &CORBA::_tc_long), Foo_Case (0, "c", &CORBA::_tc_octet) };
The default index is passed directly to the TAO::TypeCode::Union constructor.
The template parameter DISCRIMINATOR_TYPE is the corresponding C++ type for the IDL defined union discriminator type. For example, a union with an IDL short discriminator will have a corresponding CORBA::Short C++ type. This template parameter is necessary to allow the actual case label value to be stored as its actual type, which is particularly important when marshaling that value into a CDR stream.
The template parameter StringType is either char const * or CORBA::String_var. The latter is only used when creating CORBA::tk_union TypeCode dynamically, such as through the TypeCodeFactory.
|
||||||||||||||||||||
|
Constructor.
|
|
||||||||||
|
Constructor.
Constructor only used in the dynamically constructed |
|
||||||||||
|
Cloning/copying operation.
Implements TAO::TypeCode::Case< StringType, TypeCodeType >. |
|
||||||||||||||||
|
Verify equality of member labels.
Performing member label equality comparisons in the
Implements TAO::TypeCode::Case< StringType, TypeCodeType >. |
|
||||||||||
|
Return the IDL Implements TAO::TypeCode::Case< StringType, TypeCodeType >. |
|
||||||||||
|
Marshal the IDL Implements TAO::TypeCode::Case< StringType, TypeCodeType >. |
|
|||||
|
IDL
|
1.3.9.1