diff options
Diffstat (limited to 'TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp')
-rw-r--r-- | TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp new file mode 100644 index 00000000000..cd3adaaf7ca --- /dev/null +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp @@ -0,0 +1,77 @@ +// $Id$ + +#include "tao/ORB_Constants.h" +#include "cubit_i.h" +#include "Task_Client.h" + +ACE_RCSID(MT_Cubit, cubit_i, "$Id$") + +Cubit_i::Cubit_i (CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa) + : orb_ (CORBA::ORB::_duplicate (orb)), + poa_ (PortableServer::POA::_duplicate (poa)) +{ +} + +Cubit_i::~Cubit_i (void) +{ +} + +CORBA::Octet +Cubit_i::cube_octet (CORBA::Octet o + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return (CORBA::Octet) (o * o * o); +} + +CORBA::Short +Cubit_i::cube_short (CORBA::Short s + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return (CORBA::Short) (s * s * s); +} + +CORBA::Long +Cubit_i::cube_long (CORBA::Long l + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return (CORBA::Long) (l * l * l); +} + +Cubit::Many +Cubit_i::cube_struct (const Cubit::Many &values + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + Cubit::Many out_values; + + out_values.o = values.o * values.o * values.o; + out_values.s = values.s * values.s * values.s; + out_values.l = values.l * values.l * values.l; + + return out_values; +} + +void +Cubit_i::noop (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // does nothing. +} + +void Cubit_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, + "(%t) Calling orb ()->shutdown ()\n")); + this->orb_->shutdown (); +} + +PortableServer::POA_ptr +Cubit_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +{ + return PortableServer::POA::_duplicate (this->poa_.in ()); +} |