diff options
Diffstat (limited to 'CIAO/examples/space/Compression/Compression_Component_exec.cpp')
-rw-r--r-- | CIAO/examples/space/Compression/Compression_Component_exec.cpp | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/CIAO/examples/space/Compression/Compression_Component_exec.cpp b/CIAO/examples/space/Compression/Compression_Component_exec.cpp new file mode 100644 index 00000000000..c2c1d9ed048 --- /dev/null +++ b/CIAO/examples/space/Compression/Compression_Component_exec.cpp @@ -0,0 +1,185 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "Compression_Component_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_Compression_Component +{ + //================================================================== + // Component Executor Implementation Class: Compression_Component_exec_i + //================================================================== + + Compression_Component_exec_i::Compression_Component_exec_i (void) + { + } + + Compression_Component_exec_i::~Compression_Component_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + void + Compression_Component_exec_i::push_recv_data ( + ::SPACE::Gizmo_Data * ev + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Compression-Component: " + "Got science data from %s.\n", ev->sender ())); + + CORBA::Long iterations = ev->data (); + + // ACE_DEBUG ((LM_DEBUG, "\r\n THe ev data is %d\n", iterations)); + + for (CORBA::Long i = 0;i < ev->data ();i++) + { + ACE::is_prime (16127, 2, 16127 / 2); + } + + this->context_->push_send_data (ev); + + } + + // Operations from Components::SessionComponent + + void + Compression_Component_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + this->context_ = + Compression_Component_Context::_narrow ( + ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (this->context_ == 0) + { + ACE_THROW ( ::CORBA::INTERNAL ()); + } + } + + void + Compression_Component_exec_i::ciao_preactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Compression_Component_exec_i::ciao_postactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Compression_Component_exec_i::ccm_activate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Compression_Component_exec_i::ccm_passivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Compression_Component_exec_i::ccm_remove ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: Compression_Component_Factory_exec_i + //================================================================== + + Compression_Component_Factory_exec_i::Compression_Component_Factory_exec_i (void) + { + } + + Compression_Component_Factory_exec_i::~Compression_Component_Factory_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + Compression_Component_Factory_exec_i::create ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + Compression_Component_exec_i, + ::CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" COMPRESSION_COMPONENT_EXEC_Export ::Components::HomeExecutorBase_ptr + create_SPACE_Compression_Component_Factory_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + Compression_Component_Factory_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} |