summaryrefslogtreecommitdiff
path: root/TAO/tao/ORB.i
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/ORB.i')
-rw-r--r--TAO/tao/ORB.i151
1 files changed, 27 insertions, 124 deletions
diff --git a/TAO/tao/ORB.i b/TAO/tao/ORB.i
index f99fd2ee274..ba7d47392c5 100644
--- a/TAO/tao/ORB.i
+++ b/TAO/tao/ORB.i
@@ -1,10 +1,32 @@
// -*- c++ -*-
// $Id$
+// String utility support. Since these are static methods we need to
+// explicitly export them from the DLL.
+
+ACE_INLINE TAO_Export CORBA::String
+CORBA::string_alloc (CORBA::ULong len)
+{
+ // Allocate 1 + strlen to accomodate the null terminating character.
+ return new CORBA::Char[size_t (len + 1)];
+}
+
+ACE_INLINE TAO_Export void
+CORBA::string_free (CORBA::Char *str)
+{
+ delete [] str;
+}
+
// ----------------------------------------------------------------------
// String_var type
// ----------------------------------------------------------------------
+ACE_INLINE TAO_Export CORBA::String
+CORBA::string_dup (const CORBA::Char *str)
+{
+ return CORBA::string_copy (str);
+}
+
ACE_INLINE
CORBA_String_var::CORBA_String_var (void)
{
@@ -13,7 +35,7 @@ CORBA_String_var::CORBA_String_var (void)
ACE_INLINE
CORBA_String_var::CORBA_String_var (const char *p)
- : ptr_ (CORBA::string_dup (p))
+ : ptr_ (CORBA::string_dup ((char *) p))
{
}
@@ -120,129 +142,16 @@ CORBA_String_out::ptr (void)
return this->ptr_;
}
-// ****************************************************************
-
// ----------------------------------------------------------------------
-// String_var type
+// Wide strings
// ----------------------------------------------------------------------
-ACE_INLINE
-CORBA_WString_var::CORBA_WString_var (void)
-{
- this->ptr_ = 0;
-}
-
-ACE_INLINE
-CORBA_WString_var::CORBA_WString_var (const CORBA::WChar *p)
- : ptr_ (CORBA::wstring_dup (p))
-{
-}
-
-ACE_INLINE CORBA::WChar &
-CORBA_WString_var::operator[] (CORBA::ULong index)
-{
- // We need to verify bounds else raise some exception.
- return this->ptr_[index];
-}
-
-ACE_INLINE CORBA::WChar
-CORBA_WString_var::operator[] (CORBA::ULong index) const
-{
- // We need to verify bounds else raise some exception.
- return this->ptr_[index];
-}
-
-ACE_INLINE
-CORBA_WString_var::operator CORBA::WChar *()
+ACE_INLINE TAO_Export CORBA::WString
+CORBA::wstring_dup (const WChar *const str)
{
- return this->ptr_;
-}
-
-ACE_INLINE
-CORBA_WString_var::operator const CORBA::WChar *() const
-{
- return this->ptr_;
+ return CORBA::wstring_copy (str);
}
-ACE_INLINE const CORBA::WChar *
-CORBA_WString_var::in (void) const
-{
- return this->ptr_;
-}
-
-ACE_INLINE CORBA::WChar *&
-CORBA_WString_var::inout (void)
-{
- return this->ptr_;
-}
-
-ACE_INLINE CORBA::WChar *&
-CORBA_WString_var::out (void)
-{
- CORBA::wstring_free (this->ptr_);
- this->ptr_ = 0;
- return this->ptr_;
-}
-
-ACE_INLINE CORBA::WChar *
-CORBA_WString_var::_retn (void)
-{
- CORBA::WChar *temp = this->ptr_;
- this->ptr_ = 0;
- return temp;
-}
-
-// ----------------------------------------------------
-// String_out type
-// ----------------------------------------------------
-
-ACE_INLINE
-CORBA_WString_out::CORBA_WString_out (CORBA::WChar *&s)
- : ptr_ (s)
-{
- this->ptr_ = 0;
-}
-
-ACE_INLINE
-CORBA_WString_out::CORBA_WString_out (CORBA_WString_var &s)
- : ptr_ (s.out ())
-{
-}
-
-ACE_INLINE
-CORBA_WString_out::CORBA_WString_out (const CORBA_WString_out &s)
- : ptr_ (s.ptr_)
-{
-}
-
-ACE_INLINE CORBA_WString_out &
-CORBA_WString_out::operator= (const CORBA_WString_out &s)
-{
- this->ptr_ = s.ptr_;
- return *this;
-}
-
-ACE_INLINE CORBA_WString_out &
-CORBA_WString_out::operator= (CORBA::WChar *s)
-{
- this->ptr_ = s;
- return *this;
-}
-
-ACE_INLINE
-CORBA_WString_out::operator CORBA::WChar *&()
-{
- return this->ptr_;
-}
-
-ACE_INLINE CORBA::WChar *&
-CORBA_WString_out::ptr (void)
-{
- return this->ptr_;
-}
-
-// ****************************************************************
-
// ---------------------------------------------------------------------------
// ORB specific
// ---------------------------------------------------------------------------
@@ -341,12 +250,6 @@ CORBA_ORB::_optimize_collocation_objects (void)
return this->optimize_collocation_objects_;
}
-ACE_INLINE TAO_ORB_Core *
-CORBA_ORB::orb_core (void) const
-{
- return this->orb_core_;
-}
-
// *************************************************************
// Inline operations for class CORBA_ORB_var
// *************************************************************