Go to the documentation of this file.00001
00002
00003 #include "tao/AnyTypeCode/Sequence_TypeCode_Static.h"
00004 #include "tao/CDR.h"
00005 #include "tao/AnyTypeCode/TypeCode_Traits.h"
00006
00007 #ifndef __ACE_INLINE__
00008 # include "tao/AnyTypeCode/Sequence_TypeCode_Static.inl"
00009 #endif
00010
00011
00012 ACE_RCSID (AnyTypeCode,
00013 Sequence_TypeCode_Static,
00014 "$Id: Sequence_TypeCode_Static.cpp 77590 2007-03-07 14:07:57Z johnnyw $")
00015
00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00017
00018 bool
00019 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00020 TAO::Null_RefCount_Policy>::tao_marshal (
00021 TAO_OutputCDR & cdr,
00022 CORBA::ULong offset) const
00023 {
00024
00025
00026
00027
00028
00029
00030 TAO_OutputCDR enc;
00031
00032
00033
00034
00035
00036
00037 offset = ACE_align_binary (offset + 4,
00038 ACE_CDR::OCTET_ALIGN);
00039
00040 return
00041 enc << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER)
00042 && marshal (enc,
00043 Traits<CORBA::TypeCode_ptr const *>::get_typecode (
00044 this->content_type_),
00045 offset + enc.total_length ())
00046 && enc << this->length_
00047 && cdr << static_cast<CORBA::ULong> (enc.total_length ())
00048 && cdr.write_octet_array_mb (enc.begin ());
00049 }
00050
00051 void
00052 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00053 TAO::Null_RefCount_Policy>::tao_duplicate (void)
00054 {
00055 }
00056
00057 void
00058 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00059 TAO::Null_RefCount_Policy>::tao_release (void)
00060 {
00061 }
00062
00063 CORBA::Boolean
00064 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00065 TAO::Null_RefCount_Policy>::equal_i (
00066 CORBA::TypeCode_ptr tc
00067 ) const
00068 {
00069
00070
00071 CORBA::ULong const tc_length = tc->length ();
00072
00073 if (this->length_ != tc_length)
00074 return false;
00075
00076 CORBA::TypeCode_var rhs_content_type =
00077 tc->content_type ();
00078
00079 return
00080 Traits<CORBA::TypeCode_ptr const *>::get_typecode (this->content_type_)->equal (
00081 rhs_content_type.in ()
00082 );
00083 }
00084
00085 CORBA::Boolean
00086 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00087 TAO::Null_RefCount_Policy>::equivalent_i (
00088 CORBA::TypeCode_ptr tc
00089 ) const
00090 {
00091
00092
00093 CORBA::ULong const tc_length = tc->length ();
00094
00095 if (this->length_ != tc_length)
00096 return 0;
00097
00098 CORBA::TypeCode_var rhs_content_type =
00099 tc->content_type ();
00100
00101 return
00102 Traits<CORBA::TypeCode_ptr const *>::get_typecode (this->content_type_)->equivalent (
00103 rhs_content_type.in ()
00104 );
00105 }
00106
00107 CORBA::TypeCode_ptr
00108 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00109 TAO::Null_RefCount_Policy>::get_compact_typecode_i (
00110 void) const
00111 {
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 CORBA::TypeCode_ptr mutable_tc =
00122 const_cast<TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00123 TAO::Null_RefCount_Policy> *> (this);
00124
00125 return CORBA::TypeCode::_duplicate (mutable_tc);
00126 }
00127
00128 CORBA::ULong
00129 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00130 TAO::Null_RefCount_Policy>::length_i (
00131 void) const
00132 {
00133 return this->length_;
00134 }
00135
00136 CORBA::TypeCode_ptr
00137 TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *,
00138 TAO::Null_RefCount_Policy>::content_type_i (
00139 void) const
00140 {
00141 return
00142 CORBA::TypeCode::_duplicate (
00143 Traits<CORBA::TypeCode_ptr const *>::get_typecode (this->content_type_));
00144 }
00145
00146 TAO_END_VERSIONED_NAMESPACE_DECL