summaryrefslogtreecommitdiff
path: root/TAO/tests
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-31 17:56:44 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-31 17:56:44 +0000
commit1bbfdb10bec04b9e8119b10eba2e91e5b9a14467 (patch)
tree81d9fc6bbbdf57a9f63d826e754e325d7fd2695d /TAO/tests
parent932ee3ee1cb858bbaea4f9f8dc6f700be538afbe (diff)
downloadATCD-1bbfdb10bec04b9e8119b10eba2e91e5b9a14467.tar.gz
ChangeLogTag: Mon Dec 31 11:01:29 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/tests')
-rw-r--r--TAO/tests/OBV/Factory/FactoryC_impl.cpp51
-rw-r--r--TAO/tests/OBV/Factory/FactoryC_impl.h60
-rw-r--r--TAO/tests/OBV/Factory/FactoryS_impl.cpp55
-rw-r--r--TAO/tests/OBV/Factory/FactoryS_impl.h51
4 files changed, 217 insertions, 0 deletions
diff --git a/TAO/tests/OBV/Factory/FactoryC_impl.cpp b/TAO/tests/OBV/Factory/FactoryC_impl.cpp
new file mode 100644
index 00000000000..22601c8537c
--- /dev/null
+++ b/TAO/tests/OBV/Factory/FactoryC_impl.cpp
@@ -0,0 +1,51 @@
+// $Id$
+
+#include "FactoryC_impl.h"
+
+ACE_RCSID(Factory, FactoryC_impl, "$Id$")
+
+OBV_FactoryTest::Value2*
+Value2_init_impl::create_default (CORBA::ULong id)
+{
+ OBV_FactoryTest::Value2* ret_val = 0;
+ ACE_NEW_RETURN (ret_val,
+ Value2_impl,
+ 0);
+
+ if (ret_val)
+ {
+ ret_val->id (id);
+ }
+
+ return ret_val;
+}
+
+OBV_FactoryTest::Value2*
+Value2_init_impl::create (
+ CORBA::ULong id,
+ const OBV_FactoryTest::BaseValue::BV_Data & data)
+{
+ OBV_FactoryTest::Value2* ret_val = 0;
+ ACE_NEW_RETURN (ret_val,
+ Value2_impl,
+ 0);
+
+ if (ret_val)
+ {
+ ret_val->id (id);
+ ret_val->data (data);
+ }
+
+ return ret_val;
+}
+
+CORBA_ValueBase*
+Value2_init_impl::create_for_unmarshal (void)
+{
+ OBV_FactoryTest::Value2* ret_val = 0;
+ ACE_NEW_RETURN (ret_val,
+ Value2_impl,
+ 0);
+
+ return ret_val;
+}
diff --git a/TAO/tests/OBV/Factory/FactoryC_impl.h b/TAO/tests/OBV/Factory/FactoryC_impl.h
new file mode 100644
index 00000000000..61423429da9
--- /dev/null
+++ b/TAO/tests/OBV/Factory/FactoryC_impl.h
@@ -0,0 +1,60 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/OBV/Factory
+//
+// = FILENAME
+// FactoryC_impl.h
+//
+// = AUTHOR
+// Boris Kolpackov <bosk@ipmce.ru>
+//
+// ============================================================================
+
+#ifndef TAO_FACTORY_FACTORY_C_IMPL_H
+#define TAO_FACTORY_FACTORY_C_IMPL_H
+
+#include "FactoryC.h"
+
+// Just need to mix-in RefCounter
+class Value2_impl : public virtual OBV_OBV_FactoryTest::Value2,
+ public virtual CORBA_DefaultValueRefCountBase
+{
+ // = TITLE
+ // Value2 implementation
+ //
+ // = DESCRIPTION
+ // Implements the Value2 valuetype
+ //
+
+};
+
+// Factory implementation
+class Value2_init_impl : public OBV_FactoryTest::Value2_init
+{
+ // = TITLE
+ // OBV factory implementation
+ //
+ // = DESCRIPTION
+ // Implements the Value2 factory implementation
+ //
+public:
+
+ virtual OBV_FactoryTest::Value2* create_default (
+ CORBA::ULong id
+ );
+
+ virtual OBV_FactoryTest::Value2* create (
+ CORBA::ULong id,
+ const OBV_FactoryTest::BaseValue::BV_Data & data
+ );
+
+public:
+
+ virtual CORBA_ValueBase* create_for_unmarshal (void);
+
+};
+
+#endif /* TAO_FACTORY_FACTORY_C_IMPL_H */
diff --git a/TAO/tests/OBV/Factory/FactoryS_impl.cpp b/TAO/tests/OBV/Factory/FactoryS_impl.cpp
new file mode 100644
index 00000000000..f9f80700863
--- /dev/null
+++ b/TAO/tests/OBV/Factory/FactoryS_impl.cpp
@@ -0,0 +1,55 @@
+// $Id$
+
+#include "FactoryC_impl.h"
+#include "FactoryS_impl.h"
+
+
+ACE_RCSID(Factory, FactoryS_impl, "$Id$")
+
+Test_impl::Test_impl (CORBA::ORB_ptr orb)
+ : orb_ (CORBA::ORB::_duplicate (orb))
+{
+}
+
+OBV_FactoryTest::BaseValue *
+Test_impl::get_base_value (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ OBV_FactoryTest::BaseValue* ret_val = 0;
+ ACE_NEW_RETURN (ret_val,
+ OBV_OBV_FactoryTest::BaseValue,
+ 0);
+
+ return ret_val;
+}
+
+OBV_FactoryTest::Value1 *
+Test_impl::get_value1 (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ OBV_FactoryTest::Value1* ret_val = 0;
+ ACE_NEW_RETURN (ret_val,
+ OBV_OBV_FactoryTest::Value1,
+ 0);
+
+ return ret_val;
+}
+
+OBV_FactoryTest::Value2 *
+Test_impl::get_value2 (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ OBV_FactoryTest::Value2* ret_val = 0;
+ ACE_NEW_RETURN (ret_val,
+ Value2_impl,
+ 0);
+
+ return ret_val;
+}
+
+void
+Test_impl::shutdown (CORBA::Environment& ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->orb_->shutdown (0, ACE_TRY_ENV);
+}
diff --git a/TAO/tests/OBV/Factory/FactoryS_impl.h b/TAO/tests/OBV/Factory/FactoryS_impl.h
new file mode 100644
index 00000000000..48b23d975c7
--- /dev/null
+++ b/TAO/tests/OBV/Factory/FactoryS_impl.h
@@ -0,0 +1,51 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/OBV/Factory
+//
+// = FILENAME
+// FactoryS_impl.h
+//
+// = AUTHOR
+// Boris Kolpackov <bosk@ipmce.ru>
+//
+// ============================================================================
+
+#ifndef TAO_FACTORY_S_IMPL_H
+#define TAO_FACTORY_S_IMPL_H
+
+#include "FactoryS.h"
+
+class Test_impl : public POA_OBV_FactoryTest::Test
+{
+ // = TITLE
+ // Implementation of Test interface
+ //
+ // = DESCRIPTION
+ // This interface is provided to produce valuetypes and test
+ // marshaling
+ //
+public:
+ Test_impl (CORBA::ORB_ptr orb);
+ // ctor
+
+ virtual OBV_FactoryTest::BaseValue * get_base_value (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual OBV_FactoryTest::Value1 * get_value1 (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual OBV_FactoryTest::Value2 * get_value2 (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void shutdown (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ CORBA::ORB_var orb_;
+ // The ORB
+};
+
+#endif /* TAO_FACTORY_S_IMPL_H */