#include <Alias_TypeCode_Static.h>
Inheritance diagram for TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >:
@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< char const * > | attributes_ |
CORBA::TypeCode_ptr const * | content_type_ |
Public Member Functions | |
Alias (CORBA::TCKind kind, char const *id, char const *name, CORBA::TypeCode_ptr 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. |
Definition at line 50 of file Alias_TypeCode_Static.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::Alias | ( | CORBA::TCKind | kind, | |
char const * | id, | |||
char const * | name, | |||
CORBA::TypeCode_ptr const * | tc | |||
) |
Constructor.
Definition at line 10 of file Alias_TypeCode_Static.inl.
00015 : ::CORBA::TypeCode (kind) 00016 , ::TAO::Null_RefCount_Policy () 00017 , attributes_ (id, name) 00018 , content_type_ (tc) 00019 { 00020 }
CORBA::TypeCode_ptr TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::content_type_i | ( | void | ) | const [protected, virtual] |
Reimplemented from CORBA::TypeCode.
Definition at line 159 of file Alias_TypeCode_Static.cpp.
References CORBA::TypeCode::_duplicate().
00160 { 00161 return 00162 CORBA::TypeCode::_duplicate ( 00163 Traits<char const *>::get_typecode (this->content_type_)); 00164 }
CORBA::Boolean TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::equal_i | ( | CORBA::TypeCode_ptr | tc | ) | const [protected, virtual] |
Implements CORBA::TypeCode.
Definition at line 76 of file Alias_TypeCode_Static.cpp.
00078 { 00079 // The CORBA::TypeCode base class already verified equality of the 00080 // base attributes (id and name). Perform an equality comparison of 00081 // the content. 00082 00083 CORBA::TypeCode_var rhs_content_type = tc->content_type (); 00084 00085 return 00086 Traits<char const *>::get_typecode (this->content_type_)->equal ( 00087 rhs_content_type.in ()); 00088 }
CORBA::Boolean TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::equivalent_i | ( | CORBA::TypeCode_ptr | tc | ) | const [protected, virtual] |
Implements CORBA::TypeCode.
Definition at line 93 of file Alias_TypeCode_Static.cpp.
00095 { 00096 // Equivalence already verified in the base class 00097 // CORBA::TypeCode::equivalent() method. 00098 00099 return true; 00100 }
CORBA::TypeCode_ptr TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::get_compact_typecode_i | ( | void | ) | const [protected, virtual] |
Implements CORBA::TypeCode.
Definition at line 105 of file Alias_TypeCode_Static.cpp.
References TAO_Pseudo_Var_T< T >::in(), CORBA::tk_alias, and TAO_ORB_Core::typecodefactory_adapter_name().
00107 { 00108 TAO_TypeCodeFactory_Adapter * const adapter = 00109 ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( 00110 TAO_ORB_Core::typecodefactory_adapter_name () 00111 ); 00112 00113 if (adapter == 0) 00114 { 00115 throw ::CORBA::INITIALIZE (); 00116 } 00117 00118 CORBA::TypeCode_var compact_content_type = 00119 Traits<char const *>::get_typecode ( 00120 this->content_type_)->get_compact_typecode (); 00121 00122 if (this->kind_ == CORBA::tk_alias) 00123 { 00124 return adapter->create_alias_tc (this->attributes_.id (), 00125 "", /* empty name */ 00126 compact_content_type.in ()); 00127 } 00128 else 00129 { 00130 return adapter->create_value_box_tc (this->attributes_.id (), 00131 "", /* empty name */ 00132 compact_content_type.in ()); 00133 } 00134 }
char const * TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::id_i | ( | void | ) | const [protected, virtual] |
Reimplemented from CORBA::TypeCode.
Definition at line 139 of file Alias_TypeCode_Static.cpp.
00140 { 00141 // Ownership is retained by the TypeCode, as required by the C++ 00142 // mapping. 00143 return this->attributes_.id (); 00144 }
char const * TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::name_i | ( | void | ) | const [protected, virtual] |
Reimplemented from CORBA::TypeCode.
Definition at line 149 of file Alias_TypeCode_Static.cpp.
00150 { 00151 // Ownership is retained by the TypeCode, as required by the C++ 00152 // mapping. 00153 return this->attributes_.name (); 00154 }
void TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::tao_duplicate | ( | void | ) | [virtual] |
Increase the reference count on this TypeCode
.
Implements CORBA::TypeCode.
Definition at line 62 of file Alias_TypeCode_Static.cpp.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL bool TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::tao_marshal | ( | TAO_OutputCDR & | cdr, | |
CORBA::ULong | offset | |||
) | const [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.
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 . |
true
if marshaling was successful.CORBA::TypeCode
interface.If this method returns false, the contents of the cdr output CDR stream are undefined.
Implements CORBA::TypeCode.
Definition at line 27 of file Alias_TypeCode_Static.cpp.
References ACE_align_binary(), ACE_CDR::OCTET_ALIGN, TAO_ENCAP_BYTE_ORDER, and ACE_OutputCDR::total_length().
00030 { 00031 // A tk_alias TypeCode has a "complex" parameter list type (see 00032 // Table 15-2 in Section 15.3.5.1 "TypeCode" in the CDR section of 00033 // the CORBA specification), meaning that it must be marshaled into 00034 // a CDR encapsulation. 00035 00036 // Create a CDR encapsulation. 00037 00038 TAO_OutputCDR enc; 00039 00040 // Account for the encoded CDR encapsulation length and byte order. 00041 // 00042 // Aligning on an octet since the next value after the CDR 00043 // encapsulation length will always be the byte order octet/boolean 00044 // in this case. 00045 offset = ACE_align_binary (offset + 4, 00046 ACE_CDR::OCTET_ALIGN); 00047 00048 return 00049 enc << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) 00050 && enc << TAO_OutputCDR::from_string (this->attributes_.id (), 0) 00051 && enc << TAO_OutputCDR::from_string (this->attributes_.name (), 0) 00052 && marshal (enc, 00053 Traits<char const *>::get_typecode (this->content_type_), 00054 offset + enc.total_length ()) 00055 && cdr << static_cast<CORBA::ULong> (enc.total_length ()) 00056 && cdr.write_octet_array_mb (enc.begin ()); 00057 }
void TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::tao_release | ( | void | ) | [virtual] |
Decrease the reference count on this object.
Implements CORBA::TypeCode.
Definition at line 69 of file Alias_TypeCode_Static.cpp.
Base_Attributes<char const *> TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::attributes_ [private] |
Base attributes for this TypeCode
containing the repository ID and name of the typedef
.
Definition at line 100 of file Alias_TypeCode_Static.h.
CORBA::TypeCode_ptr const* TAO::TypeCode::Alias< char const *, CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy >::content_type_ [private] |
A pointer to the CORBA::TypeCode_ptr
rather than the CORBA::TypeCode_ptr
itself is stored since that address is well-defined. We may not know the value of the CORBA::TypeCode_ptr
when creating this Field
statically at compile-time, hence the indirection.
TypeCode
is released upon destruction of this TypeCode::Alias
. Definition at line 114 of file Alias_TypeCode_Static.h.