CORBA::TypeCode Class Reference

A representation of the structure of a given OMG IDL-declared type. More...

#include <TypeCode.h>

Inheritance diagram for CORBA::TypeCode:

Inheritance graph
[legend]
List of all members.

Public Types

typedef CORBA::TypeCode_ptr _ptr_type
typedef CORBA::TypeCode_var _var_type
typedef CORBA::TypeCode_out _out_type

Public Member Functions

virtual bool tao_marshal_kind (TAO_OutputCDR &cdr) const
 Marshal the TypeCode TCKind.

virtual bool tao_marshal (TAO_OutputCDR &cdr, CORBA::ULong offset) const=0
 Marshal this TypeCode into a CDR output stream.

virtual void tao_duplicate (void)=0
 Increase the reference count on this TypeCode.

virtual void tao_release (void)=0
 Decrease the reference count on this object.

@c CORBA::TypeCode Methods
These methods are part of the public interface of CORBA::TypeCode class, as defined by the OMG CORBA specification and C++ mapping.

The C++ mapping does not declare the methods in the public CORBA::TypeCode API as virtual, so work around that by making these methods inlined to forward all calls to the corresponding protected template method (i.e. the design pattern, not the C++ feature) listed below in the protected block.

Boolean equal (TypeCode_ptr tc) const
 Equality of two TypeCodes.

Boolean equivalent (TypeCode_ptr tc) const
 Equivalence of two TypeCodes.

TCKind kind (void) const
 The kind of TypeCode.

TypeCode_ptr get_compact_typecode (void) const
char const * id (void) const
 The RepositoryId globally identifying the type.

char const * name (void) const
ULong member_count (void) const
 The type member count.

char const * member_name (ULong index) const
 The type member name.

TypeCode_ptr member_type (ULong index) const
 The type member TypeCode.

Anymember_label (ULong index) const
 The union member label.

TypeCode_ptr discriminator_type (void) const
 The type of all non-default union member labels.

Long default_index (void) const
 The index of the default union member.

ULong length (void) const
 The length of the type.

TypeCode_ptr content_type (void) const
 The underlying content type.

UShort fixed_digits (void) const
 The number of significant digits.

UShort fixed_scale (void) const
 The scale factor.

Visibility member_visibility (ULong index) const
ValueModifier type_modifier (void) const
TypeCode_ptr concrete_base_type (void) const

Static Public Member Functions

CORBA::TypeCode_ptr _duplicate (CORBA::TypeCode_ptr tc)
 Duplicate this TypeCode.

CORBA::TypeCode_ptr _nil (void)
 Returns a NULL typecode.

void _tao_any_destructor (void *x)
 Destruction callback for Anys.


Static Public Attributes

CORBA::TypeCode_ptr const  _tc_Bounds
CORBA::TypeCode_ptr const  _tc_BadKind

Protected Member Functions

 TypeCode (CORBA::TCKind kind)
 Constructor.

virtual ~TypeCode (void)
 Destructor.

@c TypeCode Template Methods
Methods that must be implemented by CORBA::TypeCode subclasses if valid for those subclasses.

The default implementations of the non-pure virtual methods throw the CORBA::TypeCode::BadKind exception since many of these methods are TypeCode type-specific. This reduces code duplication and bloat.

The TypeCode equal(), equivalent(), kind() and get_compact_typecode() methods are valid for all TypeCodes which is why their template method "@c _i" counterparts are pure virtual.

virtual Boolean equal_i (TypeCode_ptr tc) const=0
virtual Boolean equivalent_i (TypeCode_ptr tc) const=0
virtual TypeCode_ptr get_compact_typecode_i (void) const=0
virtual char const * id_i (void) const
virtual char const * name_i (void) const
virtual ULong member_count_i (void) const
virtual char const * member_name_i (ULong index) const
virtual TypeCode_ptr member_type_i (ULong index) const
virtual Anymember_label_i (ULong index) const
virtual TypeCode_ptr discriminator_type_i (void) const
virtual Long default_index_i (void) const
virtual ULong length_i (void) const
virtual TypeCode_ptr content_type_i (void) const
virtual UShort fixed_digits_i (void) const
virtual UShort fixed_scale_i (void) const
virtual Visibility member_visibility_i (ULong index) const
virtual ValueModifier type_modifier_i (void) const
virtual TypeCode_ptr concrete_base_type_i (void) const

Protected Attributes

TCKind const  kind_
 The kind of TypeCode.


Private Member Functions

 TypeCode (TypeCode const &)
void operator= (TypeCode const &)

Detailed Description

A representation of the structure of a given OMG IDL-declared type.

TypeCodes are primarily used by CORBA::Anys, the CORBA Interface Repository and the CORBA Dynamic Invocation Interface.

Definition at line 62 of file TypeCode.h.


Member Typedef Documentation

typedef CORBA::TypeCode_out CORBA::TypeCode::_out_type
 

Definition at line 431 of file TypeCode.h.

typedef CORBA::TypeCode_ptr CORBA::TypeCode::_ptr_type
 

Definition at line 429 of file TypeCode.h.

typedef CORBA::TypeCode_var CORBA::TypeCode::_var_type
 

Definition at line 430 of file TypeCode.h.


Constructor & Destructor Documentation

ACE_INLINE CORBA::TypeCode::TypeCode CORBA::TCKind  kind  )  [protected]
 

Constructor.

Definition at line 23 of file TypeCode.inl.

00024   : kind_ (k)
00025 {
00026 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::TypeCode::~TypeCode void   )  [protected, virtual]
 

Destructor.

Protected destructor to enforce proper memory management through the reference counting mechanism.

Definition at line 23 of file TypeCode.cpp.

00024 {
00025 }

CORBA::TypeCode::TypeCode TypeCode const &   )  [private]
 


Member Function Documentation

ACE_INLINE CORBA::TypeCode_ptr CORBA::TypeCode::_duplicate CORBA::TypeCode_ptr  tc  )  [static]
 

Duplicate this TypeCode.

Statically instantiated TypeCodes incur no reference count manipulation, i.e. reference counting is a no-op.

Dynamically instantiated TypeCodes will have their reference count incremented by one each time this function is called.

Definition at line 29 of file TypeCode.inl.

References CORBA::is_nil().

Referenced by TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >::concrete_base_type_i(), TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >::content_type_i(), TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >::content_type_i(), TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >::discriminator_type_i(), TAO::TypeCode::String< RefCountPolicy >::get_compact_typecode_i(), TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >::get_compact_typecode_i(), TAO::TypeCode::Fixed< RefCountPolicy >::get_compact_typecode_i(), TAO::Any_Special_Impl_T< T, from_T, to_T >::insert(), TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >::member_type_i(), TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >::member_type_i(), TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >::member_type_i(), operator<<=(), TAO::TypeCodeFactory::tc_any_factory(), TAO::TypeCodeFactory::tc_boolean_factory(), TAO::TypeCodeFactory::tc_char_factory(), TAO::TypeCodeFactory::tc_double_factory(), TAO::TypeCodeFactory::tc_float_factory(), TAO::TypeCodeFactory::tc_long_factory(), TAO::TypeCodeFactory::tc_longdouble_factory(), TAO::TypeCodeFactory::tc_longlong_factory(), TAO::TypeCodeFactory::tc_null_factory(), TAO::TypeCodeFactory::tc_objref_factory(), TAO::TypeCodeFactory::tc_octet_factory(), TAO::TypeCodeFactory::tc_Principal_factory(), TAO::TypeCodeFactory::tc_short_factory(), TAO::TypeCodeFactory::tc_string_factory(), TAO::TypeCodeFactory::tc_TypeCode_factory(), TAO::TypeCodeFactory::tc_ulong_factory(), TAO::TypeCodeFactory::tc_ulonglong_factory(), TAO::TypeCodeFactory::tc_ushort_factory(), TAO::TypeCodeFactory::tc_void_factory(), TAO::TypeCodeFactory::tc_wchar_factory(), TAO::Unknown_IDL_Type::to_abstract_base(), TAO::Unknown_IDL_Type::to_object(), TAO::Unknown_IDL_Type::to_value(), TAO::TypeCode::Case< StringType, TypeCodeType >::type(), TAO::Any_Impl::type(), and CORBA::Any::type().

00030 {
00031   if (!CORBA::is_nil (tc))
00032     tc->tao_duplicate ();
00033 
00034   return tc;
00035 }

ACE_INLINE CORBA::TypeCode_ptr CORBA::TypeCode::_nil void   )  [static]
 

Returns a NULL typecode.

Definition at line 38 of file TypeCode.inl.

Referenced by TAO::TypeCode::Traits< Traits< STATIC_TYPECODE >::typecode_type >::get_typecode(), TAO::TypeCode::Traits< STATIC_TYPECODE >::get_typecode(), and TAO::TypeCodeFactory::tc_objref_factory().

00039 {
00040   return static_cast<CORBA::TypeCode_ptr> (0);
00041 }

ACE_INLINE void CORBA::TypeCode::_tao_any_destructor void *  x  )  [static]
 

Destruction callback for Anys.

Definition at line 146 of file TypeCode.inl.

00147 {
00148   ::CORBA::release (static_cast <CORBA::TypeCode_ptr> (x));
00149 }

ACE_INLINE CORBA::TypeCode_ptr CORBA::TypeCode::concrete_base_type void   )  const
 

This method is valid for the following kinds of TypeCodes:

  • tk_value
  • tk_event
Returns:
TypeCode corresponding to the concrete base valuetype or eventtype. CORBA::TypeCode::_nil() if no concrete base exists.

Definition at line 140 of file TypeCode.inl.

References concrete_base_type_i().

00141 {
00142   return this->concrete_base_type_i ();
00143 }

CORBA::TypeCode_ptr CORBA::TypeCode::concrete_base_type_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 215 of file TypeCode.cpp.

Referenced by concrete_base_type().

00216 {
00217   throw ::CORBA::TypeCode::BadKind ();
00218 }

ACE_INLINE CORBA::TypeCode_ptr CORBA::TypeCode::content_type void   )  const
 

The underlying content type.

This method is valid for the following kinds of TypeCodes:

  • tk_sequence
  • tk_array
  • tk_value_box
  • tk_alias

Definition at line 110 of file TypeCode.inl.

References content_type_i().

00111 {
00112   return this->content_type_i ();
00113 }

CORBA::TypeCode_ptr CORBA::TypeCode::content_type_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, and TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >.

Definition at line 185 of file TypeCode.cpp.

Referenced by content_type().

00186 {
00187   throw ::CORBA::TypeCode::BadKind ();
00188 }

ACE_INLINE CORBA::Long CORBA::TypeCode::default_index void   )  const
 

The index of the default union member.

This method is valid for the following kinds of TypeCodes:

  • tk_union

Definition at line 98 of file TypeCode.inl.

References default_index_i().

00099 {
00100   return this->default_index_i ();
00101 }

CORBA::Long CORBA::TypeCode::default_index_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, and TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >.

Definition at line 173 of file TypeCode.cpp.

Referenced by default_index().

00174 {
00175   throw ::CORBA::TypeCode::BadKind ();
00176 }

ACE_INLINE CORBA::TypeCode_ptr CORBA::TypeCode::discriminator_type void   )  const
 

The type of all non-default union member labels.

This method is valid for the following kinds of TypeCodes:

  • tk_union

Definition at line 92 of file TypeCode.inl.

References discriminator_type_i().

00093 {
00094   return this->discriminator_type_i ();
00095 }

CORBA::TypeCode_ptr CORBA::TypeCode::discriminator_type_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, and TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >.

Definition at line 167 of file TypeCode.cpp.

Referenced by discriminator_type().

00168 {
00169   throw ::CORBA::TypeCode::BadKind ();
00170 }

CORBA::Boolean CORBA::TypeCode::equal TypeCode_ptr  tc  )  const
 

Equality of two TypeCodes.

Returns:
true if and only if the set of legal operations is the same and invoking any operation on the this TypeCode and tc returns identical results.

Definition at line 34 of file TypeCode.cpp.

References equal_i(), id(), CORBA::is_nil(), name(), and ACE_OS::strcmp().

