// -*- C++ -*- // // $Id$ // **** Code generated by the The ACE ORB (TAO) IDL Compiler **** // 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 // http://doc.ece.uci.edu/ // and // Institute for Software Integrated Systems // Vanderbilt University // Nashville, TN // USA // http://www.isis.vanderbilt.edu/ // // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from // be/be_codegen.cpp:283 #include "ExecutorC.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/CDR.h" #include "tao/Exception_Data.h" #include "tao/Invocation_Adapter.h" #include "tao/Object_T.h" #include "tao/AnyTypeCode/Any.h" #include "tao/AnyTypeCode/Any_Impl_T.h" #include "tao/Basic_Arguments.h" #include "tao/Special_Basic_Arguments.h" #include "ace/OS_NS_string.h" #if !defined (__ACE_INLINE__) #include "ExecutorC.inl" #endif /* !defined INLINE */ // TAO_IDL - Generated from // be/be_visitor_arg_traits.cpp:71 TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Arg traits specializations. namespace TAO { } TAO_END_VERSIONED_NAMESPACE_DECL // TAO_IDL - Generated from // be/be_visitor_interface/interface_cs.cpp:60 // Traits specializations for Executor::ExecCmd. Executor::ExecCmd_ptr TAO::Objref_Traits::duplicate ( Executor::ExecCmd_ptr p ) { return Executor::ExecCmd::_duplicate (p); } void TAO::Objref_Traits::release ( Executor::ExecCmd_ptr p ) { CORBA::release (p); } Executor::ExecCmd_ptr TAO::Objref_Traits::nil (void) { return Executor::ExecCmd::_nil (); } ::CORBA::Boolean TAO::Objref_Traits::marshal ( const Executor::ExecCmd_ptr p, TAO_OutputCDR & cdr ) { return ::CORBA::Object::marshal (p, cdr); } // Function pointer for collocation factory initialization. TAO::Collocation_Proxy_Broker * (*Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer) ( ::CORBA::Object_ptr obj ) = 0; // TAO_IDL - Generated from // be/be_visitor_operation/operation_cs.cpp:78 ::CORBA::Boolean Executor::ExecCmd::changeMode ( ::CORBA::Short mode ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( ::CORBA::SystemException )) { if (!this->is_evaluated ()) { ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); } if (this->the_TAO_ExecCmd_Proxy_Broker_ == 0) { Executor_ExecCmd_setup_collocation (); } TAO::Arg_Traits< ::ACE_InputCDR::to_boolean>::ret_val _tao_retval; TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_mode (mode); TAO::Argument *_the_tao_operation_signature [] = { &_tao_retval, &_tao_mode }; TAO::Invocation_Adapter _tao_call ( this, _the_tao_operation_signature, 2, "changeMode", 10, this->the_TAO_ExecCmd_Proxy_Broker_ ); _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (_tao_retval.excp ()); return _tao_retval.retn (); } // TAO_IDL - Generated from // be/be_visitor_operation/operation_cs.cpp:78 ::CORBA::Boolean Executor::ExecCmd::setPorts ( ::CORBA::Short one, ::CORBA::Short two, ::CORBA::Short three ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( ::CORBA::SystemException )) { if (!this->is_evaluated ()) { ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); } if (this->the_TAO_ExecCmd_Proxy_Broker_ == 0) { Executor_ExecCmd_setup_collocation (); } TAO::Arg_Traits< ::ACE_InputCDR::to_boolean>::ret_val _tao_retval; TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_one (one); TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_two (two); TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_three (three); TAO::Argument *_the_tao_operation_signature [] = { &_tao_retval, &_tao_one, &_tao_two, &_tao_three }; TAO::Invocation_Adapter _tao_call ( this, _the_tao_operation_signature, 4, "setPorts", 8, this->the_TAO_ExecCmd_Proxy_Broker_ ); _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (_tao_retval.excp ()); return _tao_retval.retn (); } Executor::ExecCmd::ExecCmd (void) : the_TAO_ExecCmd_Proxy_Broker_ (0) { this->Executor_ExecCmd_setup_collocation (); } void Executor::ExecCmd::Executor_ExecCmd_setup_collocation () { if (::Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer) { this->the_TAO_ExecCmd_Proxy_Broker_ = ::Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer (this); } } Executor::ExecCmd::~ExecCmd (void) {} void Executor::ExecCmd::_tao_any_destructor (void *_tao_void_pointer) { ExecCmd *_tao_tmp_pointer = static_cast (_tao_void_pointer); CORBA::release (_tao_tmp_pointer); } Executor::ExecCmd_ptr Executor::ExecCmd::_narrow ( ::CORBA::Object_ptr _tao_objref ACE_ENV_ARG_DECL ) { return TAO::Narrow_Utils::narrow ( _tao_objref, "IDL:manut/Executor/ExecCmd:1.0", Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer ACE_ENV_ARG_PARAMETER ); } Executor::ExecCmd_ptr Executor::ExecCmd::_unchecked_narrow ( ::CORBA::Object_ptr _tao_objref ACE_ENV_ARG_DECL ) { return TAO::Narrow_Utils::unchecked_narrow ( _tao_objref, "IDL:manut/Executor/ExecCmd:1.0", Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer ACE_ENV_ARG_PARAMETER ); } Executor::ExecCmd_ptr Executor::ExecCmd::_duplicate (ExecCmd_ptr obj) { if (! CORBA::is_nil (obj)) { obj->_add_ref (); } return obj; } void Executor::ExecCmd::_tao_release (ExecCmd_ptr obj) { CORBA::release (obj); } ::CORBA::Boolean Executor::ExecCmd::_is_a ( const char *value ACE_ENV_ARG_DECL ) { if ( !ACE_OS::strcmp ( value, "IDL:manut/Executor/ExecCmd:1.0" ) || !ACE_OS::strcmp ( value, "IDL:omg.org/CORBA/Object:1.0" ) ) { return true; // success using local knowledge } else { return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( value ACE_ENV_ARG_PARAMETER ); } } const char* Executor::ExecCmd::_interface_repository_id (void) const { return "IDL:manut/Executor/ExecCmd:1.0"; } ::CORBA::Boolean Executor::ExecCmd::marshal (TAO_OutputCDR &cdr) { return (cdr << this); } // TAO_IDL - Generated from // be/be_visitor_typecode/objref_typecode.cpp:76 static TAO::TypeCode::Objref _tao_tc_Executor_ExecCmd ( ::CORBA::tk_objref, "IDL:manut/Executor/ExecCmd:1.0", "ExecCmd"); namespace Executor { ::CORBA::TypeCode_ptr const _tc_ExecCmd = &_tao_tc_Executor_ExecCmd; } // TAO_IDL - Generated from // be/be_visitor_interface/any_op_cs.cpp:51 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 Executor { // Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, ExecCmd_ptr _tao_elem ) { ExecCmd_ptr _tao_objptr = ExecCmd::_duplicate (_tao_elem); _tao_any <<= &_tao_objptr; } // Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, ExecCmd_ptr *_tao_elem ) { TAO::Any_Impl_T::insert ( _tao_any, ExecCmd::_tao_any_destructor, _tc_ExecCmd, *_tao_elem ); } ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, ExecCmd_ptr &_tao_elem ) { return TAO::Any_Impl_T::extract ( _tao_any, ExecCmd::_tao_any_destructor, _tc_ExecCmd, _tao_elem ); } } #else TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, Executor::ExecCmd_ptr _tao_elem ) { Executor::ExecCmd_ptr _tao_objptr = Executor::ExecCmd::_duplicate (_tao_elem); _tao_any <<= &_tao_objptr; } // Non-copying insertion. void operator<<= ( ::CORBA::Any &_tao_any, Executor::ExecCmd_ptr *_tao_elem ) { TAO::Any_Impl_T::insert ( _tao_any, Executor::ExecCmd::_tao_any_destructor, Executor::_tc_ExecCmd, *_tao_elem ); } ::CORBA::Boolean operator>>= ( const ::CORBA::Any &_tao_any, Executor::ExecCmd_ptr &_tao_elem ) { return TAO::Any_Impl_T::extract ( _tao_any, Executor::ExecCmd::_tao_any_destructor, Executor::_tc_ExecCmd, _tao_elem ); } TAO_END_VERSIONED_NAMESPACE_DECL #endif // TAO_IDL - Generated from // be/be_visitor_interface/cdr_op_cs.cpp:63 TAO_BEGIN_VERSIONED_NAMESPACE_DECL ::CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const Executor::ExecCmd_ptr _tao_objref ) { ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; return (strm << _tao_corba_obj); } ::CORBA::Boolean operator>> ( TAO_InputCDR &strm, Executor::ExecCmd_ptr &_tao_objref ) { ::CORBA::Object_var obj; if (!(strm >> obj.inout ())) { return false; } typedef ::Executor::ExecCmd RHS_SCOPED_NAME; // Narrow to the right type. _tao_objref = TAO::Narrow_Utils::unchecked_narrow ( obj.in (), Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer ); return 1; } TAO_END_VERSIONED_NAMESPACE_DECL