summaryrefslogtreecommitdiff
path: root/TAO/tao/Object_Ref_Table.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
commit6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch)
treeda50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tao/Object_Ref_Table.cpp
parent0e555b9150d38e3b3473ba325b56db2642e6352b (diff)
downloadATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/tao/Object_Ref_Table.cpp')
-rw-r--r--TAO/tao/Object_Ref_Table.cpp86
1 files changed, 0 insertions, 86 deletions
diff --git a/TAO/tao/Object_Ref_Table.cpp b/TAO/tao/Object_Ref_Table.cpp
deleted file mode 100644
index f5071ad0466..00000000000
--- a/TAO/tao/Object_Ref_Table.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-#include "tao/Object_Ref_Table.h"
-#include "tao/ORB.h"
-#include "tao/Environment.h"
-#include "tao/debug.h"
-#include "tao/ORB_Constants.h"
-#include "tao/SystemException.h"
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-
-
-ACE_RCSID (tao,
- Object_Ref_Table,
- "$Id$")
-
-#ifndef __ACE_INLINE__
-# include "tao/Object_Ref_Table.inl"
-#endif /* __ACE_INLINE__ */
-
-
-// ****************************************************************
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-int
-TAO_Object_Ref_Table::bind (const char *id,
- CORBA::Object_ptr obj)
-{
- // Make sure that the supplied Object reference is valid,
- // i.e. not nil.
- if (id == 0
- || ACE_OS::strlen (id) == 0
- || ::CORBA::is_nil (obj))
- {
- errno = EINVAL;
- return -1;
- };
-
- Table::value_type const value =
- std::make_pair (CORBA::String_var (id),
- CORBA::Object_var (CORBA::Object::_duplicate (obj)));
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- guard,
- this->lock_,
- -1);
-
- std::pair<iterator, bool> const result = this->table_.insert (value);
-
- if (!result.second)
- {
- if (TAO_debug_level > 1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Object_Ref_Table::")
- ACE_TEXT ("bind:")
- ACE_TEXT (" Could not register duplicate object <%s> ")
- ACE_TEXT ("with the ORB\n"),
- ACE_TEXT_CHAR_TO_TCHAR (id)));
- }
-
- return -1;
- }
-
- return 0;
-}
-
-CORBA::Object_ptr
-TAO_Object_Ref_Table::find (const char *id)
-{
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- guard,
- this->lock_,
- CORBA::Object::_nil ());
-
- iterator const found =
- this->table_.find (CORBA::String_var (id));
-
- if (found == this->table_.end ())
- return CORBA::Object::_nil ();
-
- return CORBA::Object::_duplicate ((*found).second.in ());
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL