CORBA::TypeCode
implementation for an OMG IDL typedef
.
More...
#include <Alias_TypeCode.h>
Inheritance diagram for TAO::TypeCode::Alias< StringType, TypeCodeType, RefCountPolicy >:
@c TAO CORBA::TypeCode Template Methods | |
tk_alias and tk_value_box CORBA::TypeCode -specific template methods.
| |
virtual CORBA::Boolean | equal_i (CORBA::TypeCode_ptr tc) const |
virtual CORBA::Boolean | equivalent_i (CORBA::TypeCode_ptr tc) const |
virtual CORBA::TypeCode_ptr | get_compact_typecode_i (void) const |
virtual char const * | id_i (void) const |
virtual char const * | name_i (void) const |
virtual CORBA::TypeCode_ptr | content_type_i (void) const |
Base_Attributes< StringType > | attributes_ |
TypeCodeType const | content_type_ |
Public Member Functions | |
Alias (CORBA::TCKind kind, char const *id, char const *name, TypeCodeType const &tc) | |
Constructor. | |
TAO-specific @c CORBA::TypeCode Methods | |
virtual bool | tao_marshal (TAO_OutputCDR &cdr, CORBA::ULong offset) const |
Marshal this TypeCode into a CDR output stream. | |
virtual void | tao_duplicate (void) |
Increase the reference count on this TypeCode . | |
virtual void | tao_release (void) |
Decrease the reference count on this object. |
CORBA::TypeCode
implementation for an OMG IDL typedef
.
This class implements a CORBA::TypeCode
for an OMG IDL typedef
.
Definition at line 48 of file Alias_TypeCode.h.
|
Constructor.
Definition at line 13 of file Alias_TypeCode.inl.
00024 : ::CORBA::TypeCode (kind) 00025 , RefCountPolicy () 00026 , attributes_ (id, name) 00027 , content_type_ (tc) 00028 { 00029 } |
|
Reimplemented from CORBA::TypeCode. Definition at line 181 of file Alias_TypeCode.cpp. References CORBA::TypeCode::_duplicate().
00182 { 00183 return 00184 CORBA::TypeCode::_duplicate ( 00185 Traits<StringType>::get_typecode (this->content_type_)); 00186 } |
|
Implements CORBA::TypeCode. Definition at line 86 of file Alias_TypeCode.cpp.
00087 { 00088 // The CORBA::TypeCode base class already verified equality of the 00089 // base attributes (id and name). Perform an equality comparison of 00090 // the content. 00091 00092 CORBA::TypeCode_var rhs_content_type = tc->content_type (); 00093 00094 return 00095 Traits<StringType>::get_typecode (this->content_type_)->equal ( 00096 rhs_content_type.in ()); 00097 } |
|
Implements CORBA::TypeCode. Definition at line 105 of file Alias_TypeCode.cpp.
00106 { 00107 // Equivalence already verified in the base class 00108 // CORBA::TypeCode::equivalent() method. 00109 00110 return true; 00111 } |
|
Implements CORBA::TypeCode. Definition at line 119 of file Alias_TypeCode.cpp. References TAO_TypeCodeFactory_Adapter::create_alias_tc(), TAO_TypeCodeFactory_Adapter::create_value_box_tc(), and ACE_Dynamic_Service< TYPE >::instance().
00120 { 00121 TAO_TypeCodeFactory_Adapter * const adapter = 00122 ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( 00123 TAO_ORB_Core::typecodefactory_adapter_name () 00124 ); 00125 00126 if (adapter == 0) 00127 { 00128 throw ::CORBA::INITIALIZE (); 00129 } 00130 00131 CORBA::TypeCode_var compact_content_type = 00132 Traits<StringType>::get_typecode ( 00133 this->content_type_)->get_compact_typecode (); 00134 00135 if (this->kind_ == CORBA::tk_alias) 00136 { 00137 return adapter->create_alias_tc (this->attributes_.id (), 00138 "", /* empty name */ 00139 compact_content_type.in ()); 00140 } 00141 else 00142 { 00143 return adapter->create_value_box_tc (this->attributes_.id (), 00144 "", /* empty name */ 00145 compact_content_type.in ()); 00146 } 00147 } |
|
Reimplemented from CORBA::TypeCode. Definition at line 155 of file Alias_TypeCode.cpp.
00156 { 00157 // Ownership is retained by the TypeCode, as required by the C++ 00158 // mapping. 00159 return this->attributes_.id (); 00160 } |
|
Reimplemented from CORBA::TypeCode. Definition at line 168 of file Alias_TypeCode.cpp.
00169 { 00170 // Ownership is retained by the TypeCode, as required by the C++ 00171 // mapping. 00172 return this->attributes_.name (); 00173 } |
|
Increase the reference count on this
Implements CORBA::TypeCode. Definition at line 64 of file Alias_TypeCode.cpp.
00065 { 00066 this->RefCountPolicy::add_ref (); 00067 } |
|
Marshal this
Marshal this
Implements CORBA::TypeCode. Definition at line 27 of file Alias_TypeCode.cpp. References ACE_align_binary(), ACE_OutputCDR::begin(), TAO_ENCAP_BYTE_ORDER, and ACE_OutputCDR::total_length().
00029 { 00030 // A tk_alias TypeCode has a "complex" parameter list type (see 00031 // Table 15-2 in Section 15.3.5.1 "TypeCode" in the CDR section of 00032 // the CORBA specification), meaning that it must be marshaled into 00033 // a CDR encapsulation. 00034 00035 // Create a CDR encapsulation. 00036 00037 TAO_OutputCDR enc; 00038 00039 // Account for the encoded CDR encapsulation length and byte order. 00040 // 00041 // Aligning on an octet since the next value after the CDR 00042 // encapsulation length will always be the byte order octet/boolean 00043 // in this case. 00044 offset = ACE_align_binary (offset + 4, 00045 ACE_CDR::OCTET_ALIGN); 00046 00047 return 00048 enc << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) 00049 && enc << TAO_OutputCDR::from_string (this->attributes_.id (), 0) 00050 && enc << TAO_OutputCDR::from_string (this->attributes_.name (), 0) 00051 && marshal (enc, 00052 Traits<StringType>::get_typecode (this->content_type_), 00053 offset + enc.total_length ()) 00054 && cdr << static_cast<CORBA::ULong> (enc.total_length ()) 00055 && cdr.write_octet_array_mb (enc.begin ()); 00056 } |
|
Decrease the reference count on this object.
Implements CORBA::TypeCode. Definition at line 75 of file Alias_TypeCode.cpp.
00076 { 00077 this->RefCountPolicy::remove_ref (); 00078 } |
|
Base attributes for this Definition at line 103 of file Alias_TypeCode.h. |
|
A pointer to the
Definition at line 117 of file Alias_TypeCode.h. |