00035 {
00036   if (this == tc)
00037     {
00038       return true;
00039     }
00040   else if (CORBA::is_nil (tc))
00041     {
00042       throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 13, CORBA::COMPLETED_NO);
00043     }
00044 
00045   CORBA::TCKind const tc_kind = tc->kind ();
00046 
00047   if (tc_kind != this->kind_)
00048     return false;
00049 
00050   try
00051     {
00052       char const * const tc_id = tc->id ();
00053 
00054       char const * const this_id = this->id ();
00055 
00056       if (ACE_OS::strcmp (this_id, tc_id) != 0)
00057         return false;
00058 
00059       char const * const tc_name = tc->name ();
00060 
00061       char const * const this_name = this->name ();
00062 
00063       if (ACE_OS::strcmp (this_name, tc_name) != 0)
00064         return false;
00065     }
00066   catch (const ::CORBA::TypeCode::BadKind&)
00067     {
00068       // Some TypeCodes do not support the id() and name()
00069       // operations.  Ignore the failure, and continue equality
00070       // verification using TypeCode subclass-specific techniques
00071       // below.
00072     }
00073 
00074   return this->equal_i (tc);
00075 }

virtual Boolean CORBA::TypeCode::equal_i TypeCode_ptr  tc  )  const [protected, pure virtual]
 

Implemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Empty_Param, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Fixed< RefCountPolicy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::String< RefCountPolicy >, TAO::TypeCode::String< TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Referenced by equal().

CORBA::Boolean CORBA::TypeCode::equivalent TypeCode_ptr  tc  )  const
 

Equivalence of two TypeCodes.

Equivalence of two TypeCodes satisfies a subset of the requirements necessary for equality.

See also:
equal

Definition at line 78 of file TypeCode.cpp.

References CORBA::is_nil(), ACE_OS::strcmp(), and ACE_OS::strlen().

00079 {
00080   if (this == tc)
00081     {
00082       return true;
00083     }
00084   else if (CORBA::is_nil (tc))
00085     {
00086       throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 13, CORBA::COMPLETED_NO);
00087     }
00088 
00089   CORBA::TypeCode_ptr const mutable_this =
00090     const_cast<CORBA::TypeCode_ptr> (this);
00091 
00092   CORBA::TypeCode_var unaliased_this = TAO::unaliased_typecode (mutable_this);
00093 
00094   CORBA::TypeCode_var unaliased_tc = TAO::unaliased_typecode (tc);
00095 
00096   CORBA::TCKind const this_kind = unaliased_this->kind ();
00097 
00098   CORBA::TCKind const tc_kind = unaliased_tc->kind ();
00099 
00100   if (tc_kind != this_kind)
00101     return false;
00102 
00103   try
00104     {
00105       char const * const this_id = unaliased_this->id ();
00106 
00107       char const * const tc_id = unaliased_tc->id ();
00108 
00109       if (ACE_OS::strlen (this_id) == 0
00110           || ACE_OS::strlen (tc_id) == 0)
00111         {
00112           return unaliased_this->equivalent_i (unaliased_tc.in ());
00113         }
00114       else if (ACE_OS::strcmp (this_id, tc_id) != 0)
00115         {
00116           return false;
00117         }
00118     }
00119   catch (const ::CORBA::TypeCode::BadKind&)
00120     {
00121       // Some TypeCodes do not support the id() operation.  Ignore the
00122       // failure, and continue equivalence verification using TypeCode
00123       // subclass-specific techniques.
00124       return unaliased_this->equivalent_i (unaliased_tc.in ());
00125     }
00126 
00127   return true;
00128 }

virtual Boolean CORBA::TypeCode::equivalent_i TypeCode_ptr  tc  )  const [protected, pure virtual]
 

Implemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Empty_Param, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Fixed< RefCountPolicy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::String< RefCountPolicy >, TAO::TypeCode::String< TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

ACE_INLINE CORBA::UShort CORBA::TypeCode::fixed_digits void   )  const
 

The number of significant digits.

This method is valid for the following kinds of TypeCodes:

  • tk_fixed

Definition at line 116 of file TypeCode.inl.

References fixed_digits_i().

00117 {
00118   return this->fixed_digits_i ();
00119 }

CORBA::UShort CORBA::TypeCode::fixed_digits_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Fixed< RefCountPolicy >.

