PolicyA.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: PolicyA.cpp 79256 2007-08-08 11:24:06Z johnnyw $
00004 
00005 // ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
00006 // TAO and the TAO IDL Compiler have been developed by:
00007 //       Center for Distributed Object Computing
00008 //       Washington University
00009 //       St. Louis, MO
00010 //       USA
00011 //       http://www.cs.wustl.edu/~schmidt/doc-center.html
00012 // and
00013 //       Distributed Object Computing Laboratory
00014 //       University of California at Irvine
00015 //       Irvine, CA
00016 //       USA
00017 //       http://doc.ece.uci.edu/
00018 // and
00019 //       Institute for Software Integrated Systems
00020 //       Vanderbilt University
00021 //       Nashville, TN
00022 //       USA
00023 //       http://www.isis.vanderbilt.edu/
00024 //
00025 // Information about TAO is available at:
00026 //     http://www.cs.wustl.edu/~schmidt/TAO.html
00027 
00028 #include "tao/AnyTypeCode/PolicyA.h"
00029 #include "tao/AnyTypeCode/Null_RefCount_Policy.h"
00030 #include "tao/AnyTypeCode/TypeCode_Constants.h"
00031 #include "tao/AnyTypeCode/Alias_TypeCode_Static.h"
00032 #include "tao/AnyTypeCode/Objref_TypeCode_Static.h"
00033 #include "tao/AnyTypeCode/Struct_TypeCode_Static.h"
00034 #include "tao/AnyTypeCode/TypeCode_Struct_Field.h"
00035 #include "tao/CDR.h"
00036 #include "tao/AnyTypeCode/Any.h"
00037 #include "tao/AnyTypeCode/Any_Impl_T.h"
00038 #include "tao/AnyTypeCode/Any_Dual_Impl_T.h"
00039 
00040 #include "tao/AnyTypeCode/UShortSeqA.h"
00041 
00042 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00043 
00044 // TAO_IDL - Generated from
00045 // be\be_visitor_typecode/alias_typecode.cpp:50
00046 
00047 static TAO::TypeCode::Alias<char const *,
00048                             CORBA::TypeCode_ptr const *,
00049                             TAO::Null_RefCount_Policy>
00050   _tao_tc_CORBA_PolicyErrorCode (
00051     CORBA::tk_alias,
00052     "IDL:omg.org/CORBA/PolicyErrorCode:1.0",
00053     "PolicyErrorCode",
00054     &CORBA::_tc_short);
00055 
00056 namespace CORBA
00057 {
00058   ::CORBA::TypeCode_ptr const _tc_PolicyErrorCode =
00059     &_tao_tc_CORBA_PolicyErrorCode;
00060 }
00061 
00062 
00063 
00064 // TAO_IDL - Generated from
00065 // be\be_visitor_typecode/struct_typecode.cpp:87
00066 
00067 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const _tao_fields_CORBA_PolicyError[] =
00068   {
00069     { "reason", &CORBA::_tc_PolicyErrorCode }
00070 
00071   };
00072 static TAO::TypeCode::Struct<char const *,
00073                       CORBA::TypeCode_ptr const *,
00074                       TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *,
00075                       TAO::Null_RefCount_Policy>
00076   _tao_tc_CORBA_PolicyError (
00077     CORBA::tk_except,
00078     "IDL:omg.org/CORBA/PolicyError:1.0",
00079     "PolicyError",
00080     _tao_fields_CORBA_PolicyError,
00081     1);
00082 
00083 namespace CORBA
00084 {
00085   ::CORBA::TypeCode_ptr const _tc_PolicyError =
00086     &_tao_tc_CORBA_PolicyError;
00087 }
00088 
00089 
00090 
00091 // TAO_IDL - Generated from
00092 // be\be_visitor_typecode/struct_typecode.cpp:87
00093 
00094 
00095 
00096 // TAO_IDL - Generated from
00097 // be\be_visitor_typecode/typecode_defn.cpp:937
00098 
00099 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const _tao_fields_CORBA_InvalidPolicies[] =
00100   {
00101     { "indices", &CORBA::_tc_UShortSeq }
00102 
00103   };
00104 static TAO::TypeCode::Struct<char const *,
00105                       CORBA::TypeCode_ptr const *,
00106                       TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *,
00107                       TAO::Null_RefCount_Policy>
00108   _tao_tc_CORBA_InvalidPolicies (
00109     CORBA::tk_except,
00110     "IDL:omg.org/CORBA/InvalidPolicies:1.0",
00111     "InvalidPolicies",
00112     _tao_fields_CORBA_InvalidPolicies,
00113     1);
00114 
00115 namespace CORBA
00116 {
00117   ::CORBA::TypeCode_ptr const _tc_InvalidPolicies =
00118     &_tao_tc_CORBA_InvalidPolicies;
00119 }
00120 
00121 
00122 
00123 // TAO_IDL - Generated from
00124 // be\be_visitor_typecode/objref_typecode.cpp:76
00125 
00126 static TAO::TypeCode::Objref<char const *,
00127                              TAO::Null_RefCount_Policy>
00128   _tao_tc_CORBA_Policy (
00129     CORBA::tk_objref,
00130     "IDL:omg.org/CORBA/Policy:1.0",
00131     "Policy");
00132 
00133 namespace CORBA
00134 {
00135   ::CORBA::TypeCode_ptr const _tc_Policy =
00136     &_tao_tc_CORBA_Policy;
00137 }
00138 
00139 
00140 
00141 // TAO_IDL - Generated from
00142 // be\be_visitor_exception/any_op_cs.cpp:50
00143 
00144 namespace TAO
00145 {
00146   template<>
00147   CORBA::Boolean
00148   Any_Dual_Impl_T<CORBA::PolicyError>::demarshal_value (
00149       TAO_InputCDR & cdr
00150     )
00151   {
00152     CORBA::String_var id;
00153 
00154     if (!(cdr >> id.out ()))
00155       {
00156         return false;
00157       }
00158 
00159     try
00160       {
00161         this->value_->_tao_decode (cdr);
00162       }
00163     catch (const ::CORBA::Exception&)
00164       {
00165         return false;
00166       }
00167 
00168     return true;
00169   }
00170 }
00171 
00172 // Copying insertion.
00173 void operator<<= (
00174     CORBA::Any &_tao_any,
00175     const CORBA::PolicyError &_tao_elem
00176   )
00177 {
00178   TAO::Any_Dual_Impl_T<CORBA::PolicyError>::insert_copy (
00179       _tao_any,
00180       CORBA::PolicyError::_tao_any_destructor,
00181       CORBA::_tc_PolicyError,
00182       _tao_elem
00183     );
00184 }
00185 
00186 // Non-copying insertion.
00187 void operator<<= (
00188     CORBA::Any &_tao_any,
00189     CORBA::PolicyError *_tao_elem
00190   )
00191 {
00192   TAO::Any_Dual_Impl_T<CORBA::PolicyError>::insert (
00193       _tao_any,
00194       CORBA::PolicyError::_tao_any_destructor,
00195       CORBA::_tc_PolicyError,
00196       _tao_elem
00197     );
00198 }
00199 
00200 // Extraction to non-const pointer (deprecated).
00201 CORBA::Boolean operator>>= (
00202     const CORBA::Any &_tao_any,
00203     CORBA::PolicyError *&_tao_elem
00204   )
00205 {
00206   return _tao_any >>= const_cast<
00207       const CORBA::PolicyError *&> (
00208       _tao_elem
00209     );
00210 }
00211 
00212 // Extraction to const pointer.
00213 CORBA::Boolean operator>>= (
00214     const CORBA::Any &_tao_any,
00215     const CORBA::PolicyError *&_tao_elem
00216   )
00217 {
00218   return
00219     TAO::Any_Dual_Impl_T<CORBA::PolicyError>::extract (
00220         _tao_any,
00221         CORBA::PolicyError::_tao_any_destructor,
00222         CORBA::_tc_PolicyError,
00223         _tao_elem
00224       );
00225 }
00226 
00227 // TAO_IDL - Generated from
00228 // be\be_visitor_exception/any_op_cs.cpp:50
00229 
00230 namespace TAO
00231 {
00232   template<>
00233   CORBA::Boolean
00234   Any_Dual_Impl_T<CORBA::InvalidPolicies>::demarshal_value (
00235       TAO_InputCDR & cdr
00236     )
00237   {
00238     CORBA::String_var id;
00239 
00240     if (!(cdr >> id.out ()))
00241       {
00242         return false;
00243       }
00244 
00245     try
00246       {
00247         this->value_->_tao_decode (cdr);
00248       }
00249     catch (const ::CORBA::Exception&)
00250       {
00251         return false;
00252       }
00253 
00254     return true;
00255   }
00256 }
00257 
00258 // Copying insertion.
00259 void operator<<= (
00260     CORBA::Any &_tao_any,
00261     const CORBA::InvalidPolicies &_tao_elem
00262   )
00263 {
00264   TAO::Any_Dual_Impl_T<CORBA::InvalidPolicies>::insert_copy (
00265       _tao_any,
00266       CORBA::InvalidPolicies::_tao_any_destructor,
00267       CORBA::_tc_InvalidPolicies,
00268       _tao_elem
00269     );
00270 }
00271 
00272 // Non-copying insertion.
00273 void operator<<= (
00274     CORBA::Any &_tao_any,
00275     CORBA::InvalidPolicies *_tao_elem
00276   )
00277 {
00278   TAO::Any_Dual_Impl_T<CORBA::InvalidPolicies>::insert (
00279       _tao_any,
00280       CORBA::InvalidPolicies::_tao_any_destructor,
00281       CORBA::_tc_InvalidPolicies,
00282       _tao_elem
00283     );
00284 }
00285 
00286 // Extraction to non-const pointer (deprecated).
00287 CORBA::Boolean operator>>= (
00288     const CORBA::Any &_tao_any,
00289     CORBA::InvalidPolicies *&_tao_elem
00290   )
00291 {
00292   return _tao_any >>= const_cast<
00293       const CORBA::InvalidPolicies *&> (
00294       _tao_elem
00295     );
00296 }
00297 
00298 // Extraction to const pointer.
00299 CORBA::Boolean operator>>= (
00300     const CORBA::Any &_tao_any,
00301     const CORBA::InvalidPolicies *&_tao_elem
00302   )
00303 {
00304   return
00305     TAO::Any_Dual_Impl_T<CORBA::InvalidPolicies>::extract (
00306         _tao_any,
00307         CORBA::InvalidPolicies::_tao_any_destructor,
00308         CORBA::_tc_InvalidPolicies,
00309         _tao_elem
00310       );
00311 }
00312 
00313 // TAO_IDL - Generated from
00314 // be\be_visitor_interface/any_op_cs.cpp:50
00315 
00316 namespace TAO
00317 {
00318   template<>
00319   CORBA::Boolean
00320   Any_Impl_T<CORBA::Policy>::to_object (
00321       CORBA::Object_ptr &_tao_elem
00322     ) const
00323   {
00324     _tao_elem = CORBA::Object::_duplicate (this->value_);
00325     return true;
00326   }
00327 }
00328 
00329 // Copying insertion.
00330 void
00331 operator<<= (
00332     CORBA::Any &_tao_any,
00333     CORBA::Policy_ptr _tao_elem
00334   )
00335 {
00336   CORBA::Policy_ptr _tao_objptr =
00337     CORBA::Policy::_duplicate (_tao_elem);
00338   _tao_any <<= &_tao_objptr;
00339 }
00340 
00341 // Non-copying insertion.
00342 void
00343 operator<<= (
00344     CORBA::Any &_tao_any,
00345     CORBA::Policy_ptr *_tao_elem
00346   )
00347 {
00348   TAO::Any_Impl_T<CORBA::Policy>::insert (
00349       _tao_any,
00350       CORBA::Policy::_tao_any_destructor,
00351       CORBA::_tc_Policy,
00352       *_tao_elem
00353     );
00354 }
00355 
00356 CORBA::Boolean
00357 operator>>= (
00358     const CORBA::Any &_tao_any,
00359     CORBA::Policy_ptr &_tao_elem
00360   )
00361 {
00362   return
00363     TAO::Any_Impl_T<CORBA::Policy>::extract (
00364         _tao_any,
00365         CORBA::Policy::_tao_any_destructor,
00366         CORBA::_tc_Policy,
00367         _tao_elem
00368       );
00369 }
00370 
00371 // TAO_IDL - Generated from
00372 // be\be_visitor_interface/any_op_cs.cpp:50
00373 
00374 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:21:06 2008 for TAO_AnyTypeCode by doxygen 1.3.6