// -*- C++ -*- /** * Code generated by the The ACE ORB (TAO) IDL Compiler v2.4.4 * TAO and the TAO IDL Compiler have been developed by: * Center for Distributed Object Computing * Washington University * St. Louis, MO * USA * http://www.cs.wustl.edu/~schmidt/doc-center.html * and * Distributed Object Computing Laboratory * University of California at Irvine * Irvine, CA * USA * and * Institute for Software Integrated Systems * Vanderbilt University * Nashville, TN * USA * http://www.isis.vanderbilt.edu/ * * Information about TAO is available at: * http://www.dre.vanderbilt.edu/~schmidt/TAO.html **/ // TAO_IDL - Generated from // be\be_codegen.cpp:366 #include "MyServiceC.h" #include "tao/AnyTypeCode/Null_RefCount_Policy.h" #include "tao/AnyTypeCode/TypeCode_Constants.h" #include "tao/AnyTypeCode/Alias_TypeCode_Static.h" #include "tao/AnyTypeCode/Objref_TypeCode_Static.h" #include "tao/AnyTypeCode/Sequence_TypeCode_Static.h" #include "tao/AnyTypeCode/String_TypeCode_Static.h" #include "tao/CDR.h" #include "tao/Exception_Data.h" #include "tao/Invocation_Adapter.h" #include "tao/Object_T.h" #include "tao/CDR.h" #include "tao/AnyTypeCode/Any.h" #include "tao/AnyTypeCode/Any_Impl_T.h" #include "tao/AnyTypeCode/Any_Dual_Impl_T.h" #include "ace/OS_NS_string.h" #if !defined (__ACE_INLINE__) #include "MyServiceC.inl" #endif /* !defined INLINE */ // TAO_IDL - Generated from // be\be_visitor_sequence\sequence_cs.cpp:105 #if !defined (_SIMPLESERVICE_ECHOLIST_CS_) #define _SIMPLESERVICE_ECHOLIST_CS_ SimpleService::EchoList::EchoList (void) {} SimpleService::EchoList::EchoList ( ::CORBA::ULong max) : ::TAO::unbounded_basic_string_sequence (max) {} SimpleService::EchoList::EchoList ( ::CORBA::ULong max, ::CORBA::ULong length, ::CORBA::Char * * buffer, ::CORBA::Boolean release) : ::TAO::unbounded_basic_string_sequence (max, length, buffer, release) {} SimpleService::EchoList::EchoList ( const EchoList &seq) : ::TAO::unbounded_basic_string_sequence (seq) {} SimpleService::EchoList::~EchoList (void) {} void SimpleService::EchoList::_tao_any_destructor ( void * _tao_void_pointer) { EchoList * _tao_tmp_pointer = static_cast (_tao_void_pointer); delete _tao_tmp_pointer; } #endif /* end #if !defined */ // TAO_IDL - Generated from // be\be_visitor_typecode\alias_typecode.cpp:49 // TAO_IDL - Generated from // be\be_visitor_typecode\typecode_defn.cpp:461 #ifndef _TAO_TYPECODE_SimpleService_EchoList_GUARD #define _TAO_TYPECODE_SimpleService_EchoList_GUARD TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { namespace TypeCode { namespace { TAO::TypeCode::Sequence< ::CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy> SimpleService_EchoList_0 ( ::CORBA::tk_sequence, &CORBA::_tc_string, 0U); ::CORBA::TypeCode_ptr const tc_SimpleService_EchoList_0 = &SimpleService_EchoList_0; } } } TAO_END_VERSIONED_NAMESPACE_DECL #endif /* _TAO_TYPECODE_SimpleService_EchoList_GUARD */ static TAO::TypeCode::Alias _tao_tc_SimpleService_EchoList ( ::CORBA::tk_alias, "IDL:SimpleService/EchoList:1.0", "EchoList", &TAO::TypeCode::tc_SimpleService_EchoList_0); namespace SimpleService { ::CORBA::TypeCode_ptr const _tc_EchoList = &_tao_tc_SimpleService_EchoList; } // TAO_IDL - Generated from // be\be_visitor_sequence\sequence_cs.cpp:105 #if !defined (_SIMPLESERVICE_VALUELIST_CS_) #define _SIMPLESERVICE_VALUELIST_CS_ SimpleService::ValueList::ValueList (void) {} SimpleService::ValueList::ValueList ( ::CORBA::ULong max) : ::TAO::unbounded_value_sequence< ::CORBA::Float> (max) {} SimpleService::ValueList::ValueList ( ::CORBA::ULong max, ::CORBA::ULong length, ::CORBA::Float * buffer, ::CORBA::Boolean release) : ::TAO::unbounded_value_sequence< ::CORBA::Float> (max, length, buffer, release) {} SimpleService::ValueList::ValueList ( const ValueList &seq) : ::TAO::unbounded_value_sequence< ::CORBA::Float> (seq) {} SimpleService::ValueList::~ValueList (void) {} void SimpleService::ValueList::_tao_any_destructor ( void * _tao_void_pointer) { ValueList * _tao_tmp_pointer = static_cast (_tao_void_pointer); delete _tao_tmp_pointer; } #endif /* end #if !defined */ // TAO_IDL - Generated from // be\be_visitor_typecode\alias_typecode.cpp:49 // TAO_IDL - Generated from // be\be_visitor_typecode\typecode_defn.cpp:461 #ifndef _TAO_TYPECODE_SimpleService_ValueList_GUARD #define _TAO_TYPECODE_SimpleService_ValueList_GUARD TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { namespace TypeCode { namespace { TAO::TypeCode::Sequence< ::CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy> SimpleService_ValueList_0 ( ::CORBA::tk_sequence, &CORBA::_tc_float, 0U); ::CORBA::TypeCode_ptr const tc_SimpleService_ValueList_0 = &SimpleService_ValueList_0; } } } TAO_END_VERSIONED_NAMESPACE_DECL #endif /* _TAO_TYPECODE_SimpleService_ValueList_GUARD */ static TAO::TypeCode::Alias _tao_tc_SimpleService_ValueList ( ::CORBA::tk_alias, "IDL:SimpleService/ValueList:1.0", "ValueList", &TAO::TypeCode::tc_SimpleService_ValueList_0); namespace SimpleService { ::CORBA::TypeCode_ptr const _tc_ValueList = &_tao_tc_SimpleService_ValueList; } // TAO_IDL - Generated from // be\be_visitor_interface\interface_cs.cpp:48 TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Traits specializations for SimpleService::MyService. SimpleService::MyService_ptr TAO::Objref_Traits::duplicate ( SimpleService::MyService_ptr p) { return SimpleService::MyService::_duplicate (p); } void TAO::Objref_Traits::release ( SimpleService::MyService_ptr p) { ::CORBA::release (p); } SimpleService::MyService_ptr TAO::Objref_Traits::nil (void) { return SimpleService::MyService::_nil (); } ::CORBA::Boolean TAO::Objref_Traits::marshal ( const SimpleService::MyService_ptr p, TAO_OutputCDR & cdr) { return ::CORBA::Object::marshal (p, cdr); } TAO_END_VERSIONED_NAMESPACE_DECL // TAO_IDL - Generated from // be\be_visitor_operation\operation_cs.cpp:88 char * SimpleService::MyService::echo ( const char * msg) { if (!this->is_evaluated ()) { ::CORBA::Object::tao_object_initialize (this); } TAO::Arg_Traits< char *>::ret_val _tao_retval; TAO::Arg_Traits< char *>::in_arg_val _tao_msg (msg); TAO::Argument *_the_tao_operation_signature [] = { &_tao_retval, &_tao_msg }; TAO::Invocation_Adapter _tao_call ( this, _the_tao_operation_signature, 2, "echo", 4, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY ); _tao_call.invoke (0, 0); return _tao_retval.retn (); } // TAO_IDL - Generated from // be\be_visitor_operation\operation_cs.cpp:88 ::SimpleService::EchoList * SimpleService::MyService::get_echo_history ( void) { if (!this->is_evaluated ()) { ::CORBA::Object::tao_object_initialize (this); } TAO::Arg_Traits< ::SimpleService::EchoList>::ret_val _tao_retval; TAO::Argument *_the_tao_operation_signature [] = { &_tao_retval }; TAO::Invocation_Adapter _tao_call ( this, _the_tao_operation_signature, 1, "get_echo_history", 16, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY, TAO::TAO_TWOWAY_INVOCATION , TAO::TAO_SYNCHRONOUS_INVOCATION, false ); _tao_call.invoke (0, 0); return _tao_retval.retn (); } // TAO_IDL - Generated from // be\be_visitor_operation\operation_cs.cpp:88 void SimpleService::MyService::set_value ( ::CORBA::Float value) { if (!this->is_evaluated ()) { ::CORBA::Object::tao_object_initialize (this); } TAO::Arg_Traits< void>::ret_val _tao_retval; TAO::Arg_Traits< ::CORBA::Float>::in_arg_val _tao_value (value); TAO::Argument *_the_tao_operation_signature [] = { &_tao_retval, &_tao_value }; TAO::Invocation_Adapter _tao_call ( this, _the_tao_operation_signature, 2, "set_value", 9, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY ); _tao_call.invoke (0, 0); } // TAO_IDL - Generated from // be\be_visitor_operation\operation_cs.cpp:88 ::CORBA::Float SimpleService::MyService::get_value ( void) { if (!this->is_evaluated ()) { ::CORBA::Object::tao_object_initialize (this); } TAO::Arg_Traits< ::CORBA::Float>::ret_val _tao_retval; TAO::Argument *_the_tao_operation_signature [] = { &_tao_retval }; TAO::Invocation_Adapter _tao_call ( this, _the_tao_operation_signature, 1, "get_value", 9, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY, TAO::TAO_TWOWAY_INVOCATION , TAO::TAO_SYNCHRONOUS_INVOCATION, false ); _tao_call.invoke (0, 0); return _tao_retval.retn (); } // TAO_IDL - Generated from // be\be_visitor_operation\operation_cs.cpp:88 ::SimpleService::ValueList * SimpleService::MyService::get_value_history ( void) { if (!this->is_evaluated ()) { ::CORBA::Object::tao_object_initialize (this); } TAO::Arg_Traits< ::SimpleService::ValueList>::ret_val _tao_retval; TAO::Argument *_the_tao_operation_signature [] = { &_tao_retval }; TAO::Invocation_Adapter _tao_call ( this, _the_tao_operation_signature, 1, "get_value_history", 17, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY, TAO::TAO_TWOWAY_INVOCATION , TAO::TAO_SYNCHRONOUS_INVOCATION, false ); _tao_call.invoke (0, 0); return _tao_retval.retn (); } SimpleService::MyService::MyService (void) { } SimpleService::MyService::~MyService (void) { } void SimpleService::MyService::_tao_any_destructor (void *_tao_void_pointer) { MyService *_tao_tmp_pointer = static_cast (_tao_void_pointer); ::CORBA::release (_tao_tmp_pointer); } SimpleService::MyService_ptr SimpleService::MyService::_narrow ( ::CORBA::Object_ptr _tao_objref) { return TAO::Narrow_Utils::narrow ( _tao_objref, "IDL:SimpleService/MyService:1.0"); } SimpleService::MyService_ptr SimpleService::MyService::_unchecked_narrow ( ::CORBA::Object_ptr _tao_objref) { return TAO::Narrow_Utils::unchecked_narrow ( _tao_objref); } SimpleService::MyService_ptr SimpleService::MyService::_nil (void) { return 0; } SimpleService::MyService_ptr SimpleService::MyService::_duplicate (MyService_ptr obj) { if (! ::CORBA::is_nil (obj)) { obj->_add_ref (); } return obj; } void SimpleService::MyService::_tao_release (MyService_ptr obj) { ::CORBA::release (obj); } ::CORBA::Boolean SimpleService::MyService::_is_a (const char *value) { if ( ACE_OS::strcmp ( value, "IDL:SimpleService/MyService:1.0" ) == 0 || ACE_OS::strcmp ( value, "IDL:omg.org/CORBA/Object:1.0" ) == 0 ) { return true; // success using local knowledge } else { return this->::CORBA::Object::_is_a (value); } } const char* SimpleService::MyService::_interface_repository_id (void) const { return "IDL:SimpleService/MyService:1.0"; } ::CORBA::Boolean SimpleService::MyService::marshal (TAO_OutputCDR &cdr) { return (cdr << this); } // TAO_IDL - Generated from // be\be_visitor_typecode\objref_typecode.cpp:70 static TAO::TypeCode::Objref _tao_tc_SimpleService_MyService ( ::CORBA::tk_objref, "IDL:SimpleService/MyService:1.0", "MyService"); namespace SimpleService { ::CORBA::TypeCode_ptr const _tc_MyService = &_tao_tc_SimpleService_MyService; } // TAO_IDL - Generated from // be\be_visitor_sequence\any_op_cs.cpp:45 TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_END_VERSIONED_NAMESPACE_DECL #if defined (ACE_ANY_OPS_USE_NAMESPACE) namespace SimpleService { /// Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, const ::SimpleService::EchoList &_tao_elem) { TAO::Any_Dual_Impl_T< ::SimpleService::EchoList>::insert_copy ( _tao_any, ::SimpleService::EchoList::_tao_any_destructor, ::SimpleService::_tc_EchoList, _tao_elem); } /// Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, ::SimpleService::EchoList *_tao_elem) { TAO::Any_Dual_Impl_T< ::SimpleService::EchoList>::insert ( _tao_any, ::SimpleService::EchoList::_tao_any_destructor, ::SimpleService::_tc_EchoList, _tao_elem); } /// Extraction to const pointer. ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, const ::SimpleService::EchoList *&_tao_elem) { return TAO::Any_Dual_Impl_T< ::SimpleService::EchoList>::extract ( _tao_any, ::SimpleService::EchoList::_tao_any_destructor, ::SimpleService::_tc_EchoList, _tao_elem); } } #else TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, const SimpleService::EchoList &_tao_elem) { TAO::Any_Dual_Impl_T::insert_copy ( _tao_any, SimpleService::EchoList::_tao_any_destructor, SimpleService::_tc_EchoList, _tao_elem); } /// Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, SimpleService::EchoList *_tao_elem) { TAO::Any_Dual_Impl_T::insert ( _tao_any, SimpleService::EchoList::_tao_any_destructor, SimpleService::_tc_EchoList, _tao_elem); } /// Extraction to const pointer. ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, const SimpleService::EchoList *&_tao_elem) { return TAO::Any_Dual_Impl_T::extract ( _tao_any, SimpleService::EchoList::_tao_any_destructor, SimpleService::_tc_EchoList, _tao_elem); } TAO_END_VERSIONED_NAMESPACE_DECL #endif // TAO_IDL - Generated from // be\be_visitor_sequence\any_op_cs.cpp:45 TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_END_VERSIONED_NAMESPACE_DECL #if defined (ACE_ANY_OPS_USE_NAMESPACE) namespace SimpleService { /// Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, const ::SimpleService::ValueList &_tao_elem) { TAO::Any_Dual_Impl_T< ::SimpleService::ValueList>::insert_copy ( _tao_any, ::SimpleService::ValueList::_tao_any_destructor, ::SimpleService::_tc_ValueList, _tao_elem); } /// Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, ::SimpleService::ValueList *_tao_elem) { TAO::Any_Dual_Impl_T< ::SimpleService::ValueList>::insert ( _tao_any, ::SimpleService::ValueList::_tao_any_destructor, ::SimpleService::_tc_ValueList, _tao_elem); } /// Extraction to const pointer. ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, const ::SimpleService::ValueList *&_tao_elem) { return TAO::Any_Dual_Impl_T< ::SimpleService::ValueList>::extract ( _tao_any, ::SimpleService::ValueList::_tao_any_destructor, ::SimpleService::_tc_ValueList, _tao_elem); } } #else TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, const SimpleService::ValueList &_tao_elem) { TAO::Any_Dual_Impl_T::insert_copy ( _tao_any, SimpleService::ValueList::_tao_any_destructor, SimpleService::_tc_ValueList, _tao_elem); } /// Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, SimpleService::ValueList *_tao_elem) { TAO::Any_Dual_Impl_T::insert ( _tao_any, SimpleService::ValueList::_tao_any_destructor, SimpleService::_tc_ValueList, _tao_elem); } /// Extraction to const pointer. ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, const SimpleService::ValueList *&_tao_elem) { return TAO::Any_Dual_Impl_T::extract ( _tao_any, SimpleService::ValueList::_tao_any_destructor, SimpleService::_tc_ValueList, _tao_elem); } TAO_END_VERSIONED_NAMESPACE_DECL #endif // TAO_IDL - Generated from // be\be_visitor_interface\any_op_cs.cpp:38 TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { template<> ::CORBA::Boolean Any_Impl_T::to_object ( ::CORBA::Object_ptr &_tao_elem) const { _tao_elem = ::CORBA::Object::_duplicate (this->value_); return true; } } TAO_END_VERSIONED_NAMESPACE_DECL #if defined (ACE_ANY_OPS_USE_NAMESPACE) namespace SimpleService { /// Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, MyService_ptr _tao_elem) { MyService_ptr _tao_objptr = MyService::_duplicate (_tao_elem); _tao_any <<= &_tao_objptr; } /// Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, MyService_ptr *_tao_elem) { TAO::Any_Impl_T::insert ( _tao_any, MyService::_tao_any_destructor, _tc_MyService, *_tao_elem); } ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, MyService_ptr &_tao_elem) { return TAO::Any_Impl_T::extract ( _tao_any, MyService::_tao_any_destructor, _tc_MyService, _tao_elem); } } #else TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, SimpleService::MyService_ptr _tao_elem) { SimpleService::MyService_ptr _tao_objptr = SimpleService::MyService::_duplicate (_tao_elem); _tao_any <<= &_tao_objptr; } /// Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, SimpleService::MyService_ptr *_tao_elem) { TAO::Any_Impl_T::insert ( _tao_any, SimpleService::MyService::_tao_any_destructor, SimpleService::_tc_MyService, *_tao_elem); } ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, SimpleService::MyService_ptr &_tao_elem) { return TAO::Any_Impl_T::extract ( _tao_any, SimpleService::MyService::_tao_any_destructor, SimpleService::_tc_MyService, _tao_elem); } TAO_END_VERSIONED_NAMESPACE_DECL #endif // TAO_IDL - Generated from // be\be_visitor_sequence\cdr_op_cs.cpp:93 #if !defined _TAO_CDR_OP_SimpleService_EchoList_CPP_ #define _TAO_CDR_OP_SimpleService_EchoList_CPP_ TAO_BEGIN_VERSIONED_NAMESPACE_DECL ::CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const SimpleService::EchoList &_tao_sequence) { return TAO::marshal_sequence(strm, _tao_sequence); } ::CORBA::Boolean operator>> ( TAO_InputCDR &strm, SimpleService::EchoList &_tao_sequence) { return TAO::demarshal_sequence(strm, _tao_sequence); } TAO_END_VERSIONED_NAMESPACE_DECL #endif /* _TAO_CDR_OP_SimpleService_EchoList_CPP_ */ // TAO_IDL - Generated from // be\be_visitor_sequence\cdr_op_cs.cpp:93 #if !defined _TAO_CDR_OP_SimpleService_ValueList_CPP_ #define _TAO_CDR_OP_SimpleService_ValueList_CPP_ TAO_BEGIN_VERSIONED_NAMESPACE_DECL ::CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const SimpleService::ValueList &_tao_sequence) { return TAO::marshal_sequence(strm, _tao_sequence); } ::CORBA::Boolean operator>> ( TAO_InputCDR &strm, SimpleService::ValueList &_tao_sequence) { return TAO::demarshal_sequence(strm, _tao_sequence); } TAO_END_VERSIONED_NAMESPACE_DECL #endif /* _TAO_CDR_OP_SimpleService_ValueList_CPP_ */ // TAO_IDL - Generated from // be\be_visitor_interface\cdr_op_cs.cpp:51 TAO_BEGIN_VERSIONED_NAMESPACE_DECL ::CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const SimpleService::MyService_ptr _tao_objref) { ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; return (strm << _tao_corba_obj); } ::CORBA::Boolean operator>> ( TAO_InputCDR &strm, SimpleService::MyService_ptr &_tao_objref) { ::CORBA::Object_var obj; if (!(strm >> obj.inout ())) { return false; } typedef ::SimpleService::MyService RHS_SCOPED_NAME; // Narrow to the right type. _tao_objref = TAO::Narrow_Utils::unchecked_narrow (obj.in ()); return true; } TAO_END_VERSIONED_NAMESPACE_DECL