summaryrefslogtreecommitdiff
path: root/modules/CIAO/ciao/Contexts/Context_Impl_T.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2009-08-16 20:41:22 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2009-08-16 20:41:22 +0000
commit3b37923a14c7db4d9d602cd9166be38f6104da50 (patch)
tree63477c4878be44047f054092ab3a9b8bb77ba59f /modules/CIAO/ciao/Contexts/Context_Impl_T.cpp
parent767b53703f187eddaf51b3a1d99c6984bf8ba75f (diff)
downloadATCD-3b37923a14c7db4d9d602cd9166be38f6104da50.tar.gz
branching/tagging
Diffstat (limited to 'modules/CIAO/ciao/Contexts/Context_Impl_T.cpp')
-rw-r--r--modules/CIAO/ciao/Contexts/Context_Impl_T.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/modules/CIAO/ciao/Contexts/Context_Impl_T.cpp b/modules/CIAO/ciao/Contexts/Context_Impl_T.cpp
new file mode 100644
index 00000000000..f3afa79af0e
--- /dev/null
+++ b/modules/CIAO/ciao/Contexts/Context_Impl_T.cpp
@@ -0,0 +1,63 @@
+// $Id$
+
+#ifndef CIAO_CONTEXT_IMPL_T_C
+#define CIAO_CONTEXT_IMPL_T_C
+
+#include "Context_Impl_T.h"
+
+namespace CIAO
+{
+ template <typename BASE_CTX,
+ typename SVNT,
+ typename COMP>
+ Context_Impl<BASE_CTX, SVNT, COMP>::Context_Impl (
+ Components::CCMHome_ptr the_home,
+ Container_ptr c,
+ SVNT *sv)
+ : Context_Impl_Base (the_home, c),
+ servant_ (sv)
+ {
+ }
+
+ template <typename BASE_CTX,
+ typename SVNT,
+ typename COMP>
+ Context_Impl<BASE_CTX, SVNT, COMP>::~Context_Impl (void)
+ {
+ }
+
+ // Operations from ::Components::SessionContext.
+
+ template <typename BASE_CTX,
+ typename SVNT,
+ typename COMP>
+ CORBA::Object_ptr
+ Context_Impl<BASE_CTX, SVNT, COMP>::get_CCM_object (void)
+ {
+ if (CORBA::is_nil (this->component_.in ()))
+ {
+ CORBA::Object_var obj;
+
+ try
+ {
+ obj = this->container_->get_objref (this->servant_);
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Caught Exception\n");
+ return CORBA::Object::_nil ();
+ }
+
+ this->component_ = COMP::_narrow (obj.in ());
+
+ if (CORBA::is_nil (this->component_.in ()))
+ {
+ throw CORBA::INTERNAL ();
+ }
+ }
+
+ return COMP::_duplicate (this->component_.in ());
+ }
+}
+
+#endif /* CIAO_CONTEXT_IMPL_T_C */