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 +++++++ 32 files changed, 2902 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 (limited to 'quellcode/demo1/Controller') 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 -- cgit v1.2.3