Definition at line 191 of file TypeCode.cpp.

Referenced by fixed_digits().

00192 {
00193   throw ::CORBA::TypeCode::BadKind ();
00194 }

ACE_INLINE CORBA::UShort CORBA::TypeCode::fixed_scale void   )  const
 

The scale factor.

This method is valid for the following kinds of TypeCodes:

  • tk_fixed

Definition at line 122 of file TypeCode.inl.

References fixed_scale_i().

00123 {
00124   return this->fixed_scale_i ();
00125 }

CORBA::UShort CORBA::TypeCode::fixed_scale_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Fixed< RefCountPolicy >.

Definition at line 197 of file TypeCode.cpp.

Referenced by fixed_scale().

00198 {
00199   throw ::CORBA::TypeCode::BadKind ();
00200 }

ACE_INLINE CORBA::TypeCode_ptr CORBA::TypeCode::get_compact_typecode void   )  const
 

Note:
Calling this method will incur additional run-time memory consumption since TAO's implementation relies on the TypeCodeFactory to dynamically create a compact TypeCode; the exception being TypeCodes with empty parameter lists. Those TypeCodes are already compact, meaning that call this method on such TypeCodes incurs no additional run-time memory requirements.
Unless you need to send compact TypeCodes "over-the-wire" or your TypeCode corresponds to a type with a large number of members, try to stick with the existing potentially non-compact TypeCode.

Note:
Compact TypeCodes may also be generated statically by the TAO_IDL compiler by invoking it with its "-Gt" (i.e. enable optimized TypeCodes) command line option.

Definition at line 50 of file TypeCode.inl.

References get_compact_typecode_i().

00051 {
00052   return this->get_compact_typecode_i ();
00053 }

virtual TypeCode_ptr CORBA::TypeCode::get_compact_typecode_i void   )  const [protected, pure virtual]
 

Implemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Empty_Param, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Fixed< RefCountPolicy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::String< RefCountPolicy >, TAO::TypeCode::String< TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Referenced by get_compact_typecode().

ACE_INLINE char const * CORBA::TypeCode::id void   )  const
 

The RepositoryId globally identifying the type.

This method is valid for the following kinds of TypeCodes:

  • tk_objref
  • tk_struct
  • tk_union
  • tk_enum
  • tk_alias
  • tk_value
  • tk_value_box
  • tk_native
  • tk_abstract_interface
  • tk_local_interface
  • tk_except
  • tk_component
  • tk_home
  • tk_event
Note:
CORBA::TypeCode::id() does not follow the usual parameter passing rules defined by the C++ mapping. This behavior is required by the C++ mapping. In particular, ownership is maintained by the TypeCode.

Definition at line 56 of file TypeCode.inl.

References id_i().

Referenced by equal().

00057 {
00058   return this->id_i ();
00059 }

char const * CORBA::TypeCode::id_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 131 of file TypeCode.cpp.

Referenced by id().

00132 {
00133   throw ::CORBA::TypeCode::BadKind ();
00134 }

ACE_INLINE CORBA::TCKind CORBA::TypeCode::kind void   )  const
 

The kind of TypeCode.

Definition at line 44 of file TypeCode.inl.

00045 {
00046   return this->kind_;
00047 }

ACE_INLINE CORBA::ULong CORBA::TypeCode::length void   )  const
 

The length of the type.

This method is valid for the following kinds of TypeCodes:

  • tk_string
  • tk_wstring
  • tk_sequence
  • tk_array

Definition at line 104 of file TypeCode.inl.

References length_i().

00105 {
00106   return this->length_i ();
00107 }

CORBA::ULong CORBA::TypeCode::length_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::String< RefCountPolicy >, and TAO::TypeCode::String< TAO::Null_RefCount_Policy >.

Definition at line 179 of file TypeCode.cpp.

Referenced by length().

00180 {
00181   throw ::CORBA::TypeCode::BadKind ();
00182 }

ACE_INLINE CORBA::ULong CORBA::TypeCode::member_count void   )  const
 

The type member count.

This method is valid for the following kinds of TypeCodes:

  • tk_struct
  • tk_union
  • tk_enum
  • tk_value
  • tk_except
  • tk_event

