summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/TIE/test_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/POA/TIE/test_i.cpp')
-rw-r--r--TAO/examples/POA/TIE/test_i.cpp107
1 files changed, 107 insertions, 0 deletions
diff --git a/TAO/examples/POA/TIE/test_i.cpp b/TAO/examples/POA/TIE/test_i.cpp
new file mode 100644
index 00000000000..1fd4ecbb3ef
--- /dev/null
+++ b/TAO/examples/POA/TIE/test_i.cpp
@@ -0,0 +1,107 @@
+// $Id$
+
+//===========================================================================
+//
+//
+// = FILENAME
+// test_i.cpp
+//
+// = DESCRIPTION
+// This is a simple test servant implementation
+//
+// = AUTHOR
+// Irfan Pyarali
+//
+//===========================================================================
+
+#include "test_i.h"
+
+ACE_RCSID(TIE, test_i, "$Id$")
+
+// Constructor
+Tie_i::Tie_i (CORBA::Long value)
+ : value_ (value)
+{
+}
+
+// Destructor
+Tie_i::~Tie_i (void)
+{
+}
+
+// Return this->value
+CORBA::Long
+Tie_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->value_;
+}
+
+// Constructor
+A_i::A_i (CORBA::Long value,
+ PortableServer::POA_ptr poa)
+ : value_ (value),
+ poa_ (PortableServer::POA::_duplicate (poa))
+{
+}
+
+// Return this->value
+CORBA::Long
+A_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->value_;
+}
+
+// Return the Default POA of this Servant
+PortableServer::POA_ptr
+A_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ return PortableServer::POA::_duplicate (this->poa_.in ());
+}
+
+// Constructor
+Outer_i::B_i::B_i (CORBA::Long value,
+ PortableServer::POA_ptr poa)
+ : value_ (value),
+ poa_ (PortableServer::POA::_duplicate (poa))
+{
+}
+
+// Return this->value
+CORBA::Long
+Outer_i::B_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->value_;
+}
+
+// Return the Default POA of this Servant
+PortableServer::POA_ptr
+Outer_i::B_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ return PortableServer::POA::_duplicate (this->poa_.in ());
+}
+
+// Constructor
+Outer_i::Inner_i::C_i::C_i (CORBA::Long value,
+ PortableServer::POA_ptr poa)
+ : value_ (value),
+ poa_ (PortableServer::POA::_duplicate (poa))
+{
+}
+
+// Return this->value
+CORBA::Long
+Outer_i::Inner_i::C_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->value_;
+}
+
+// Return the Default POA of this Servant
+PortableServer::POA_ptr
+Outer_i::Inner_i::C_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ return PortableServer::POA::_duplicate (this->poa_.in ());
+}