Go to the documentation of this file.00001
00002
00003 #include "tao/TypeCodeFactory/Recursive_TypeCode.h"
00004
00005 #ifndef __ACE_INLINE__
00006 # include "tao/TypeCodeFactory/Recursive_TypeCode.inl"
00007 #endif
00008
00009 #include "tao/SystemException.h"
00010 #include "tao/ORB_Constants.h"
00011
00012
00013 ACE_RCSID (TypeCodeFactory,
00014 Recursive_TypeCode,
00015 "$Id: Recursive_TypeCode.cpp 89705 2010-03-29 21:15:42Z mitza $")
00016
00017 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00018
00019 bool
00020 TAO::TypeCodeFactory::Recursive_TypeCode::tao_marshal (
00021 TAO_OutputCDR & cdr,
00022 CORBA::ULong offset) const
00023 {
00024
00025 if (CORBA::is_nil (this->the_typecode_))
00026 {
00027
00028
00029
00030 throw ::CORBA::BAD_TYPECODE (CORBA::OMGVMCID | 1, CORBA::COMPLETED_NO);
00031 }
00032
00033 return this->the_typecode_->tao_marshal (cdr, offset);
00034 }
00035
00036 bool
00037 TAO::TypeCodeFactory::Recursive_TypeCode::tao_marshal_kind (
00038 TAO_OutputCDR & cdr) const
00039 {
00040
00041 if (CORBA::is_nil (this->the_typecode_))
00042 {
00043
00044
00045
00046 throw ::CORBA::BAD_TYPECODE (CORBA::OMGVMCID | 1, CORBA::COMPLETED_NO);
00047 }
00048
00049 return this->the_typecode_->tao_marshal_kind (cdr);
00050 }
00051
00052 void
00053 TAO::TypeCodeFactory::Recursive_TypeCode::tao_duplicate (void)
00054 {
00055 this->add_ref ();
00056 }
00057
00058 void
00059 TAO::TypeCodeFactory::Recursive_TypeCode::tao_release (void)
00060 {
00061 this->remove_ref ();
00062 }
00063
00064 CORBA::Boolean
00065 TAO::TypeCodeFactory::Recursive_TypeCode::equal_i (CORBA::TypeCode_ptr tc) const
00066 {
00067 if (CORBA::is_nil (this->the_typecode_))
00068 {
00069
00070
00071 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00072 }
00073
00074 return this->the_typecode_->equal (tc);
00075 }
00076
00077 CORBA::Boolean
00078 TAO::TypeCodeFactory::Recursive_TypeCode::equivalent_i (
00079 CORBA::TypeCode_ptr tc) const
00080 {
00081 if (CORBA::is_nil (this->the_typecode_))
00082 {
00083
00084
00085 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00086 }
00087
00088 return this->the_typecode_->equivalent (tc);
00089 }
00090
00091 CORBA::TypeCode_ptr
00092 TAO::TypeCodeFactory::Recursive_TypeCode::get_compact_typecode_i (
00093 void) const
00094 {
00095 if (CORBA::is_nil (this->the_typecode_))
00096 {
00097
00098
00099 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00100 }
00101
00102 return this->the_typecode_->get_compact_typecode ();
00103 }
00104
00105 char const *
00106 TAO::TypeCodeFactory::Recursive_TypeCode::id_i (void) const
00107 {
00108
00109
00110 return this->id_.in ();
00111 }
00112
00113 char const *
00114 TAO::TypeCodeFactory::Recursive_TypeCode::name_i (void) const
00115 {
00116 if (CORBA::is_nil (this->the_typecode_))
00117 {
00118 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00119 }
00120
00121 return this->the_typecode_->name ();
00122 }
00123
00124 CORBA::ULong
00125 TAO::TypeCodeFactory::Recursive_TypeCode::member_count_i (void) const
00126 {
00127 if (CORBA::is_nil (this->the_typecode_))
00128 {
00129 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00130 }
00131
00132 return this->the_typecode_->member_count ();
00133 }
00134
00135 char const *
00136 TAO::TypeCodeFactory::Recursive_TypeCode::member_name_i (
00137 CORBA::ULong index) const
00138 {
00139 if (CORBA::is_nil (this->the_typecode_))
00140 {
00141 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00142 }
00143
00144 return this->the_typecode_->member_name (index);
00145 }
00146
00147 CORBA::TypeCode_ptr
00148 TAO::TypeCodeFactory::Recursive_TypeCode::member_type_i (
00149 CORBA::ULong index) const
00150 {
00151 if (CORBA::is_nil (this->the_typecode_))
00152 {
00153 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00154 }
00155
00156 return this->the_typecode_->member_type (index);
00157 }
00158
00159 CORBA::Any *
00160 TAO::TypeCodeFactory::Recursive_TypeCode::member_label_i (
00161 CORBA::ULong index) const
00162 {
00163 if (CORBA::is_nil (this->the_typecode_))
00164 {
00165 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00166 }
00167
00168 return this->the_typecode_->member_label (index);
00169 }
00170
00171 CORBA::TypeCode_ptr
00172 TAO::TypeCodeFactory::Recursive_TypeCode::discriminator_type_i (
00173 void) const
00174 {
00175 if (CORBA::is_nil (this->the_typecode_))
00176 {
00177 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00178 }
00179
00180 return this->the_typecode_->discriminator_type ();
00181 }
00182
00183 CORBA::Long
00184 TAO::TypeCodeFactory::Recursive_TypeCode::default_index_i (
00185 void) const
00186 {
00187 if (CORBA::is_nil (this->the_typecode_))
00188 {
00189 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00190 }
00191
00192 return this->the_typecode_->default_index ();
00193 }
00194
00195 CORBA::Visibility
00196 TAO::TypeCodeFactory::Recursive_TypeCode::member_visibility_i (
00197 CORBA::ULong index) const
00198 {
00199 if (CORBA::is_nil (this->the_typecode_))
00200 {
00201 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00202 }
00203
00204 return this->the_typecode_->member_visibility (index);
00205 }
00206
00207 CORBA::ValueModifier
00208 TAO::TypeCodeFactory::Recursive_TypeCode::type_modifier_i (void) const
00209 {
00210 if (CORBA::is_nil (this->the_typecode_))
00211 {
00212 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00213 }
00214
00215 return this->the_typecode_->type_modifier ();
00216 }
00217
00218 CORBA::TypeCode_ptr
00219 TAO::TypeCodeFactory::Recursive_TypeCode::concrete_base_type_i (void) const
00220 {
00221 if (CORBA::is_nil (this->the_typecode_))
00222 {
00223 throw ::CORBA::BAD_TYPECODE (0, CORBA::COMPLETED_NO);
00224 }
00225
00226 return this->the_typecode_->concrete_base_type ();
00227 }
00228
00229 TAO_END_VERSIONED_NAMESPACE_DECL