Definition at line 68 of file TypeCode.inl.

References member_count_i().

00069 {
00070   return this->member_count_i ();
00071 }

CORBA::ULong CORBA::TypeCode::member_count_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 143 of file TypeCode.cpp.

Referenced by member_count().

00144 {
00145   throw ::CORBA::TypeCode::BadKind ();
00146 }

ACE_INLINE CORBA::Any * CORBA::TypeCode::member_label ULong  index  )  const
 

The union member label.

This method is valid for the following kinds of TypeCodes:

  • tk_union

Definition at line 86 of file TypeCode.inl.

References member_label_i().

00087 {
00088   return this->member_label_i (index);
00089 }

CORBA::Any * CORBA::TypeCode::member_label_i ULong  index  )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, and TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >.

Definition at line 161 of file TypeCode.cpp.

Referenced by member_label().

00162 {
00163   throw ::CORBA::TypeCode::BadKind ();
00164 }

ACE_INLINE char const * CORBA::TypeCode::member_name ULong  index  )  const
 

The type member name.

This method is valid for the following kinds of TypeCodes:

  • tk_struct
  • tk_union
  • tk_enum
  • tk_value
  • tk_except
  • tk_event
Note:
CORBA::TypeCode::member_name() does not follow the usual parameter passing rules defined by the C++ mapping. This behavior is required by the C++ mapping. In particular, ownership is maintained by the TypeCode.

Definition at line 74 of file TypeCode.inl.

References member_name_i().

00075 {
00076   return this->member_name_i (index);
00077 }

char const * CORBA::TypeCode::member_name_i ULong  index  )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 149 of file TypeCode.cpp.

Referenced by member_name().

00150 {
00151   throw ::CORBA::TypeCode::BadKind ();
00152 }

ACE_INLINE CORBA::TypeCode_ptr CORBA::TypeCode::member_type ULong  index  )  const
 

The type member TypeCode.

This method is valid for the following kinds of TypeCodes:

  • tk_struct
  • tk_union
  • tk_value
  • tk_except
  • tk_event

Definition at line 80 of file TypeCode.inl.

References member_type_i().

00081 {
00082   return this->member_type_i (index);
00083 }

CORBA::TypeCode_ptr CORBA::TypeCode::member_type_i ULong  index  )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 155 of file TypeCode.cpp.

Referenced by member_type().

00156 {
00157   throw ::CORBA::TypeCode::BadKind ();
00158 }

ACE_INLINE CORBA::Visibility CORBA::TypeCode::member_visibility ULong  index  )  const
 

This method is valid for the following kinds of TypeCodes:

  • tk_value
  • tk_event

Definition at line 128 of file TypeCode.inl.

References member_visibility_i().

00129 {
00130   return this->member_visibility_i (index);
00131 }

CORBA::Visibility CORBA::TypeCode::member_visibility_i ULong  index  )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 203 of file TypeCode.cpp.

Referenced by member_visibility().

00204 {
00205   throw ::CORBA::TypeCode::BadKind ();
00206 }

ACE_INLINE char const * CORBA::TypeCode::name void   )  const
 

This method is valid for the following kinds of TypeCodes:

  • tk_objref
  • tk_struct
  • tk_union
  • tk_enum
  • tk_alias
  • tk_value
  • tk_value_box
  • tk_native
  • tk_abstract_interface
  • tk_local_interface
  • tk_except
  • tk_component
  • tk_home
  • tk_event
Note:
CORBA::TypeCode::name() does not follow the usual parameter passing rules defined by the C++ mapping. This behavior is required by the C++ mapping. In particular, ownership is maintained by the TypeCode.

Definition at line 62 of file TypeCode.inl.

References name_i().

Referenced by equal().

00063 {
00064   return this->name_i ();
00065 }

char const * CORBA::TypeCode::name_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 137 of file TypeCode.cpp.

Referenced by name().

00138 {
00139   throw ::CORBA::TypeCode::BadKind ();
00140 }

void CORBA::TypeCode::operator= TypeCode const &   )  [private]
 

virtual void CORBA::TypeCode::tao_duplicate void   )  [pure virtual]
 

Increase the reference count on this TypeCode.

Implemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Empty_Param, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Fixed< RefCountPolicy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::String< RefCountPolicy >, TAO::TypeCode::String< TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

virtual bool CORBA::TypeCode::tao_marshal TAO_OutputCDR cdr,
CORBA::ULong  offset
const [pure virtual]
 

Marshal this TypeCode into a CDR output stream.

Marshal this TypeCode into the cdr output CDR stream, excluding the TypeCode kind. Existing cdr contents will not be altered. The marshaled TypeCode will be appended to the given cdr CDR output stream.

Parameters:
cdr Output CDR stream into which the TypeCode will be marshaled.
offset Number of bytes currently in the output CDR stream, including the top-level TypeCode TCKind. This argument is useful for recursive TypeCodes. TypeCodes that contain other TypeCodes should pass an updated offset value to the marshaling operation for those contained TypeCodes.
Returns:
true if marshaling was successful.
Note:
This is a TAO-specific method that is not part of the standard CORBA::TypeCode interface.

If this method returns false, the contents of the cdr output CDR stream are undefined.

Implemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Empty_Param, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Fixed< RefCountPolicy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::String< RefCountPolicy >, TAO::TypeCode::String< TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

bool CORBA::TypeCode::tao_marshal_kind TAO_OutputCDR cdr  )  const [virtual]
 

Marshal the TypeCode TCKind.

Definition at line 28 of file TypeCode.cpp.

00029 {
00030   return cdr << this->kind_;
00031 }

virtual void CORBA::TypeCode::tao_release void   )  [pure virtual]
 

Decrease the reference count on this object.

Implemented in TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >, TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Empty_Param, TAO::TypeCode::Enum< StringType, EnumeratorArrayType, RefCountPolicy >, TAO::TypeCode::Enum< char const *, char const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Fixed< RefCountPolicy >, TAO::TypeCode::Objref< StringType, RefCountPolicy >, TAO::TypeCode::Objref< char const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Sequence< TypeCodeType, RefCountPolicy >, TAO::TypeCode::Sequence< CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::String< RefCountPolicy >, TAO::TypeCode::String< TAO::Null_RefCount_Policy >, TAO::TypeCode::Struct< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, TAO::TypeCode::Struct< char const *, CORBA::TypeCode_ptr const *, Struct_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Union< StringType, TypeCodeType, CaseArrayType, RefCountPolicy >, TAO::TypeCode::Union< char const *, CORBA::TypeCode_ptr const *, Case< char const *, CORBA::TypeCode_ptr const * > const *const *, TAO::Null_RefCount_Policy >, TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

ACE_INLINE CORBA::ValueModifier CORBA::TypeCode::type_modifier void   )  const
 

This method is valid for the following kinds of TypeCodes:

  • tk_value
  • tk_event

Definition at line 134 of file TypeCode.inl.

References type_modifier_i().

00135 {
00136   return this->type_modifier_i ();
00137 }

CORBA::ValueModifier CORBA::TypeCode::type_modifier_i void   )  const [protected, virtual]
 

Reimplemented in TAO::TypeCode::Value< StringType, TypeCodeType, FieldArrayType, RefCountPolicy >, and TAO::TypeCode::Value< char const *, CORBA::TypeCode_ptr const *, Value_Field< char const *, CORBA::TypeCode_ptr const * > const *, TAO::Null_RefCount_Policy >.

Definition at line 209 of file TypeCode.cpp.

Referenced by type_modifier().

00210 {
00211   throw ::CORBA::TypeCode::BadKind ();
00212 }


Member Data Documentation

CORBA::TypeCode_ptr const CORBA::TypeCode::_tc_BadKind [static]
 

Initial value:

  &TAO::TypeCode::tc_BadKind

Definition at line 57 of file TypeCodeA.cpp.

CORBA::TypeCode_ptr const CORBA::TypeCode::_tc_Bounds [static]
 

Initial value:

  &TAO::TypeCode::tc_Bounds

Definition at line 59 of file TypeCodeA.cpp.

TCKind const CORBA::TypeCode::kind_ [protected]
 

The kind of TypeCode.

Definition at line 492 of file TypeCode.h.


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:22:01 2008 for TAO_AnyTypeCode by doxygen 1.3.6