From 1adba473e6917b227e1b0a1118148101dca202e7 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Mon, 31 Mar 2014 16:53:55 +0200 Subject: add quellcode Signed-off-by: Manuel Traut --- quellcode/demo1/Controller/ControllerC.cpp | 447 +++++++++++++++++++++++++++++ 1 file changed, 447 insertions(+) create mode 100755 quellcode/demo1/Controller/ControllerC.cpp (limited to 'quellcode/demo1/Controller/ControllerC.cpp') diff --git a/quellcode/demo1/Controller/ControllerC.cpp b/quellcode/demo1/Controller/ControllerC.cpp new file mode 100755 index 0000000..9a7130f --- /dev/null +++ b/quellcode/demo1/Controller/ControllerC.cpp @@ -0,0 +1,447 @@ +// -*- 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 "ControllerC.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/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/AnyTypeCode/Any.h" +#include "tao/AnyTypeCode/Any_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "ace/OS_NS_string.h" + +#if !defined (__ACE_INLINE__) +#include "ControllerC.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 Controller::Display. + +Controller::Display_ptr +TAO::Objref_Traits::duplicate ( + Controller::Display_ptr p + ) +{ + return Controller::Display::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + Controller::Display_ptr p + ) +{ + CORBA::release (p); +} + +Controller::Display_ptr +TAO::Objref_Traits::nil (void) +{ + return Controller::Display::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::marshal ( + const Controller::Display_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*Controller__TAO_Display_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Controller::Display::show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Display_Proxy_Broker_ == 0) + { + Controller_Display_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Char *>::in_arg_val _tao_txt (txt); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_txt + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 2, + "show", + 4, + this->the_TAO_Display_Proxy_Broker_ + ); + + _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +Controller::Display::Display (void) + : the_TAO_Display_Proxy_Broker_ (0) +{ + this->Controller_Display_setup_collocation (); +} + +void +Controller::Display::Controller_Display_setup_collocation () +{ + if (::Controller__TAO_Display_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_Display_Proxy_Broker_ = + ::Controller__TAO_Display_Proxy_Broker_Factory_function_pointer (this); + } +} + +Controller::Display::~Display (void) +{} + +void +Controller::Display::_tao_any_destructor (void *_tao_void_pointer) +{ + Display *_tao_tmp_pointer = + static_cast (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +Controller::Display_ptr +Controller::Display::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils::narrow ( + _tao_objref, + "IDL:manut/Controller/Display:1.0", + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Controller::Display_ptr +Controller::Display::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils::unchecked_narrow ( + _tao_objref, + "IDL:manut/Controller/Display:1.0", + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Controller::Display_ptr +Controller::Display::_duplicate (Display_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +Controller::Display::_tao_release (Display_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +Controller::Display::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:manut/Controller/Display: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* Controller::Display::_interface_repository_id (void) const +{ + return "IDL:manut/Controller/Display:1.0"; +} + +::CORBA::Boolean +Controller::Display::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_Controller_Display ( + ::CORBA::tk_objref, + "IDL:manut/Controller/Display:1.0", + "Display"); + +namespace Controller +{ + ::CORBA::TypeCode_ptr const _tc_Display = + &_tao_tc_Controller_Display; +} + + + +// 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 Controller +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Display_ptr _tao_elem + ) + { + Display_ptr _tao_objptr = + Display::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Display_ptr *_tao_elem + ) + { + TAO::Any_Impl_T::insert ( + _tao_any, + Display::_tao_any_destructor, + _tc_Display, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + Display_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T::extract ( + _tao_any, + Display::_tao_any_destructor, + _tc_Display, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + Controller::Display_ptr _tao_elem + ) +{ + Controller::Display_ptr _tao_objptr = + Controller::Display::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + Controller::Display_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T::insert ( + _tao_any, + Controller::Display::_tao_any_destructor, + Controller::_tc_Display, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + Controller::Display_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T::extract ( + _tao_any, + Controller::Display::_tao_any_destructor, + Controller::_tc_Display, + _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 Controller::Display_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + Controller::Display_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::Controller::Display RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils::unchecked_narrow ( + obj.in (), + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + -- cgit v1.2.3