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/AssemblyInfo.cs | 32 + quellcode/demo1/Controller/Controller.idl | 6 + quellcode/demo1/Controller/Controller.mdp | 42 + quellcode/demo1/Controller/Controller.mds | 16 + quellcode/demo1/Controller/Controller.pidb | Bin 0 -> 8313 bytes quellcode/demo1/Controller/Controller.userprefs | 43 + quellcode/demo1/Controller/ControllerC.cpp | 447 ++++++++++ quellcode/demo1/Controller/ControllerC.h | 294 +++++++ quellcode/demo1/Controller/ControllerC.inl | 64 ++ quellcode/demo1/Controller/ControllerS.cpp | 803 ++++++++++++++++++ quellcode/demo1/Controller/ControllerS.h | 159 ++++ quellcode/demo1/Controller/ControllerS.inl | 28 + quellcode/demo1/Controller/ControllerS_T.cpp | 41 + quellcode/demo1/Controller/ControllerS_T.h | 118 +++ quellcode/demo1/Controller/ControllerS_T.inl | 136 +++ quellcode/demo1/Controller/CorbaHandler.cs | 84 ++ quellcode/demo1/Controller/Display.cs | 15 + quellcode/demo1/Controller/Display.dll | Bin 0 -> 2048 bytes quellcode/demo1/Controller/Executor.dll | Bin 0 -> 2048 bytes quellcode/demo1/Controller/Main.cs | 17 + quellcode/demo1/Controller/MainWindow.cs | 56 ++ .../demo1/Controller/bin/Debug/Controller.exe | Bin 0 -> 24064 bytes .../demo1/Controller/bin/Debug/Controller.exe.mdb | Bin 0 -> 5925 bytes quellcode/demo1/Controller/bin/Debug/Display.dll | Bin 0 -> 2048 bytes quellcode/demo1/Controller/bin/Debug/Executor.dll | Bin 0 -> 2048 bytes .../demo1/Controller/bin/Debug/IIOPChannel.dll | Bin 0 -> 325632 bytes .../demo1/Controller/bin/Release/Controller.exe | Bin 0 -> 23552 bytes quellcode/demo1/Controller/bin/Release/Display.dll | Bin 0 -> 2048 bytes .../demo1/Controller/bin/Release/Executor.dll | Bin 0 -> 2048 bytes .../demo1/Controller/bin/Release/IIOPChannel.dll | Bin 0 -> 325632 bytes quellcode/demo1/Controller/gtk-gui/generated.cs | 257 ++++++ quellcode/demo1/Controller/gtk-gui/gui.stetic | 244 ++++++ quellcode/demo1/Executor/.depend.Executor | 0 quellcode/demo1/Executor/.depend.Executor_Executor | 0 quellcode/demo1/Executor/.depend.Executor_Receiver | 0 quellcode/demo1/Executor/Executor | Bin 0 -> 745856 bytes quellcode/demo1/Executor/Executor.cpp | 53 ++ quellcode/demo1/Executor/Executor.idl | 7 + quellcode/demo1/Executor/Executor.mpc | 9 + quellcode/demo1/Executor/ExecutorC.cpp | 500 +++++++++++ quellcode/demo1/Executor/ExecutorC.h | 312 +++++++ quellcode/demo1/Executor/ExecutorC.inl | 64 ++ quellcode/demo1/Executor/ExecutorS.cpp | 925 +++++++++++++++++++++ quellcode/demo1/Executor/ExecutorS.h | 182 ++++ quellcode/demo1/Executor/ExecutorS.inl | 28 + quellcode/demo1/Executor/ExecutorS_T.cpp | 41 + quellcode/demo1/Executor/ExecutorS_T.h | 133 +++ quellcode/demo1/Executor/ExecutorS_T.inl | 160 ++++ quellcode/demo1/Executor/Executor_i.cpp | 146 ++++ quellcode/demo1/Executor/Executor_i.h | 77 ++ quellcode/demo1/Executor/GNUmakefile.Executor | 227 +++++ quellcode/demo1/Receiver/.depend.Receiver_Receiver | 0 quellcode/demo1/Receiver/GNUmakefile.Receiver | 226 +++++ quellcode/demo1/Receiver/Receiver | Bin 0 -> 545814 bytes quellcode/demo1/Receiver/Receiver.cpp | 67 ++ quellcode/demo1/Receiver/Receiver.idl | 10 + quellcode/demo1/Receiver/Receiver.mpc | 8 + quellcode/demo1/Receiver/ReceiverC.cpp | 767 +++++++++++++++++ quellcode/demo1/Receiver/ReceiverC.h | 363 ++++++++ quellcode/demo1/Receiver/ReceiverC.inl | 63 ++ quellcode/demo1/Receiver/ReceiverS.cpp | 852 +++++++++++++++++++ quellcode/demo1/Receiver/ReceiverS.h | 209 +++++ quellcode/demo1/Receiver/ReceiverS.inl | 27 + quellcode/demo1/Receiver/ReceiverS_T.cpp | 41 + quellcode/demo1/Receiver/ReceiverS_T.h | 155 ++++ quellcode/demo1/Receiver/ReceiverS_T.inl | 177 ++++ quellcode/demo1/Receiver/Receiver_i.cpp | 92 ++ quellcode/demo1/Receiver/Receiver_i.h | 89 ++ quellcode/demo1/Receiver/cpx.cpp | 85 ++ quellcode/demo1/Receiver/cpx.h | 73 ++ 70 files changed, 9070 insertions(+) create mode 100755 quellcode/demo1/Controller/AssemblyInfo.cs create mode 100755 quellcode/demo1/Controller/Controller.idl create mode 100755 quellcode/demo1/Controller/Controller.mdp create mode 100755 quellcode/demo1/Controller/Controller.mds create mode 100755 quellcode/demo1/Controller/Controller.pidb create mode 100755 quellcode/demo1/Controller/Controller.userprefs create mode 100755 quellcode/demo1/Controller/ControllerC.cpp create mode 100755 quellcode/demo1/Controller/ControllerC.h create mode 100755 quellcode/demo1/Controller/ControllerC.inl create mode 100755 quellcode/demo1/Controller/ControllerS.cpp create mode 100755 quellcode/demo1/Controller/ControllerS.h create mode 100755 quellcode/demo1/Controller/ControllerS.inl create mode 100755 quellcode/demo1/Controller/ControllerS_T.cpp create mode 100755 quellcode/demo1/Controller/ControllerS_T.h create mode 100755 quellcode/demo1/Controller/ControllerS_T.inl create mode 100755 quellcode/demo1/Controller/CorbaHandler.cs create mode 100755 quellcode/demo1/Controller/Display.cs create mode 100755 quellcode/demo1/Controller/Display.dll create mode 100755 quellcode/demo1/Controller/Executor.dll create mode 100755 quellcode/demo1/Controller/Main.cs create mode 100755 quellcode/demo1/Controller/MainWindow.cs create mode 100755 quellcode/demo1/Controller/bin/Debug/Controller.exe create mode 100755 quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb create mode 100755 quellcode/demo1/Controller/bin/Debug/Display.dll create mode 100755 quellcode/demo1/Controller/bin/Debug/Executor.dll create mode 100755 quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll create mode 100755 quellcode/demo1/Controller/bin/Release/Controller.exe create mode 100755 quellcode/demo1/Controller/bin/Release/Display.dll create mode 100755 quellcode/demo1/Controller/bin/Release/Executor.dll create mode 100755 quellcode/demo1/Controller/bin/Release/IIOPChannel.dll create mode 100755 quellcode/demo1/Controller/gtk-gui/generated.cs create mode 100755 quellcode/demo1/Controller/gtk-gui/gui.stetic create mode 100755 quellcode/demo1/Executor/.depend.Executor create mode 100755 quellcode/demo1/Executor/.depend.Executor_Executor create mode 100755 quellcode/demo1/Executor/.depend.Executor_Receiver create mode 100755 quellcode/demo1/Executor/Executor create mode 100755 quellcode/demo1/Executor/Executor.cpp create mode 100755 quellcode/demo1/Executor/Executor.idl create mode 100755 quellcode/demo1/Executor/Executor.mpc create mode 100755 quellcode/demo1/Executor/ExecutorC.cpp create mode 100755 quellcode/demo1/Executor/ExecutorC.h create mode 100755 quellcode/demo1/Executor/ExecutorC.inl create mode 100755 quellcode/demo1/Executor/ExecutorS.cpp create mode 100755 quellcode/demo1/Executor/ExecutorS.h create mode 100755 quellcode/demo1/Executor/ExecutorS.inl create mode 100755 quellcode/demo1/Executor/ExecutorS_T.cpp create mode 100755 quellcode/demo1/Executor/ExecutorS_T.h create mode 100755 quellcode/demo1/Executor/ExecutorS_T.inl create mode 100755 quellcode/demo1/Executor/Executor_i.cpp create mode 100755 quellcode/demo1/Executor/Executor_i.h create mode 100755 quellcode/demo1/Executor/GNUmakefile.Executor create mode 100755 quellcode/demo1/Receiver/.depend.Receiver_Receiver create mode 100755 quellcode/demo1/Receiver/GNUmakefile.Receiver create mode 100755 quellcode/demo1/Receiver/Receiver create mode 100755 quellcode/demo1/Receiver/Receiver.cpp create mode 100755 quellcode/demo1/Receiver/Receiver.idl create mode 100755 quellcode/demo1/Receiver/Receiver.mpc create mode 100755 quellcode/demo1/Receiver/ReceiverC.cpp create mode 100755 quellcode/demo1/Receiver/ReceiverC.h create mode 100755 quellcode/demo1/Receiver/ReceiverC.inl create mode 100755 quellcode/demo1/Receiver/ReceiverS.cpp create mode 100755 quellcode/demo1/Receiver/ReceiverS.h create mode 100755 quellcode/demo1/Receiver/ReceiverS.inl create mode 100755 quellcode/demo1/Receiver/ReceiverS_T.cpp create mode 100755 quellcode/demo1/Receiver/ReceiverS_T.h create mode 100755 quellcode/demo1/Receiver/ReceiverS_T.inl create mode 100755 quellcode/demo1/Receiver/Receiver_i.cpp create mode 100755 quellcode/demo1/Receiver/Receiver_i.h create mode 100755 quellcode/demo1/Receiver/cpx.cpp create mode 100755 quellcode/demo1/Receiver/cpx.h (limited to 'quellcode/demo1') diff --git a/quellcode/demo1/Controller/AssemblyInfo.cs b/quellcode/demo1/Controller/AssemblyInfo.cs new file mode 100755 index 0000000..af4e275 --- /dev/null +++ b/quellcode/demo1/Controller/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes specify the key for the sign of your assembly. See the +// .NET Framework documentation for more information about signing. +// This is not required, if you don't want signing let these attributes like they're. +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] diff --git a/quellcode/demo1/Controller/Controller.idl b/quellcode/demo1/Controller/Controller.idl new file mode 100755 index 0000000..7c969ac --- /dev/null +++ b/quellcode/demo1/Controller/Controller.idl @@ -0,0 +1,6 @@ +#pragma prefix "manut" +module Controller { + interface Display { + void show(in string txt); + }; +}; diff --git a/quellcode/demo1/Controller/Controller.mdp b/quellcode/demo1/Controller/Controller.mdp new file mode 100755 index 0000000..f20af86 --- /dev/null +++ b/quellcode/demo1/Controller/Controller.mdp @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quellcode/demo1/Controller/Controller.mds b/quellcode/demo1/Controller/Controller.mds new file mode 100755 index 0000000..13122ec --- /dev/null +++ b/quellcode/demo1/Controller/Controller.mds @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quellcode/demo1/Controller/Controller.pidb b/quellcode/demo1/Controller/Controller.pidb new file mode 100755 index 0000000..5beb119 Binary files /dev/null and b/quellcode/demo1/Controller/Controller.pidb differ diff --git a/quellcode/demo1/Controller/Controller.userprefs b/quellcode/demo1/Controller/Controller.userprefs new file mode 100755 index 0000000..eaf27b2 --- /dev/null +++ b/quellcode/demo1/Controller/Controller.userprefs @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file 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 + + + diff --git a/quellcode/demo1/Controller/ControllerC.h b/quellcode/demo1/Controller/ControllerC.h new file mode 100755 index 0000000..cc6b69b --- /dev/null +++ b/quellcode/demo1/Controller/ControllerC.h @@ -0,0 +1,294 @@ +// -*- 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:155 + +#ifndef _TAO_IDL_CONTROLLERC_H_ +#define _TAO_IDL_CONTROLLERC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/AnyTypeCode/AnyTypeCode_methods.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" +#include "tao/Versioned_Namespace.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + class Collocation_Proxy_Broker; + template class Narrow_Utils; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:49 + +namespace Controller +{ + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_CONTROLLER_DISPLAY__VAR_OUT_CH_) +#define _CONTROLLER_DISPLAY__VAR_OUT_CH_ + + class Display; + typedef Display *Display_ptr; + + typedef + TAO_Objref_Var_T< + Display + > + Display_var; + + typedef + TAO_Objref_Out_T< + Display + > + Display_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_CONTROLLER_DISPLAY_CH_) +#define _CONTROLLER_DISPLAY_CH_ + + class Display + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils; + typedef Display_ptr _ptr_type; + typedef Display_var _var_type; + + // The static operations. + static Display_ptr _duplicate (Display_ptr obj); + + static void _tao_release (Display_ptr obj); + + static Display_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Display_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Display_ptr _nil (void) + { + return static_cast (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_Display_Proxy_Broker_; + + protected: + // Concrete interface only. + Display (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void Controller_Display_setup_collocation (void); + + // Concrete non-local interface only. + Display ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + Display ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~Display (void); + + private: + // Private and unimplemented for concrete interfaces. + Display (const Display &); + + void operator= (const Display &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_Display; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:78 + +} // module Controller + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:139 + +extern +TAO::Collocation_Proxy_Broker * +(*Controller__TAO_Display_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Traits specializations. +namespace TAO +{ + +#if !defined (_CONTROLLER_DISPLAY__TRAITS_) +#define _CONTROLLER_DISPLAY__TRAITS_ + + template<> + struct Objref_Traits< ::Controller::Display> + { + static ::Controller::Display_ptr duplicate ( + ::Controller::Display_ptr + ); + static void release ( + ::Controller::Display_ptr + ); + static ::Controller::Display_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::Controller::Display_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace Controller +{ + void operator<<= ( ::CORBA::Any &, Display_ptr); // copying + void operator<<= ( ::CORBA::Any &, Display_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Display_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, Controller::Display_ptr); // copying + void operator<<= (::CORBA::Any &, Controller::Display_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Controller::Display_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const Controller::Display_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, Controller::Display_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1093 +#if defined (__ACE_INLINE__) +#include "ControllerC.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + + diff --git a/quellcode/demo1/Controller/ControllerC.inl b/quellcode/demo1/Controller/ControllerC.inl new file mode 100755 index 0000000..4cd6cfa --- /dev/null +++ b/quellcode/demo1/Controller/ControllerC.inl @@ -0,0 +1,64 @@ +// -*- 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_visitor_interface/interface_ci.cpp:70 + +#if !defined (_CONTROLLER_DISPLAY___CI_) +#define _CONTROLLER_DISPLAY___CI_ + +ACE_INLINE +Controller::Display::Display ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_Display_Proxy_Broker_ (0) +{ + this->Controller_Display_setup_collocation (); +} + +ACE_INLINE +Controller::Display::Display ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_Display_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + diff --git a/quellcode/demo1/Controller/ControllerS.cpp b/quellcode/demo1/Controller/ControllerS.cpp new file mode 100755 index 0000000..0438c9e --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS.cpp @@ -0,0 +1,803 @@ +// -*- 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:577 + +#ifndef _TAO_IDL_CONTROLLERS_CPP_ +#define _TAO_IDL_CONTROLLERS_CPP_ + + +#include "ControllerS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/TypeCode.h" +#include "tao/AnyTypeCode/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if !defined (__ACE_INLINE__) +#include "ControllerS.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_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_interface.cpp:1511 + +class TAO_Controller_Display_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /opt/ACE_wrappers/1.5/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_Controller_Display_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_Controller_Display_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 0, 5, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 16, + 0, 5, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 0, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_Controller_Display_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 6, + MIN_WORD_LENGTH = 4, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 4, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 12, + DUPLICATES = 0, + WORDLIST_SIZE = 10 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"show", &POA_Controller::Display::show_skel, 0}, + {"_is_a", &POA_Controller::Display::_is_a_skel, 0}, + {"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_component", &POA_Controller::Display::_component_skel, 0}, + {"",0,0},{"",0,0}, + {"_non_existent", &POA_Controller::Display::_non_existent_skel, 0}, + {"_repository_id", &POA_Controller::Display::_repository_id_skel, 0}, + {"_interface", &POA_Controller::Display::_interface_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_Controller_Display_Perfect_Hash_OpTable tao_Controller_Display_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +Controller__TAO_Display_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast (0xdead); // Dummy +} + +int +Controller__TAO_Display_Proxy_Broker_Factory_Initializer (size_t) +{ + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer = + Controller__TAO_Display_Proxy_Broker_Factory_function; + + return 0; +} + +static int +Controller__TAO_Display_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + Controller__TAO_Display_Proxy_Broker_Factory_Initializer ( + reinterpret_cast (Controller__TAO_Display_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_Controller::Display::Display (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_Controller_Display_optable; +} + +POA_Controller::Display::Display (const Display& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_Controller::Display::~Display (void) +{ +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class show_Display + : public TAO::Upcall_Command + { + public: + inline show_Display ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + this->servant_->show ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_Controller::Display::show_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_txt; + + TAO::Argument * const args[] = + { + &retval, + &_tao_txt + }; + + static size_t const nargs = 2; + + POA_Controller::Display * const impl = + static_cast (servant); + + show_Display command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_Controller::Display * const impl = + static_cast (servant); + + _is_a_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Controller::Display * const impl = + static_cast (servant); + + _non_existent_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Controller::Display * const impl = + static_cast (servant); + + _repository_id_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_Controller::Display::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_Controller::Display * const impl = + static_cast (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Controller::Display * const impl = + static_cast (servant); + + _get_component_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_Controller::Display::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:manut/Controller/Display:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_Controller::Display::_interface_repository_id (void) const +{ + return "IDL:manut/Controller/Display:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_Controller::Display::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +Controller::Display * +POA_Controller::Display::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::Controller::Display STUB_SCOPED_NAME; + return + TAO::Narrow_Utils::unchecked_narrow ( + obj.in (), + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Controller/ControllerS.h b/quellcode/demo1/Controller/ControllerS.h new file mode 100755 index 0000000..ae39d58 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS.h @@ -0,0 +1,159 @@ +// -*- 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:387 + +#ifndef _TAO_IDL_CONTROLLERS_H_ +#define _TAO_IDL_CONTROLLERS_H_ + + +#include "ControllerC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class Display; + typedef Display *Display_ptr; + + class Display + : public virtual PortableServer::ServantBase + { + protected: + Display (void); + + public: + // Useful for template programming. + typedef ::Controller::Display _stub_type; + typedef ::Controller::Display_ptr _stub_ptr_type; + typedef ::Controller::Display_var _stub_var_type; + + Display (const Display& rhs); + virtual ~Display (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::Controller::Display *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) = 0; + + static void show_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module Controller + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1148 + +#include "ControllerS_T.h" + +#if defined (__ACE_INLINE__) +#include "ControllerS.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Controller/ControllerS.inl b/quellcode/demo1/Controller/ControllerS.inl new file mode 100755 index 0000000..38aa325 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS.inl @@ -0,0 +1,28 @@ +// -*- 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 + + diff --git a/quellcode/demo1/Controller/ControllerS_T.cpp b/quellcode/demo1/Controller/ControllerS_T.cpp new file mode 100755 index 0000000..2a258cf --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS_T.cpp @@ -0,0 +1,41 @@ +// -*- 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:656 + +#ifndef _TAO_IDL_CONTROLLERS_T_CPP_ +#define _TAO_IDL_CONTROLLERS_T_CPP_ + +#include "ControllerS_T.h" + +#if !defined (__ACE_INLINE__) +#include "ControllerS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/demo1/Controller/ControllerS_T.h b/quellcode/demo1/Controller/ControllerS_T.h new file mode 100755 index 0000000..d9bc663 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS_T.h @@ -0,0 +1,118 @@ +// -*- 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:520 + +#ifndef _TAO_IDL_CONTROLLERS_T_H_ +#define _TAO_IDL_CONTROLLERS_T_H_ + + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_Controller +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template + class Display_tie : public Display + { + public: + Display_tie (T &t); + // the T& ctor + Display_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + Display_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + Display_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~Display_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + Display_tie (const Display_tie &); + void operator= (const Display_tie &); + }; +} // module Controller + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1251 +#if defined (__ACE_INLINE__) +#include "ControllerS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ControllerS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("ControllerS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Controller/ControllerS_T.inl b/quellcode/demo1/Controller/ControllerS_T.inl new file mode 100755 index 0000000..1c962a4 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS_T.inl @@ -0,0 +1,136 @@ +// -*- 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_visitor_interface/tie_si.cpp:96 + +template ACE_INLINE +POA_Controller::Display_tie::Display_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_Controller::Display_tie::Display_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_Controller::Display_tie::Display_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_Controller::Display_tie::Display_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_Controller::Display_tie::~Display_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_Controller::Display_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_Controller::Display_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_Controller::Display_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_Controller::Display_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_Controller::Display_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_Controller::Display_tie::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->Display::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +void POA_Controller::Display_tie::show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + this->ptr_->show ( + txt + ); +} diff --git a/quellcode/demo1/Controller/CorbaHandler.cs b/quellcode/demo1/Controller/CorbaHandler.cs new file mode 100755 index 0000000..e705b7f --- /dev/null +++ b/quellcode/demo1/Controller/CorbaHandler.cs @@ -0,0 +1,84 @@ +using System; +using System.IO; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Channels; +// from IIOPChannel.dll +using Ch.Elca.Iiop; +using Ch.Elca.Iiop.Services; +using omg.org.CosNaming; +// from ExecutorI.dll +using manut.Executor; +namespace manut.Executor { + public class CorbaHandler { + // remote object + private manut.Executor.ExecCmd servant; + private IiopChannel chan2; + private CorbaInit init2; + private MainWindow window; + private string host; + private int port; + public CorbaHandler() { + host = "192.168.0.253"; + port = 2809; + connect(); + } + public CorbaHandler(string _host, int _port, MainWindow _window) { + host = _host; + port = _port; + window = _window; + } + public void serve(){ + try { + // Host Servant + chan2 = new IiopChannel(0); + ChannelServices.RegisterChannel(chan2); + init2 = CorbaInit.GetInit(); + NamingContext nameService2 = init2.GetNameService(host, port); + NameComponent[] moduleName2 = new NameComponent[] {new NameComponent("manut.Controller", "")}; + NamingContext nameSpace2 = (NamingContext)nameService2.bind_new_context(moduleName2); + NameComponent[] interfaceName2 = new NameComponent[] {new NameComponent("Disp", "")}; + manut.Controller.Disp interfaceImpl = new manut.Controller.Disp(window); + Console.WriteLine("4"); + nameSpace2.bind(interfaceName2, interfaceImpl); + Console.WriteLine("DisplayServer ready"); + } catch (Exception e) { + Console.WriteLine(e); + } + } + public void connect() { + try{ + // Connect to Executer + // Access the COS naming service (NameService)... + NamingContext nameService = init2.GetNameService(host, port); + // Access the IDL-defined module + // (which maps to a .Net namespace)... + NameComponent[] moduleName = new NameComponent[] {new NameComponent("Executor", "")}; + NamingContext nameSpace = (NamingContext)nameService.resolve(moduleName); + Console.Write("Executor ok, "); + // Access the IDL-defined interface + // (which maps to a .NET interface class) + NameComponent[] interfaceName = new NameComponent[] {new NameComponent("ExecCmd", "")}; + this.servant = (manut.Executor.ExecCmd)nameSpace.resolve(interfaceName); + Console.Write("ExecCmd ok\n\nTesting... "); + this.servant.changeMode(2); + Console.Write("ok\n\n"); + } catch (Exception e) { + Console.WriteLine(e); + } + } + public bool setPorts(short one, short two, short three) { + return this.servant.setPorts(one, two, three); + } + public bool setMode(short mode) { + try { + return this.servant.changeMode(mode); + } catch(Exception e) { + Console.WriteLine("setMode Exception: "+e); + return false; + } + } + public void display(string txt) { + window.display(txt); + } + } +} diff --git a/quellcode/demo1/Controller/Display.cs b/quellcode/demo1/Controller/Display.cs new file mode 100755 index 0000000..723caaf --- /dev/null +++ b/quellcode/demo1/Controller/Display.cs @@ -0,0 +1,15 @@ +using System; +namespace manut.Controller { + public class Disp: MarshalByRefObject, manut.Controller.Display { + private MainWindow window; + public Disp(MainWindow _window) { + window = _window; + } + public override object InitializeLifetimeService() { + return null; + } + public void show(string txt) { + window.display(txt); + } + } +} diff --git a/quellcode/demo1/Controller/Display.dll b/quellcode/demo1/Controller/Display.dll new file mode 100755 index 0000000..cd4fc7f Binary files /dev/null and b/quellcode/demo1/Controller/Display.dll differ diff --git a/quellcode/demo1/Controller/Executor.dll b/quellcode/demo1/Controller/Executor.dll new file mode 100755 index 0000000..23c2865 Binary files /dev/null and b/quellcode/demo1/Controller/Executor.dll differ diff --git a/quellcode/demo1/Controller/Main.cs b/quellcode/demo1/Controller/Main.cs new file mode 100755 index 0000000..b07e1ed --- /dev/null +++ b/quellcode/demo1/Controller/Main.cs @@ -0,0 +1,17 @@ +// project created on 12/15/2006 at 11:25 AM +using System; +using Gtk; + +namespace Controller +{ + class MainClass + { + public static void Main (string[] args) + { + Application.Init (); + MainWindow win = new MainWindow (); + win.Show (); + Application.Run (); + } + } +} \ No newline at end of file diff --git a/quellcode/demo1/Controller/MainWindow.cs b/quellcode/demo1/Controller/MainWindow.cs new file mode 100755 index 0000000..3aae87b --- /dev/null +++ b/quellcode/demo1/Controller/MainWindow.cs @@ -0,0 +1,56 @@ +using System; +using Gtk; +public class MainWindow: Gtk.Window { + // NameService (falls nichts in Feld eingetragen wird) + private string currentHost = "192.168.0.253"; + // selected Mode + private string selected = "uninitialized"; + // CORBAHandle ..CorbaHandler + private manut.Executor.CorbaHandler corba; + private int counter = 0; //0 =IP NS, sonst IP CORBA Server + public MainWindow (): base ("") { + Stetic.Gui.Build (this, typeof(MainWindow)); + } + // set info text + public void display(string txt) { + labelCurrent.Text = txt; + } + // window closed + protected void OnDeleteEvent (object sender, DeleteEventArgs a) { + Application.Quit (); + a.RetVal = true; + } + // submit new mode to executor + protected virtual void OnButtonSubmitClicked(object sender, System.EventArgs e){ + if(selected =="Move") corba.setMode(1); + else if (selected == "Blink") corba.setMode(2); + else if (selected == "Flash") corba.setMode(3); + else Console.WriteLine("unallowed selection"); + Console.WriteLine("Sent: "+selected); + } + + protected virtual void OnButtonConnectClicked(object sender, System.EventArgs e){ + if(counter == 0){ // Register Display Object at NS + Console.Write("connecting to: "+currentHost); + corba = new manut.Executor.CorbaHandler(currentHost, 2809, this); + // host display object + corba.serve(); + counter++; + } else { // Connect to ExecCmd Interface + Console.WriteLine("connecting to: "+currentHost); + corba.connect(); + } + } + // new mode selected + protected virtual void OnComboboxModeChanged(object sender, System.EventArgs e) { + selected = ((ComboBox)sender).ActiveText; + Console.WriteLine("Selected: "+ selected); + labelCurrent.Text = selected; + } + // new host entered + protected virtual void OnEntryHostChanged(object sender, System.EventArgs e) { + currentHost = ((Entry)sender).Text; + } + [Glade.Widget] + private Label labelCurrent; +} diff --git a/quellcode/demo1/Controller/bin/Debug/Controller.exe b/quellcode/demo1/Controller/bin/Debug/Controller.exe new file mode 100755 index 0000000..5aad293 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Controller.exe differ diff --git a/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb b/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb new file mode 100755 index 0000000..07beef0 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb differ diff --git a/quellcode/demo1/Controller/bin/Debug/Display.dll b/quellcode/demo1/Controller/bin/Debug/Display.dll new file mode 100755 index 0000000..cd4fc7f Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Display.dll differ diff --git a/quellcode/demo1/Controller/bin/Debug/Executor.dll b/quellcode/demo1/Controller/bin/Debug/Executor.dll new file mode 100755 index 0000000..23c2865 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Executor.dll differ diff --git a/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll b/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll new file mode 100755 index 0000000..0420e23 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll differ diff --git a/quellcode/demo1/Controller/bin/Release/Controller.exe b/quellcode/demo1/Controller/bin/Release/Controller.exe new file mode 100755 index 0000000..aaf65ff Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/Controller.exe differ diff --git a/quellcode/demo1/Controller/bin/Release/Display.dll b/quellcode/demo1/Controller/bin/Release/Display.dll new file mode 100755 index 0000000..efdfd74 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/Display.dll differ diff --git a/quellcode/demo1/Controller/bin/Release/Executor.dll b/quellcode/demo1/Controller/bin/Release/Executor.dll new file mode 100755 index 0000000..c380706 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/Executor.dll differ diff --git a/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll b/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll new file mode 100755 index 0000000..0420e23 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll differ diff --git a/quellcode/demo1/Controller/gtk-gui/generated.cs b/quellcode/demo1/Controller/gtk-gui/generated.cs new file mode 100755 index 0000000..3117c51 --- /dev/null +++ b/quellcode/demo1/Controller/gtk-gui/generated.cs @@ -0,0 +1,257 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Mono Runtime Version: 1.1.4322.2032 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Stetic { + + class Gui { + + public static void Build(object obj, System.Type type) { + Stetic.Gui.Build(obj, type.FullName); + } + + public static void Build(object obj, string id) { + System.Collections.Hashtable widgets = new System.Collections.Hashtable(); + if ((id == "MainWindow")) { + Gtk.Window cobj = ((Gtk.Window)(obj)); + // Widget MainWindow + cobj.Title = "Controller"; + cobj.WindowPosition = ((Gtk.WindowPosition)(4)); + cobj.Events = ((Gdk.EventMask)(0)); + cobj.Name = "MainWindow"; + // Container child MainWindow.Gtk.Container+ContainerChild + Gtk.VBox w1 = new Gtk.VBox(); + w1.Events = ((Gdk.EventMask)(0)); + w1.Name = "vbox1"; + // Container child vbox1.Gtk.Box+BoxChild + Gtk.Frame w2 = new Gtk.Frame(); + w2.ShadowType = ((Gtk.ShadowType)(0)); + w2.LabelXalign = 0F; + w2.Events = ((Gdk.EventMask)(0)); + w2.Name = "frameHost"; + // Container child frameHost.Gtk.Container+ContainerChild + Gtk.Alignment w3 = new Gtk.Alignment(0F, 0F, 1F, 1F); + w3.LeftPadding = ((System.UInt32)(12)); + w3.Events = ((Gdk.EventMask)(0)); + w3.Name = "GtkAlignment"; + // Container child GtkAlignment.Gtk.Container+ContainerChild + Gtk.HBox w4 = new Gtk.HBox(); + w4.Events = ((Gdk.EventMask)(0)); + w4.Name = "hbox1"; + // Container child hbox1.Gtk.Box+BoxChild + Gtk.Label w5 = new Gtk.Label(); + w5.LabelProp = "Host: "; + w5.Xalign = 0F; + w5.Events = ((Gdk.EventMask)(0)); + w5.Name = "labelHost"; + widgets["labelHost"] = w5; + w4.Add(w5); + Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w4[w5])); + w6.Position = 0; + w6.Expand = false; + w6.Fill = false; + w6.Padding = ((System.UInt32)(5)); + // Container child hbox1.Gtk.Box+BoxChild + Gtk.Entry w7 = new Gtk.Entry(); + w7.Editable = true; + w7.InvisibleChar = '•'; + w7.CanFocus = true; + w7.Events = ((Gdk.EventMask)(0)); + w7.Name = "entryHost"; + widgets["entryHost"] = w7; + w4.Add(w7); + Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w4[w7])); + w8.Position = 1; + // Container child hbox1.Gtk.Box+BoxChild + Gtk.Button w9 = new Gtk.Button(); + w9.CanFocus = true; + w9.Events = ((Gdk.EventMask)(0)); + w9.Name = "buttonConnect"; + w9.Label = "Connect"; + widgets["buttonConnect"] = w9; + w4.Add(w9); + Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w4[w9])); + w10.Position = 2; + w10.Expand = false; + w10.Fill = false; + w10.Padding = ((System.UInt32)(3)); + widgets["hbox1"] = w4; + w3.Add(w4); + widgets["GtkAlignment"] = w3; + w2.Add(w3); + Gtk.Label w13 = new Gtk.Label(); + w13.LabelProp = "Connection"; + w13.UseMarkup = true; + w13.Events = ((Gdk.EventMask)(256)); + w13.Name = "GtkLabel1"; + widgets["GtkLabel1"] = w13; + w2.LabelWidget = w13; + widgets["frameHost"] = w2; + w1.Add(w2); + Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(w1[w2])); + w14.Position = 0; + w14.Expand = false; + w14.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + Gtk.Frame w15 = new Gtk.Frame(); + w15.ShadowType = ((Gtk.ShadowType)(0)); + w15.LabelXalign = 0F; + w15.Events = ((Gdk.EventMask)(0)); + w15.Name = "frameSelect"; + // Container child frameSelect.Gtk.Container+ContainerChild + Gtk.Alignment w16 = new Gtk.Alignment(0F, 0F, 1F, 1F); + w16.LeftPadding = ((System.UInt32)(12)); + w16.Events = ((Gdk.EventMask)(0)); + w16.Name = "GtkAlignment1"; + // Container child GtkAlignment1.Gtk.Container+ContainerChild + Gtk.HBox w17 = new Gtk.HBox(); + w17.Events = ((Gdk.EventMask)(0)); + w17.Name = "hbox2"; + // Container child hbox2.Gtk.Box+BoxChild + Gtk.Label w18 = new Gtk.Label(); + w18.LabelProp = "Mode:"; + w18.Xalign = 0F; + w18.Events = ((Gdk.EventMask)(0)); + w18.Name = "labelMode"; + widgets["labelMode"] = w18; + w17.Add(w18); + Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(w17[w18])); + w19.Position = 0; + w19.Expand = false; + w19.Fill = false; + w19.Padding = ((System.UInt32)(5)); + // Container child hbox2.Gtk.Box+BoxChild + Gtk.ComboBox w20 = Gtk.ComboBox.NewText(); + w20.AppendText("Move"); + w20.AppendText("Blink"); + w20.AppendText("Flash"); + w20.Events = ((Gdk.EventMask)(0)); + w20.Name = "comboboxMode"; + widgets["comboboxMode"] = w20; + w17.Add(w20); + Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(w17[w20])); + w21.Position = 1; + w21.Padding = ((System.UInt32)(2)); + // Container child hbox2.Gtk.Box+BoxChild + Gtk.Button w22 = new Gtk.Button(); + w22.CanFocus = true; + w22.Events = ((Gdk.EventMask)(0)); + w22.Name = "buttonSubmit"; + w22.Label = "Submit "; + widgets["buttonSubmit"] = w22; + w17.Add(w22); + Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(w17[w22])); + w23.Position = 2; + w23.Expand = false; + w23.Fill = false; + w23.Padding = ((System.UInt32)(3)); + widgets["hbox2"] = w17; + w16.Add(w17); + widgets["GtkAlignment1"] = w16; + w15.Add(w16); + Gtk.Label w26 = new Gtk.Label(); + w26.LabelProp = "Select"; + w26.UseMarkup = true; + w26.Events = ((Gdk.EventMask)(256)); + w26.Name = "GtkLabelSelect"; + widgets["GtkLabelSelect"] = w26; + w15.LabelWidget = w26; + widgets["frameSelect"] = w15; + w1.Add(w15); + Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(w1[w15])); + w27.Position = 1; + w27.Expand = false; + w27.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + Gtk.Frame w28 = new Gtk.Frame(); + w28.ShadowType = ((Gtk.ShadowType)(0)); + w28.LabelXalign = 0F; + w28.Events = ((Gdk.EventMask)(0)); + w28.Name = "frameCurrent"; + // Container child frameCurrent.Gtk.Container+ContainerChild + Gtk.Alignment w29 = new Gtk.Alignment(0F, 0F, 1F, 1F); + w29.LeftPadding = ((System.UInt32)(12)); + w29.Events = ((Gdk.EventMask)(0)); + w29.Name = "GtkAlignment2"; + // Container child GtkAlignment2.Gtk.Container+ContainerChild + Gtk.HBox w30 = new Gtk.HBox(); + w30.Events = ((Gdk.EventMask)(0)); + w30.Name = "hbox3"; + // Container child hbox3.Gtk.Box+BoxChild + Gtk.Label w31 = new Gtk.Label(); + w31.LabelProp = "disconnected"; + w31.Events = ((Gdk.EventMask)(0)); + w31.Name = "labelCurrent"; + widgets["labelCurrent"] = w31; + w30.Add(w31); + Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(w30[w31])); + w32.Position = 0; + w32.Expand = false; + w32.Fill = false; + widgets["hbox3"] = w30; + w29.Add(w30); + widgets["GtkAlignment2"] = w29; + w28.Add(w29); + Gtk.Label w35 = new Gtk.Label(); + w35.LabelProp = "Status"; + w35.UseMarkup = true; + w35.Events = ((Gdk.EventMask)(256)); + w35.Name = "GtkLabelStatus"; + widgets["GtkLabelStatus"] = w35; + w28.LabelWidget = w35; + widgets["frameCurrent"] = w28; + w1.Add(w28); + Gtk.Box.BoxChild w36 = ((Gtk.Box.BoxChild)(w1[w28])); + w36.Position = 2; + w36.Expand = false; + w36.Fill = false; + widgets["vbox1"] = w1; + cobj.Add(w1); + cobj.DefaultWidth = 409; + cobj.DefaultHeight = 169; + widgets["MainWindow"] = cobj; + w5.Show(); + w7.Show(); + w9.Show(); + w4.Show(); + w3.Show(); + w13.Show(); + w2.Show(); + w18.Show(); + w20.Show(); + w22.Show(); + w17.Show(); + w16.Show(); + w26.Show(); + w15.Show(); + w31.Show(); + w30.Show(); + w29.Show(); + w35.Show(); + w28.Show(); + w1.Show(); + cobj.Show(); + cobj.DeleteEvent += ((Gtk.DeleteEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.DeleteEventHandler), cobj, "OnDeleteEvent"))); + w7.Changed += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnEntryHostChanged"))); + w9.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnButtonConnectClicked"))); + w20.Changed += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnComboboxModeChanged"))); + w22.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnButtonSubmitClicked"))); + } + System.Reflection.FieldInfo[] fields = obj.GetType().GetFields(((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) | System.Reflection.BindingFlags.Instance)); + for (int n = 0; (n < fields.Length); n = (n + 1)) { + System.Reflection.FieldInfo field = fields[n]; + object widget = widgets[field.Name]; + if (((widget != null) && field.FieldType.IsInstanceOfType(widget))) { + field.SetValue(obj, widget); + } + } + } + } + +} diff --git a/quellcode/demo1/Controller/gtk-gui/gui.stetic b/quellcode/demo1/Controller/gtk-gui/gui.stetic new file mode 100755 index 0000000..d816f05 --- /dev/null +++ b/quellcode/demo1/Controller/gtk-gui/gui.stetic @@ -0,0 +1,244 @@ + + + + Controller + CenterOnParent + True + 0 + + + + True + 0 + + + None + 0 + True + 0 + + + 0 + 0 + 12 + True + 0 + + + True + 0 + + + Host: + 0 + True + 0 + + + 0 + False + False + False + 5 + + + + + True + • + True + True + 0 + + + + 1 + False + + + + + TextOnly + Connect + False + True + True + 0 + + + + 2 + True + False + False + 3 + + + + + + + + + <b>Connection</b> + True + True + ButtonPressMask + + + label_item + + + + + 0 + True + False + False + + + + + None + 0 + True + 0 + + + 0 + 0 + 12 + True + 0 + + + True + 0 + + + Mode: + 0 + True + 0 + + + 0 + False + False + False + 5 + + + + + Move +Blink +Flash + True + 0 + + + + 1 + False + 2 + + + + + TextOnly + Submit + False + True + True + 0 + + + + 2 + True + False + False + 3 + + + + + + + + + <b>Select</b> + True + True + ButtonPressMask + + + label_item + + + + + 1 + True + False + False + + + + + None + 0 + True + 0 + + + 0 + 0 + 12 + True + 0 + + + True + 0 + + + |disconnected + True + 0 + + + 0 + True + False + False + + + + + + + + + <b>Status</b> + True + True + ButtonPressMask + + + label_item + + + + + 2 + True + False + False + + + + + + \ No newline at end of file diff --git a/quellcode/demo1/Executor/.depend.Executor b/quellcode/demo1/Executor/.depend.Executor new file mode 100755 index 0000000..e69de29 diff --git a/quellcode/demo1/Executor/.depend.Executor_Executor b/quellcode/demo1/Executor/.depend.Executor_Executor new file mode 100755 index 0000000..e69de29 diff --git a/quellcode/demo1/Executor/.depend.Executor_Receiver b/quellcode/demo1/Executor/.depend.Executor_Receiver new file mode 100755 index 0000000..e69de29 diff --git a/quellcode/demo1/Executor/Executor b/quellcode/demo1/Executor/Executor new file mode 100755 index 0000000..692bc9b Binary files /dev/null and b/quellcode/demo1/Executor/Executor differ diff --git a/quellcode/demo1/Executor/Executor.cpp b/quellcode/demo1/Executor/Executor.cpp new file mode 100755 index 0000000..2e43341 --- /dev/null +++ b/quellcode/demo1/Executor/Executor.cpp @@ -0,0 +1,53 @@ +#include +#include "Executor_i.h" +#include "orbsvcs/CosNamingC.h" +#include +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ExecutorORB"); + std::cout<<"ORB ok"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::minPriority); + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("executorPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Executor"); + namingContext->bind_new_context(name); + std::cout<<"Bound Executor to NameService"<activate_object(&servant); + CORBA::Object_var servantObj = benchPOA->id_to_reference(oid.in()); + namingContext->rebind(name, servantObj.in()); + std::cout<<"servant activated\n"; + // start ORB + orb->run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<::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 + + + diff --git a/quellcode/demo1/Executor/ExecutorC.h b/quellcode/demo1/Executor/ExecutorC.h new file mode 100755 index 0000000..3b979d5 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorC.h @@ -0,0 +1,312 @@ +// -*- 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:155 + +#ifndef _TAO_IDL_EXECUTORC_H_ +#define _TAO_IDL_EXECUTORC_H_ + +#include /**/ "ace/pre.h" + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/AnyTypeCode/AnyTypeCode_methods.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" +#include "tao/Versioned_Namespace.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + class Collocation_Proxy_Broker; + template class Narrow_Utils; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:49 + +namespace Executor +{ + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_EXECUTOR_EXECCMD__VAR_OUT_CH_) +#define _EXECUTOR_EXECCMD__VAR_OUT_CH_ + + class ExecCmd; + typedef ExecCmd *ExecCmd_ptr; + + typedef + TAO_Objref_Var_T< + ExecCmd + > + ExecCmd_var; + + typedef + TAO_Objref_Out_T< + ExecCmd + > + ExecCmd_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_EXECUTOR_EXECCMD_CH_) +#define _EXECUTOR_EXECCMD_CH_ + + class ExecCmd + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils; + typedef ExecCmd_ptr _ptr_type; + typedef ExecCmd_var _var_type; + + // The static operations. + static ExecCmd_ptr _duplicate (ExecCmd_ptr obj); + + static void _tao_release (ExecCmd_ptr obj); + + static ExecCmd_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static ExecCmd_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static ExecCmd_ptr _nil (void) + { + return static_cast (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_ExecCmd_Proxy_Broker_; + + protected: + // Concrete interface only. + ExecCmd (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void Executor_ExecCmd_setup_collocation (void); + + // Concrete non-local interface only. + ExecCmd ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + ExecCmd ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~ExecCmd (void); + + private: + // Private and unimplemented for concrete interfaces. + ExecCmd (const ExecCmd &); + + void operator= (const ExecCmd &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_ExecCmd; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:78 + +} // module Executor + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:139 + +extern +TAO::Collocation_Proxy_Broker * +(*Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Traits specializations. +namespace TAO +{ + +#if !defined (_EXECUTOR_EXECCMD__TRAITS_) +#define _EXECUTOR_EXECCMD__TRAITS_ + + template<> + struct Objref_Traits< ::Executor::ExecCmd> + { + static ::Executor::ExecCmd_ptr duplicate ( + ::Executor::ExecCmd_ptr + ); + static void release ( + ::Executor::ExecCmd_ptr + ); + static ::Executor::ExecCmd_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::Executor::ExecCmd_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace Executor +{ + void operator<<= ( ::CORBA::Any &, ExecCmd_ptr); // copying + void operator<<= ( ::CORBA::Any &, ExecCmd_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, ExecCmd_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, Executor::ExecCmd_ptr); // copying + void operator<<= (::CORBA::Any &, Executor::ExecCmd_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Executor::ExecCmd_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const Executor::ExecCmd_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, Executor::ExecCmd_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1093 +#if defined (__ACE_INLINE__) +#include "ExecutorC.inl" +#endif /* defined INLINE */ + +#include /**/ "ace/post.h" + +#endif /* ifndef */ + + diff --git a/quellcode/demo1/Executor/ExecutorC.inl b/quellcode/demo1/Executor/ExecutorC.inl new file mode 100755 index 0000000..ef59fa6 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorC.inl @@ -0,0 +1,64 @@ +// -*- 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_visitor_interface/interface_ci.cpp:70 + +#if !defined (_EXECUTOR_EXECCMD___CI_) +#define _EXECUTOR_EXECCMD___CI_ + +ACE_INLINE +Executor::ExecCmd::ExecCmd ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_ExecCmd_Proxy_Broker_ (0) +{ + this->Executor_ExecCmd_setup_collocation (); +} + +ACE_INLINE +Executor::ExecCmd::ExecCmd ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_ExecCmd_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + diff --git a/quellcode/demo1/Executor/ExecutorS.cpp b/quellcode/demo1/Executor/ExecutorS.cpp new file mode 100755 index 0000000..cb26310 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS.cpp @@ -0,0 +1,925 @@ +// -*- 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:577 + +#ifndef _TAO_IDL_EXECUTORS_CPP_ +#define _TAO_IDL_EXECUTORS_CPP_ + + +#include "ExecutorS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/TypeCode.h" +#include "tao/AnyTypeCode/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "tao/Special_Basic_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if !defined (__ACE_INLINE__) +#include "ExecutorS.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_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_interface.cpp:1511 + +class TAO_Executor_ExecCmd_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /opt/ACE_wrappers/1.5/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_Executor_ExecCmd_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_Executor_ExecCmd_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 5, 0, 5, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 0, 0, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, +#else + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 0, 21, 0, 21, 5, + 0, 5, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 0, 0, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_Executor_ExecCmd_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 7, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 20, + HASH_VALUE_RANGE = 16, + DUPLICATES = 0, + WORDLIST_SIZE = 12 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_Executor::ExecCmd::_is_a_skel, 0}, + {"",0,0},{"",0,0}, + {"setPorts", &POA_Executor::ExecCmd::setPorts_skel, 0}, + {"",0,0}, + {"_component", &POA_Executor::ExecCmd::_component_skel, 0}, + {"",0,0},{"",0,0}, + {"_non_existent", &POA_Executor::ExecCmd::_non_existent_skel, 0}, + {"_repository_id", &POA_Executor::ExecCmd::_repository_id_skel, 0}, + {"_interface", &POA_Executor::ExecCmd::_interface_skel, 0}, + {"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"changeMode", &POA_Executor::ExecCmd::changeMode_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_Executor_ExecCmd_Perfect_Hash_OpTable tao_Executor_ExecCmd_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +Executor__TAO_ExecCmd_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast (0xdead); // Dummy +} + +int +Executor__TAO_ExecCmd_Proxy_Broker_Factory_Initializer (size_t) +{ + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer = + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function; + + return 0; +} + +static int +Executor__TAO_ExecCmd_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + Executor__TAO_ExecCmd_Proxy_Broker_Factory_Initializer ( + reinterpret_cast (Executor__TAO_ExecCmd_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_Executor::ExecCmd::ExecCmd (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_Executor_ExecCmd_optable; +} + +POA_Executor::ExecCmd::ExecCmd (const ExecCmd& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_Executor::ExecCmd::~ExecCmd (void) +{ +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class changeMode_ExecCmd + : public TAO::Upcall_Command + { + public: + inline changeMode_ExecCmd ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_->changeMode ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_Executor::ExecCmd::changeMode_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_mode; + + TAO::Argument * const args[] = + { + &retval, + &_tao_mode + }; + + static size_t const nargs = 2; + + POA_Executor::ExecCmd * const impl = + static_cast (servant); + + changeMode_ExecCmd command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class setPorts_ExecCmd + : public TAO::Upcall_Command + { + public: + inline setPorts_ExecCmd ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + retval = + this->servant_->setPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_Executor::ExecCmd::setPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_one; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_two; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_three; + + TAO::Argument * const args[] = + { + &retval, + &_tao_one, + &_tao_two, + &_tao_three + }; + + static size_t const nargs = 4; + + POA_Executor::ExecCmd * const impl = + static_cast (servant); + + setPorts_ExecCmd command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_Executor::ExecCmd * const impl = + static_cast (servant); + + _is_a_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Executor::ExecCmd * const impl = + static_cast (servant); + + _non_existent_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Executor::ExecCmd * const impl = + static_cast (servant); + + _repository_id_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_Executor::ExecCmd::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_Executor::ExecCmd * const impl = + static_cast (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Executor::ExecCmd * const impl = + static_cast (servant); + + _get_component_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_Executor::ExecCmd::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:manut/Executor/ExecCmd:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_Executor::ExecCmd::_interface_repository_id (void) const +{ + return "IDL:manut/Executor/ExecCmd:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_Executor::ExecCmd::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +Executor::ExecCmd * +POA_Executor::ExecCmd::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::Executor::ExecCmd STUB_SCOPED_NAME; + return + TAO::Narrow_Utils::unchecked_narrow ( + obj.in (), + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Executor/ExecutorS.h b/quellcode/demo1/Executor/ExecutorS.h new file mode 100755 index 0000000..ef1bb90 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS.h @@ -0,0 +1,182 @@ +// -*- 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:387 + +#ifndef _TAO_IDL_EXECUTORS_H_ +#define _TAO_IDL_EXECUTORS_H_ + +#include /**/ "ace/pre.h" + +#include "ExecutorC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class ExecCmd; + typedef ExecCmd *ExecCmd_ptr; + + class ExecCmd + : public virtual PortableServer::ServantBase + { + protected: + ExecCmd (void); + + public: + // Useful for template programming. + typedef ::Executor::ExecCmd _stub_type; + typedef ::Executor::ExecCmd_ptr _stub_ptr_type; + typedef ::Executor::ExecCmd_var _stub_var_type; + + ExecCmd (const ExecCmd& rhs); + virtual ~ExecCmd (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::Executor::ExecCmd *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) = 0; + + static void changeMode_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) = 0; + + static void setPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module Executor + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1148 + +#include "ExecutorS_T.h" + +#if defined (__ACE_INLINE__) +#include "ExecutorS.inl" +#endif /* defined INLINE */ + +#include /**/ "ace/post.h" +#endif /* ifndef */ + diff --git a/quellcode/demo1/Executor/ExecutorS.inl b/quellcode/demo1/Executor/ExecutorS.inl new file mode 100755 index 0000000..38aa325 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS.inl @@ -0,0 +1,28 @@ +// -*- 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 + + diff --git a/quellcode/demo1/Executor/ExecutorS_T.cpp b/quellcode/demo1/Executor/ExecutorS_T.cpp new file mode 100755 index 0000000..8552402 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS_T.cpp @@ -0,0 +1,41 @@ +// -*- 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:656 + +#ifndef _TAO_IDL_EXECUTORS_T_CPP_ +#define _TAO_IDL_EXECUTORS_T_CPP_ + +#include "ExecutorS_T.h" + +#if !defined (__ACE_INLINE__) +#include "ExecutorS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/demo1/Executor/ExecutorS_T.h b/quellcode/demo1/Executor/ExecutorS_T.h new file mode 100755 index 0000000..8228e80 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS_T.h @@ -0,0 +1,133 @@ +// -*- 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:520 + +#ifndef _TAO_IDL_EXECUTORS_T_H_ +#define _TAO_IDL_EXECUTORS_T_H_ + +#include /**/ "ace/pre.h" + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_Executor +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template + class ExecCmd_tie : public ExecCmd + { + public: + ExecCmd_tie (T &t); + // the T& ctor + ExecCmd_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + ExecCmd_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + ExecCmd_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~ExecCmd_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + ExecCmd_tie (const ExecCmd_tie &); + void operator= (const ExecCmd_tie &); + }; +} // module Executor + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1251 +#if defined (__ACE_INLINE__) +#include "ExecutorS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ExecutorS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("ExecutorS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#include /**/ "ace/post.h" +#endif /* ifndef */ + diff --git a/quellcode/demo1/Executor/ExecutorS_T.inl b/quellcode/demo1/Executor/ExecutorS_T.inl new file mode 100755 index 0000000..fa0e726 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS_T.inl @@ -0,0 +1,160 @@ +// -*- 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_visitor_interface/tie_si.cpp:96 + +template ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::~ExecCmd_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_Executor::ExecCmd_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_Executor::ExecCmd_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_Executor::ExecCmd_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_Executor::ExecCmd_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_Executor::ExecCmd_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_Executor::ExecCmd_tie::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->ExecCmd::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +::CORBA::Boolean POA_Executor::ExecCmd_tie::changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + return this->ptr_->changeMode ( + mode + ACE_ENV_ARG_PARAMETER + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +::CORBA::Boolean POA_Executor::ExecCmd_tie::setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + return this->ptr_->setPorts ( + one, + two, + three + ACE_ENV_ARG_PARAMETER + ); +} diff --git a/quellcode/demo1/Executor/Executor_i.cpp b/quellcode/demo1/Executor/Executor_i.cpp new file mode 100755 index 0000000..0961b3b --- /dev/null +++ b/quellcode/demo1/Executor/Executor_i.cpp @@ -0,0 +1,146 @@ +// -*- 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:1063 + +#include "Executor_i.h" +#include "orbsvcs/CosNamingC.h" +#include + +#include + +// Implementation skeleton constructor +Executor_ExecCmd_i::Executor_ExecCmd_i () +{ +} + +Executor_ExecCmd_i::Executor_ExecCmd_i (int argc, char* argv[], CORBA::ORB_var orb) +{ + + try{ + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + + // Connect to Receiver + name[0].id = CORBA::string_dup("Receiver"); + + // receive Object + CORBA::Object_var benchObj = namingContext->resolve(name); + put = Receiver::Put::_narrow(benchObj.in()); + std::cout<<"TransferObjekt ok"<resolve(name); + display = Controller::Display::_narrow(benchObj.in()); + std::cout<<"DisplayObjekt ok"<connect(); + put->allPorts(0, 0, 0); + sleep(1); + put->allPorts(255, 255, 255); + sleep(1); + put->allPorts(0, 0, 0); + + display->show("ready!!!"); + + }catch(CORBA::Exception &e){ + std::cout<show("moving..."); + for(int i = 0; i<255; i++){ + put->allPorts(i,i,i); + } + break; + + case 2: + display->show("blinking..."); + std::cout<<"blink"<allPorts(255,255,255); + else put->allPorts(0,0,0); + } + break; + + case 3: + display->show("flashing..."); + std::cout<<"flash"<allPorts(255,255,255); + else put->allPorts(0,0,0); + } + break; + default: + std::cout<<"Mode not implemented"<allPorts(one, two, three); + return true; +} diff --git a/quellcode/demo1/Executor/Executor_i.h b/quellcode/demo1/Executor/Executor_i.h new file mode 100755 index 0000000..6ab7b6c --- /dev/null +++ b/quellcode/demo1/Executor/Executor_i.h @@ -0,0 +1,77 @@ +// -*- 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:1001 + +#ifndef EXECUTORI_H_ +#define EXECUTORI_H_ + +#include "ExecutorS.h" + +#include "../Receiver/ReceiverC.h" +#include "../Controller/ControllerC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class Executor_ExecCmd_i + : public virtual POA_Executor::ExecCmd +{ +private: + Receiver::Put_var put; + Controller::Display_var display; +public: + // Constructor + Executor_ExecCmd_i (int argc, char* argv[], CORBA::ORB_var orb); + Executor_ExecCmd_i (void); + // Destructor + virtual ~Executor_ExecCmd_i (void); + + virtual + ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + virtual + ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + +}; + + +#endif /* EXECUTORI_H_ */ diff --git a/quellcode/demo1/Executor/GNUmakefile.Executor b/quellcode/demo1/Executor/GNUmakefile.Executor new file mode 100755 index 0000000..b08bca8 --- /dev/null +++ b/quellcode/demo1/Executor/GNUmakefile.Executor @@ -0,0 +1,227 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Executor +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Executor +DEPENDENCY_FILE = .depend.Executor +BIN_UNCHECKED = Executor + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + ExecutorC.cpp \ + ExecutorS.cpp \ + ../Controller/ControllerC.cpp \ + ../Receiver/ReceiverC.cpp \ + Executor_i.cpp \ + Executor.cpp + +VPATH = .:../Receiver:../Controller + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Executor +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += ExecutorS_T.inl ExecutorS.inl ExecutorC.inl ExecutorC.h ExecutorS.h ExecutorS_T.h ExecutorC.cpp ExecutorS.cpp ExecutorS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) Executor.idl -nt ExecutorS_T.inl 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS.inl 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorC.inl 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorC.h 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS.h 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS_T.h 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorC.cpp 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS.cpp 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +ExecutorS_T.inl ExecutorS.inl ExecutorC.inl ExecutorC.h ExecutorS.h ExecutorS_T.h ExecutorC.cpp ExecutorS.cpp ExecutorS_T.cpp: Executor.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs Executor.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += Executor$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = ExecutorC.cpp ExecutorS.cpp ../Controller/ControllerC.cpp ../Receiver/ReceiverC.cpp Executor_i.cpp Executor.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ExecutorC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ExecutorS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/demo1/Receiver/.depend.Receiver_Receiver b/quellcode/demo1/Receiver/.depend.Receiver_Receiver new file mode 100755 index 0000000..e69de29 diff --git a/quellcode/demo1/Receiver/GNUmakefile.Receiver b/quellcode/demo1/Receiver/GNUmakefile.Receiver new file mode 100755 index 0000000..551e5d8 --- /dev/null +++ b/quellcode/demo1/Receiver/GNUmakefile.Receiver @@ -0,0 +1,226 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Receiver +# +# $Id: gnu.mpd,v 1.1.1.2.2.23 2006/03/15 18:51:41 elliottc Exp $ +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Receiver +DEPENDENCY_FILE = .depend.Receiver +BIN_UNCHECKED = Receiver + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + ReceiverC.cpp \ + ReceiverS.cpp \ + cpx.cpp \ + Receiver_i.cpp \ + Receiver.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Sc -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +ifeq ($(versioned_so),1) +SOVERSION = .1.4a.10 +endif + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Receiver +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += ReceiverC.inl ReceiverS.inl ReceiverC.h ReceiverS.h ReceiverC.cpp ReceiverS.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) Receiver.idl -nt ReceiverC.inl 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverS.inl 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverC.h 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverS.h 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverC.cpp 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +ReceiverC.inl ReceiverS.inl ReceiverC.h ReceiverS.h ReceiverC.cpp ReceiverS.cpp: Receiver.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs Receiver.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += Receiver$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = ReceiverC.cpp ReceiverS.cpp cpx.cpp Receiver_i.cpp Receiver.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ReceiverC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ReceiverS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/demo1/Receiver/Receiver b/quellcode/demo1/Receiver/Receiver new file mode 100755 index 0000000..0edce79 Binary files /dev/null and b/quellcode/demo1/Receiver/Receiver differ diff --git a/quellcode/demo1/Receiver/Receiver.cpp b/quellcode/demo1/Receiver/Receiver.cpp new file mode 100755 index 0000000..0dafa79 --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver.cpp @@ -0,0 +1,67 @@ +#include + +#include "Receiver_i.h" + +#include "orbsvcs/CosNamingC.h" +#include + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::maxPriority); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + std::cout<<"Servant activated"<resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + namingContext->rebind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void Receiver::invalidRequest::_tao_any_destructor (void *_tao_void_pointer) +{ + invalidRequest *_tao_tmp_pointer = + static_cast (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +Receiver::invalidRequest * +Receiver::invalidRequest::_downcast (CORBA::Exception *_tao_excp) +{ + return dynamic_cast (_tao_excp); +} + +const Receiver::invalidRequest * +Receiver::invalidRequest::_downcast (CORBA::Exception const *_tao_excp) +{ + return dynamic_cast (_tao_excp); +} + +CORBA::Exception *Receiver::invalidRequest::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::Receiver::invalidRequest, 0); + return retval; +} + +CORBA::Exception * +Receiver::invalidRequest::_tao_duplicate (void) const +{ + CORBA::Exception *result = 0; + ACE_NEW_RETURN ( + result, + ::Receiver::invalidRequest (*this), + 0 + ); + return result; +} + +void Receiver::invalidRequest::_raise (void) const +{ + TAO_RAISE (*this); +} + +void Receiver::invalidRequest::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +void Receiver::invalidRequest::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +CORBA::TypeCode_ptr Receiver::invalidRequest::_type (void) const +{ + return ::Receiver::_tc_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/typecode_defn.cpp:295 + +static const CORBA::Long _oc_Receiver_invalidRequest[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 32, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x52656365), + ACE_NTOHL (0x69766572), + ACE_NTOHL (0x2f696e76), + ACE_NTOHL (0x616c6964), + ACE_NTOHL (0x52657175), + ACE_NTOHL (0x6573743a), + ACE_NTOHL (0x312e3000), // repository ID = IDL:Receiver/invalidRequest:1.0 + 15, + ACE_NTOHL (0x696e7661), + ACE_NTOHL (0x6c696452), + ACE_NTOHL (0x65717565), + ACE_NTOHL (0x73740000), // name = invalidRequest + 0, // member count + }; + +static CORBA::TypeCode _tc_TAO_tc_Receiver_invalidRequest ( + CORBA::tk_except, + sizeof (_oc_Receiver_invalidRequest), + (char *) &_oc_Receiver_invalidRequest, + 0, + 0 + ); + +namespace Receiver +{ + ::CORBA::TypeCode_ptr const _tc_invalidRequest = + &_tc_TAO_tc_Receiver_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for Receiver::Put. + +Receiver::Put_ptr +TAO::Objref_Traits::duplicate ( + Receiver::Put_ptr p + ) +{ + return Receiver::Put::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + Receiver::Put_ptr p + ) +{ + CORBA::release (p); +} + +Receiver::Put_ptr +TAO::Objref_Traits::nil (void) +{ + return Receiver::Put::_nil (); +} + +CORBA::Boolean +TAO::Objref_Traits::marshal ( + Receiver::Put_ptr p, + TAO_OutputCDR & cdr + ) +{ + return CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Receiver::Put::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + Receiver_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_Receiver_Put_connect_exceptiondata [] = + { + { + "IDL:Receiver/invalidRequest:1.0", + Receiver::invalidRequest::_alloc, + Receiver::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_Receiver_Put_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Receiver::Put::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + Receiver_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo (portNo); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_value (value); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_portNo, + &_tao_value + }; + + static TAO::Exception_Data + _tao_Receiver_Put_onePort_exceptiondata [] = + { + { + "IDL:Receiver/invalidRequest:1.0", + Receiver::invalidRequest::_alloc, + Receiver::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 3, + "onePort", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_Receiver_Put_onePort_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Receiver::Put::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + Receiver_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static TAO::Exception_Data + _tao_Receiver_Put_allPorts_exceptiondata [] = + { + { + "IDL:Receiver/invalidRequest:1.0", + Receiver::invalidRequest::_alloc, + Receiver::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "allPorts", + 8, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_Receiver_Put_allPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +Receiver::Put::Put (void) + : the_TAO_Put_Proxy_Broker_ (0) +{ + this->Receiver_Put_setup_collocation (); +} + +void +Receiver::Put::Receiver_Put_setup_collocation () +{ + if (::Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_Put_Proxy_Broker_ = + ::Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer (this); + } +} + +Receiver::Put::~Put (void) +{} + +void +Receiver::Put::_tao_any_destructor (void *_tao_void_pointer) +{ + Put *_tao_tmp_pointer = + static_cast (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +Receiver::Put_ptr +Receiver::Put::_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils::narrow ( + _tao_objref, + "IDL:Receiver/Put:1.0", + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Receiver::Put_ptr +Receiver::Put::_unchecked_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils::unchecked_narrow ( + _tao_objref, + "IDL:Receiver/Put:1.0", + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Receiver::Put_ptr +Receiver::Put::_duplicate (Put_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +Receiver::Put::_tao_release (Put_ptr obj) +{ + CORBA::release (obj); +} + +CORBA::Boolean +Receiver::Put::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:Receiver/Put: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* Receiver::Put::_interface_repository_id (void) const +{ + return "IDL:Receiver/Put:1.0"; +} + +CORBA::Boolean +Receiver::Put::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/typecode_defn.cpp:295 + +static const CORBA::Long _oc_Receiver_Put[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 21, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x52656365), + ACE_NTOHL (0x69766572), + ACE_NTOHL (0x2f507574), + ACE_NTOHL (0x3a312e30), + ACE_NTOHL (0x0), // repository ID = IDL:Receiver/Put:1.0 + 4, + ACE_NTOHL (0x50757400), // name = Put + }; + +static CORBA::TypeCode _tc_TAO_tc_Receiver_Put ( + CORBA::tk_objref, + sizeof (_oc_Receiver_Put), + (char *) &_oc_Receiver_Put, + 0, + 0 + ); + +namespace Receiver +{ + ::CORBA::TypeCode_ptr const _tc_Put = + &_tc_TAO_tc_Receiver_Put; +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_cs.cpp:50 + +namespace TAO { +template<> +CORBA::Boolean +Any_Dual_Impl_T::demarshal_value ( + TAO_InputCDR & cdr + ) +{ + CORBA::String_var id; + + if (!(cdr >> id.out ())) + { + return false; + } + + ACE_TRY_NEW_ENV + { + this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return false; + } + ACE_ENDTRY; + + return true; +} +} + +// Copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + const Receiver::invalidRequest &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T::insert_copy ( + _tao_any, + Receiver::invalidRequest::_tao_any_destructor, + Receiver::_tc_invalidRequest, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + Receiver::invalidRequest *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T::insert ( + _tao_any, + Receiver::invalidRequest::_tao_any_destructor, + Receiver::_tc_invalidRequest, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + Receiver::invalidRequest *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const Receiver::invalidRequest *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const Receiver::invalidRequest *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T::extract ( + _tao_any, + Receiver::invalidRequest::_tao_any_destructor, + Receiver::_tc_invalidRequest, + _tao_elem + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:50 + +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; +} +} + +// Copying insertion. +void +operator<<= ( + CORBA::Any &_tao_any, + Receiver::Put_ptr _tao_elem + ) +{ + Receiver::Put_ptr _tao_objptr = + Receiver::Put::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + CORBA::Any &_tao_any, + Receiver::Put_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T::insert ( + _tao_any, + Receiver::Put::_tao_any_destructor, + Receiver::_tc_Put, + *_tao_elem + ); +} + +CORBA::Boolean +operator>>= ( + const CORBA::Any &_tao_any, + Receiver::Put_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T::extract ( + _tao_any, + Receiver::Put::_tao_any_destructor, + Receiver::_tc_Put, + _tao_elem + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_cs.cpp:60 + +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const Receiver::invalidRequest &_tao_aggregate + ) +{ + // Marshal the repository ID. + return (strm << _tao_aggregate._rep_id ()); +} + +CORBA::Boolean operator>> ( + TAO_InputCDR &, + Receiver::invalidRequest& + ) +{ + return true; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const Receiver::Put_ptr _tao_objref + ) +{ + CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + Receiver::Put_ptr &_tao_objref + ) +{ + CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::Receiver::Put RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils::unchecked_narrow ( + obj.in (), + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} diff --git a/quellcode/demo1/Receiver/ReceiverC.h b/quellcode/demo1/Receiver/ReceiverC.h new file mode 100755 index 0000000..5bf7b62 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverC.h @@ -0,0 +1,363 @@ +// -*- 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:154 + +#ifndef _TAO_IDL_RECEIVERC_H_ +#define _TAO_IDL_RECEIVERC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 + +namespace TAO +{ + class Collocation_Proxy_Broker; + + template class Narrow_Utils; + template class AbstractBase_Narrow_Utils; +} + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:48 + +namespace Receiver +{ + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:51 + +#if !defined (_RECEIVER_INVALIDREQUEST_CH_) +#define _RECEIVER_INVALIDREQUEST_CH_ + + class invalidRequest : public CORBA::UserException + { + public: + + invalidRequest (void); + invalidRequest (const invalidRequest &); + ~invalidRequest (void); + + invalidRequest &operator= (const invalidRequest &); + + static void _tao_any_destructor (void *); + + static invalidRequest *_downcast (CORBA::Exception *); + static const invalidRequest *_downcast (CORBA::Exception const *); + + static CORBA::Exception *_alloc (void); + + virtual CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void) const; + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:127 + + virtual CORBA::TypeCode_ptr _type (void) const; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:44 + + TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr const _tc_invalidRequest; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_interface.cpp:599 + +#if !defined (_RECEIVER_PUT__VAR_OUT_CH_) +#define _RECEIVER_PUT__VAR_OUT_CH_ + + class Put; + typedef Put *Put_ptr; + + typedef + TAO_Objref_Var_T< + Put + > + Put_var; + + typedef + TAO_Objref_Out_T< + Put + > + Put_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_RECEIVER_PUT_CH_) +#define _RECEIVER_PUT_CH_ + + class Put + : public virtual CORBA::Object + { + public: + friend class TAO::Narrow_Utils; + typedef Put_ptr _ptr_type; + typedef Put_var _var_type; + + // The static operations. + static Put_ptr _duplicate (Put_ptr obj); + + static void _tao_release (Put_ptr obj); + + static Put_ptr _narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _unchecked_narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _nil (void) + { + return static_cast (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_Put_Proxy_Broker_; + + protected: + // Concrete interface only. + Put (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void Receiver_Put_setup_collocation (void); + + // Concrete non-local interface only. + Put ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + Put ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~Put (void); + + private: + // Private and unimplemented for concrete interfaces. + Put (const Put &); + + void operator= (const Put &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:44 + + TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr const _tc_Put; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:66 + +} // module Receiver + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:132 + +extern +TAO::Collocation_Proxy_Broker * +(*Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 + +// Traits specializations. +namespace TAO +{ + +#if !defined (_RECEIVER_PUT__TRAITS_) +#define _RECEIVER_PUT__TRAITS_ + + template<> + struct Objref_Traits< ::Receiver::Put> + { + static ::Receiver::Put_ptr duplicate ( + ::Receiver::Put_ptr + ); + static void release ( + ::Receiver::Put_ptr + ); + static ::Receiver::Put_ptr nil (void); + static CORBA::Boolean marshal ( + ::Receiver::Put_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, const Receiver::invalidRequest &); // copying version + void operator<<= (CORBA::Any &, Receiver::invalidRequest*); // noncopying version + CORBA::Boolean operator>>= (const CORBA::Any &, Receiver::invalidRequest *&); // deprecated + CORBA::Boolean operator>>= (const CORBA::Any &, const Receiver::invalidRequest *&); + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, Receiver::Put_ptr); // copying + void operator<<= (CORBA::Any &, Receiver::Put_ptr *); // non-copying + CORBA::Boolean operator>>= (const CORBA::Any &, Receiver::Put_ptr &); + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_ch.cpp:52 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const Receiver::invalidRequest &); + CORBA::Boolean operator>> (TAO_InputCDR &, Receiver::invalidRequest &); + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const Receiver::Put_ptr ); + CORBA::Boolean operator>> (TAO_InputCDR &, Receiver::Put_ptr &); + +// TAO_IDL - Generated from +// be/be_codegen.cpp:940 + +#if defined (__ACE_INLINE__) +#include "ReceiverC.inl" +#endif /* defined INLINE */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#endif /* ifndef */ + + diff --git a/quellcode/demo1/Receiver/ReceiverC.inl b/quellcode/demo1/Receiver/ReceiverC.inl new file mode 100755 index 0000000..15453ef --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverC.inl @@ -0,0 +1,63 @@ +// -*- 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_visitor_interface/interface_ci.cpp:70 + +#if !defined (_RECEIVER_PUT___CI_) +#define _RECEIVER_PUT___CI_ + +ACE_INLINE +Receiver::Put::Put ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_Put_Proxy_Broker_ (0) +{ + this->Receiver_Put_setup_collocation (); +} + +ACE_INLINE +Receiver::Put::Put ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) (ior, oc), + the_TAO_Put_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ diff --git a/quellcode/demo1/Receiver/ReceiverS.cpp b/quellcode/demo1/Receiver/ReceiverS.cpp new file mode 100755 index 0000000..2a0f06a --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS.cpp @@ -0,0 +1,852 @@ +// -*- 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:588 + +#ifndef _TAO_IDL_RECEIVERS_CPP_ +#define _TAO_IDL_RECEIVERS_CPP_ + + +#include "ReceiverS.h" +#include "tao/PortableServer/Operation_Table_Dynamic_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/Typecode.h" +#include "tao/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus +#endif /* __BORLANDC__ */ + +#if !defined (__ACE_INLINE__) +#include "ReceiverS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +static const TAO_operation_db_entry Receiver_Put_operations [] = { + {"connect", &POA_Receiver::Put::connect_skel, 0}, + {"onePort", &POA_Receiver::Put::onePort_skel, 0}, + {"allPorts", &POA_Receiver::Put::allPorts_skel, 0}, + {"_is_a", &POA_Receiver::Put::_is_a_skel, 0}, + {"_non_existent", &POA_Receiver::Put::_non_existent_skel, 0}, + {"_component", &POA_Receiver::Put::_component_skel, 0}, + {"_interface", &POA_Receiver::Put::_interface_skel, 0} +}; + +static const CORBA::Long _tao_Receiver_Put_optable_size = sizeof (ACE_Hash_Map_Entry) * (21); +static char _tao_Receiver_Put_optable_pool [_tao_Receiver_Put_optable_size]; +static ACE_Static_Allocator_Base _tao_Receiver_Put_allocator (_tao_Receiver_Put_optable_pool, _tao_Receiver_Put_optable_size); +static TAO_Dynamic_Hash_OpTable tao_Receiver_Put_optable ( + Receiver_Put_operations, + 7, + 14, + &_tao_Receiver_Put_allocator + ); + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:853 + +TAO::Collocation_Proxy_Broker * +Receiver__TAO_Put_Proxy_Broker_Factory_function (CORBA::Object_ptr) +{ + return reinterpret_cast (0xdead); // Dummy +} + +int +Receiver__TAO_Put_Proxy_Broker_Factory_Initializer (size_t) +{ + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer = + Receiver__TAO_Put_Proxy_Broker_Factory_function; + + return 0; +} + +static int +Receiver__TAO_Put_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + Receiver__TAO_Put_Proxy_Broker_Factory_Initializer ( + reinterpret_cast (Receiver__TAO_Put_Proxy_Broker_Factory_Initializer) + ); + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_Receiver::Put::Put (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_Receiver_Put_optable; +} + +POA_Receiver::Put::Put (const Put& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_Receiver::Put::~Put (void) +{ +} +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_Put + : public TAO::Upcall_Command + { + public: + inline connect_Put ( + POA_Receiver::Put * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_Receiver::Put::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + Receiver::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Receiver::Put * const impl = + static_cast (servant); + + connect_Put command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class onePort_Put + : public TAO::Upcall_Command + { + public: + inline onePort_Put ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + this->servant_->onePort ( + arg_1 + , arg_2 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_Receiver::Put::onePort_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + Receiver::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_value; + + TAO::Argument * const args[] = + { + &retval, + &_tao_portNo, + &_tao_value + }; + + static size_t const nargs = 3; + + POA_Receiver::Put * const impl = + static_cast (servant); + + onePort_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class allPorts_Put + : public TAO::Upcall_Command + { + public: + inline allPorts_Put ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + this->servant_->allPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_Receiver::Put::allPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + Receiver::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static size_t const nargs = 4; + + POA_Receiver::Put * const impl = + static_cast (servant); + + allPorts_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_Put_Upcall_Command ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< CORBA::Char *, TAO::SArg_Traits< CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_Receiver::Put::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_Receiver::Put * const impl = + static_cast (servant); + + _is_a_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_Put_Upcall_Command ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_Receiver::Put::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Receiver::Put * const impl = + static_cast (servant); + + _non_existent_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:393 + + + +void POA_Receiver::Put::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW (CORBA::INTF_REPOS (CORBA::OMGVMCID | 1, + CORBA::COMPLETED_NO)); + } + + POA_Receiver::Put * const impl = + static_cast (servant); + CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW (CORBA::MARSHAL ()); + } +} + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_Put_Upcall_Command ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_Receiver::Put::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Receiver::Put * const impl = + static_cast (servant); + + _get_component_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +CORBA::Boolean POA_Receiver::Put::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:Receiver/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_Receiver::Put::_interface_repository_id (void) const +{ + return "IDL:Receiver/Put:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:794 + +void POA_Receiver::Put::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:745 + +Receiver::Put * +POA_Receiver::Put::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::Receiver::Put STUB_SCOPED_NAME; + return + TAO::Narrow_Utils::unchecked_narrow ( + obj.in (), + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Receiver/ReceiverS.h b/quellcode/demo1/Receiver/ReceiverS.h new file mode 100755 index 0000000..d893c66 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS.h @@ -0,0 +1,209 @@ +// -*- 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:380 + +#ifndef _TAO_IDL_RECEIVERS_H_ +#define _TAO_IDL_RECEIVERS_H_ + + +#include "ReceiverC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class Put; + typedef Put *Put_ptr; + + + class Put + : public virtual PortableServer::ServantBase + { + protected: + Put (void); + + public: + // Useful for template programming. + typedef ::Receiver::Put _stub_type; + typedef ::Receiver::Put_ptr _stub_ptr_type; + typedef ::Receiver::Put_var _stub_var_type; + + Put (const Put& rhs); + virtual ~Put (void); + + virtual CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest &req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::Receiver::Put *_this ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) = 0; + + static void onePort_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) = 0; + + static void allPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module Receiver + +// TAO_IDL - Generated from +// be/be_codegen.cpp:976 + +#include "ReceiverS_T.h" + +#if defined (__ACE_INLINE__) +#include "ReceiverS.inl" +#endif /* defined INLINE */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Receiver/ReceiverS.inl b/quellcode/demo1/Receiver/ReceiverS.inl new file mode 100755 index 0000000..c944d80 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS.inl @@ -0,0 +1,27 @@ +// -*- 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 + diff --git a/quellcode/demo1/Receiver/ReceiverS_T.cpp b/quellcode/demo1/Receiver/ReceiverS_T.cpp new file mode 100755 index 0000000..40269df --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS_T.cpp @@ -0,0 +1,41 @@ +// -*- 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:662 + +#ifndef _TAO_IDL_RECEIVERS_T_CPP_ +#define _TAO_IDL_RECEIVERS_T_CPP_ + +#include "ReceiverS_T.h" + +#if !defined (__ACE_INLINE__) +#include "ReceiverS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/demo1/Receiver/ReceiverS_T.h b/quellcode/demo1/Receiver/ReceiverS_T.h new file mode 100755 index 0000000..4b8fe5a --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS_T.h @@ -0,0 +1,155 @@ +// -*- 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:525 + +#ifndef _TAO_IDL_RECEIVERS_T_H_ +#define _TAO_IDL_RECEIVERS_T_H_ + + + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_Receiver +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template + class Put_tie : public Put + { + public: + Put_tie (T &t); + // the T& ctor + Put_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + Put_tie (T *tp, CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + Put_tie ( + T *tp, + PortableServer::POA_ptr poa, + CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~Put_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner (CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + CORBA::Boolean rel_; + + // copy and assignment are not allowed + Put_tie (const Put_tie &); + void operator= (const Put_tie &); + }; +} // module Receiver + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1073 + +#if defined (__ACE_INLINE__) +#include "ReceiverS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ReceiverS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("ReceiverS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Receiver/ReceiverS_T.inl b/quellcode/demo1/Receiver/ReceiverS_T.inl new file mode 100755 index 0000000..3ce8735 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS_T.inl @@ -0,0 +1,177 @@ +// -*- 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_visitor_interface/tie_si.cpp:96 + +template ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T *tp, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_Receiver::Put_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_Receiver::Put_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_Receiver::Put_tie::_tied_object (T *obj, CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE CORBA::Boolean +POA_Receiver::Put_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_Receiver::Put_tie::_is_owner (CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_Receiver::Put_tie::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (!CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->Put::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template ACE_INLINE +void POA_Receiver::Put_tie::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template ACE_INLINE +void POA_Receiver::Put_tie::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + this->ptr_->onePort ( + portNo, + value + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template ACE_INLINE +void POA_Receiver::Put_tie::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + this->ptr_->allPorts ( + valPort1, + valPort2, + valPort3 + ); +} + diff --git a/quellcode/demo1/Receiver/Receiver_i.cpp b/quellcode/demo1/Receiver/Receiver_i.cpp new file mode 100755 index 0000000..3cd094c --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver_i.cpp @@ -0,0 +1,92 @@ +// -*- 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:1063 + +#include "Receiver_i.h" + +// Implementation skeleton constructor +Receiver_Put_i::Receiver_Put_i (void) +{ + +} + +// Implementation skeleton destructor +Receiver_Put_i::~Receiver_Put_i (void) +{ +} + +void Receiver_Put_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + // Add your implementation here + std::cout<<"connecting... "; + cpx = new CPX(); + std::cout<<"ok"<set(portNo, value); +} + +void Receiver_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + // Add your implementation here + + std::cout<<"set: "<set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); + +} + + diff --git a/quellcode/demo1/Receiver/Receiver_i.h b/quellcode/demo1/Receiver/Receiver_i.h new file mode 100755 index 0000000..a9f6230 --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver_i.h @@ -0,0 +1,89 @@ +// -*- 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:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "ReceiverS.h" + +#include "cpx.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class Receiver_Put_i + : public virtual POA_Receiver::Put +{ +private: + + CPX* cpx; + +public: + // Constructor + Receiver_Put_i (void); + + // Destructor + virtual ~Receiver_Put_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/demo1/Receiver/cpx.cpp b/quellcode/demo1/Receiver/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/demo1/Receiver/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"< + +#include +#include +#include +#include + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00 +#define PORT2_IN 0x6c00 +#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif -- cgit v1.2.3