Go to the documentation of this file.00001
00002
00003 #include "tao/CDR.h"
00004
00005 #ifndef __ACE_INLINE__
00006 # include "tao/AnyTypeCode/Recursive_Type_TypeCode.inl"
00007 #endif
00008
00009 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00010
00011 template <class TypeCodeBase, typename TypeCodeType, typename MemberArrayType>
00012 bool
00013 TAO::TypeCode::Recursive_Type<TypeCodeBase,
00014 TypeCodeType,
00015 MemberArrayType>::tao_marshal (
00016 TAO_OutputCDR & cdr,
00017 CORBA::ULong offset) const
00018 {
00019 ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
00020 guard,
00021 this->lock_,
00022 false);
00023
00024
00025 if (!(this->in_recursion_))
00026 {
00027 this->in_recursion_ = true;
00028
00029
00030
00031
00032
00033
00034
00035
00036 offset = sizeof (CORBA::ULong);
00037
00038
00039
00040
00041
00042 Reset flag (this->in_recursion_);
00043
00044 return this->TypeCodeBase::tao_marshal (cdr, offset);
00045 }
00046
00047
00048
00049
00050
00051
00052 return (cdr << -static_cast<CORBA::Long> (offset));
00053 }
00054
00055 template <class TypeCodeBase, typename TypeCodeType, typename MemberArrayType>
00056 CORBA::Boolean
00057 TAO::TypeCode::Recursive_Type<TypeCodeBase,
00058 TypeCodeType,
00059 MemberArrayType>::equal_i (
00060 CORBA::TypeCode_ptr tc) const
00061 {
00062 ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
00063 guard,
00064 this->lock_,
00065 false);
00066
00067
00068 if (!(this->in_recursion_))
00069 {
00070 this->in_recursion_ = true;
00071
00072
00073
00074
00075
00076 Reset flag (this->in_recursion_);
00077
00078 return this->TypeCodeBase::equal_i (tc);
00079 }
00080
00081
00082 return true;
00083 }
00084
00085 template <class TypeCodeBase, typename TypeCodeType, typename MemberArrayType>
00086 CORBA::Boolean
00087 TAO::TypeCode::Recursive_Type<TypeCodeBase,
00088 TypeCodeType,
00089 MemberArrayType>::equivalent_i (
00090 CORBA::TypeCode_ptr tc) const
00091 {
00092 ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
00093 guard,
00094 this->lock_,
00095 false);
00096
00097
00098 if (!(this->in_recursion_))
00099 {
00100 this->in_recursion_ = true;
00101
00102
00103
00104
00105
00106 Reset flag (this->in_recursion_);
00107
00108 return this->TypeCodeBase::equivalent_i (tc);
00109 }
00110
00111
00112 return true;
00113 }
00114
00115 template <class TypeCodeBase, typename TypeCodeType, typename MemberArrayType>
00116 bool
00117 TAO::TypeCode::Recursive_Type<TypeCodeBase,
00118 TypeCodeType,
00119 MemberArrayType>::tao_marshal_kind (
00120 TAO_OutputCDR & cdr) const
00121 {
00122 ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
00123 guard,
00124 this->lock_,
00125 false);
00126
00127
00128 if (!(this->in_recursion_))
00129 return this->::CORBA::TypeCode::tao_marshal_kind (cdr);
00130
00131
00132 CORBA::ULong const indirection_kind = 0xffffffff;
00133
00134 return (cdr << indirection_kind);
00135 }
00136
00137 TAO_END_VERSIONED_NAMESPACE_DECL