summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-03-23 00:03:14 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-03-23 00:03:14 +0000
commit1ab8190966a253fcf57273e118cedbc50854587a (patch)
treeb9f923b98e1afadea5e76c15c7fbe6dedcf103d4
parenta27af132cf6e13e737c1ed1f720dd2c921038a76 (diff)
downloadATCD-1ab8190966a253fcf57273e118cedbc50854587a.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/Exception.cpp40
-rw-r--r--TAO/tao/Exception.i24
-rw-r--r--TAO/tao/ORB.cpp28
-rw-r--r--TAO/tao/ORB.i31
-rw-r--r--TAO/tao/Object.cpp33
-rw-r--r--TAO/tao/Object.i35
-rw-r--r--TAO/tao/Typecode.cpp25
-rw-r--r--TAO/tao/Typecode.h11
-rw-r--r--TAO/tao/Typecode.i16
9 files changed, 134 insertions, 109 deletions
diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp
index af650c872a9..a5f4e3ef1bd 100644
--- a/TAO/tao/Exception.cpp
+++ b/TAO/tao/Exception.cpp
@@ -19,6 +19,46 @@ CORBA::TypeCode_ptr TAO_Exceptions::sys_exceptions[TAO_Exceptions::NUM_SYS_EXCEP
CORBA::ExceptionList TAO_Exceptions::system_exceptions;
+void
+CORBA_Environment::exception (CORBA::Exception *ex)
+{
+ if (ex != this->exception_)
+ {
+ this->clear ();
+ this->exception_ = ex;
+ this->exception_->AddRef ();
+ }
+}
+
+CORBA_Environment::~CORBA_Environment (void)
+{
+ this->clear ();
+}
+
+void
+CORBA_Environment::clear (void)
+{
+ if (this->exception_)
+ this->exception_->Release ();
+}
+
+void
+CORBA_Exception::operator delete (void *p)
+{
+ ::operator delete (p);
+}
+
+CORBA_Environment::CORBA_Environment (void)
+ : exception_ (0)
+{
+}
+
+void *
+CORBA_Exception::operator new (size_t s)
+{
+ return ::operator new (s);
+}
+
CORBA_Exception::CORBA_Exception (CORBA::TypeCode_ptr tc)
: type_ (tc),
refcount_ (0)
diff --git a/TAO/tao/Exception.i b/TAO/tao/Exception.i
index a27aa089eef..a10334f5472 100644
--- a/TAO/tao/Exception.i
+++ b/TAO/tao/Exception.i
@@ -7,18 +7,6 @@ CORBA_Exception::operator new (size_t,
return (void *) p;
}
-ACE_INLINE void *
-CORBA_Exception::operator new (size_t s)
-{
- return ::operator new (s);
-}
-
-ACE_INLINE void
-CORBA_Exception::operator delete (void *p)
-{
- ::operator delete (p);
-}
-
ACE_INLINE
CORBA_UserException::CORBA_UserException (const CORBA_UserException &src)
: CORBA_Exception (src)
@@ -50,6 +38,8 @@ CORBA_SystemException::completion (CORBA::CompletionStatus c)
}
ACE_INLINE
+<<<<<<< Exception.i
+=======
CORBA_Environment::CORBA_Environment (void)
: exception_ (0)
{
@@ -77,13 +67,3 @@ CORBA::Exception_ptr CORBA_Environment::exception (void) const
return this->exception_;
}
-ACE_INLINE void
-CORBA_Environment::exception (CORBA::Exception *ex)
-{
- if (ex != this->exception_)
- {
- this->clear ();
- this->exception_ = ex;
- this->exception_->AddRef ();
- }
-}
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index e175d05ced2..a98ea682f9d 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -23,6 +23,34 @@ DEFINE_GUID (IID_CORBA_ORB,
DEFINE_GUID (IID_STUB_Object,
0xa201e4c7, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
+CORBA::String_var::String_var (char *p)
+ : ptr_ (p)
+{
+ // NOTE: According to the CORBA spec this string must *not* be
+ // copied, but it is non-compliant to use it/release it in the
+ // calling code. argument is consumed. p should never be NULL
+}
+
+CORBA::String_var::String_var (const CORBA::String_var& r)
+{
+ this->ptr_ = CORBA::string_dup (r.ptr_);
+}
+
+CORBA::String_var::~String_var (void)
+{
+ if (this->ptr_ != 0)
+ {
+ CORBA::string_free (this->ptr_);
+ this->ptr_ = 0;
+ }
+}
+
+TAO_Export CORBA::String
+CORBA::string_dup (const CORBA::Char *str)
+{
+ return CORBA::string_copy (str);
+}
+
CORBA_ORB::CORBA_ORB (void)
: refcount_ (1),
open_called_(CORBA::B_FALSE),
diff --git a/TAO/tao/ORB.i b/TAO/tao/ORB.i
index 714764e4df1..83d503e9dc7 100644
--- a/TAO/tao/ORB.i
+++ b/TAO/tao/ORB.i
@@ -11,12 +11,6 @@ CORBA::string_alloc (CORBA::ULong len)
return new CORBA::Char[size_t (len + 1)];
}
-ACE_INLINE TAO_Export CORBA::String
-CORBA::string_dup (const CORBA::Char *str)
-{
- return CORBA::string_copy (str);
-}
-
ACE_INLINE TAO_Export void
CORBA::string_free (CORBA::Char *str)
{
@@ -34,36 +28,11 @@ CORBA::String_var::String_var (void)
}
ACE_INLINE
-CORBA::String_var::~String_var (void)
-{
- if (this->ptr_ != 0)
- {
- CORBA::string_free (this->ptr_);
- this->ptr_ = 0;
- }
-}
-
-ACE_INLINE
-CORBA::String_var::String_var (char *p)
- : ptr_ (p)
-{
- // NOTE: According to the CORBA spec this string must *not* be
- // copied, but it is non-compliant to use it/release it in the
- // calling code. argument is consumed. p should never be NULL
-}
-
-ACE_INLINE
CORBA::String_var::String_var (const char *p)
: ptr_ (CORBA::string_dup ((char *) p))
{
}
-ACE_INLINE
-CORBA::String_var::String_var (const CORBA::String_var& r)
-{
- this->ptr_ = CORBA::string_dup (r.ptr_);
-}
-
ACE_INLINE CORBA::Char &
CORBA::String_var::operator[] (CORBA::ULong index)
{
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 331f2237697..1fe41e67f58 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -30,6 +30,39 @@ CORBA_Object::~CORBA_Object (void)
this->parent_->Release ();
}
+CORBA_Object_var::~CORBA_Object_var (void) // destructor
+{
+ CORBA::release (this->ptr_);
+}
+
+CORBA_Object_var::CORBA_Object_var (void) // default constructor
+ : ptr_ (CORBA_Object::_nil ())
+{
+}
+
+CORBA_Object::CORBA_Object (STUB_Object *protocol_proxy,
+ TAO_ServantBase *servant,
+ CORBA_Boolean collocated)
+ : servant_ (servant),
+ is_collocated_ (collocated),
+ parent_ (0),
+ refcount_ (1)
+{
+ // Notice that the refcount_ above is initialized to 1 because
+ // the semantics of CORBA Objects are such that obtaining one
+ // implicitly takes a reference.
+ this->_set_parent (protocol_proxy);
+}
+
+// CORBA dup/release build on top of COM's (why not).
+
+void
+CORBA::release (CORBA_Object_ptr obj)
+{
+ if (obj)
+ obj->Release ();
+}
+
CORBA::InterfaceDef_ptr
CORBA_Object::_get_interface (CORBA::Environment &env)
{
diff --git a/TAO/tao/Object.i b/TAO/tao/Object.i
index 984fe384342..3c4f7825194 100644
--- a/TAO/tao/Object.i
+++ b/TAO/tao/Object.i
@@ -45,15 +45,6 @@ CORBA_Object::QueryInterface (REFIID riid,
return TAO_NOERROR;
}
-// CORBA dup/release build on top of COM's (why not).
-
-ACE_INLINE void
-CORBA::release (CORBA_Object_ptr obj)
-{
- if (obj)
- obj->Release ();
-}
-
ACE_INLINE CORBA_Object_ptr
CORBA_Object::_duplicate (CORBA::Object_ptr obj)
{
@@ -92,21 +83,6 @@ CORBA_Object::_set_parent (STUB_Object *p)
ACE_ASSERT (this->parent_ != 0);
}
-ACE_INLINE
-CORBA_Object::CORBA_Object (STUB_Object *protocol_proxy,
- TAO_ServantBase *servant,
- CORBA_Boolean collocated)
- : servant_ (servant),
- is_collocated_ (collocated),
- parent_ (0),
- refcount_ (1)
-{
- // Notice that the refcount_ above is initialized to 1 because
- // the semantics of CORBA Objects are such that obtaining one
- // implicitly takes a reference.
- this->_set_parent (protocol_proxy);
-}
-
ACE_INLINE STUB_Object *
CORBA_Object::_get_parent (void) const
{
@@ -145,11 +121,6 @@ CORBA_Object::_request (const CORBA::Char *operation,
// *************************************************************
ACE_INLINE
-CORBA_Object_var::CORBA_Object_var (void) // default constructor
- : ptr_ (CORBA_Object::_nil ())
-{}
-
-ACE_INLINE
CORBA_Object_var::CORBA_Object_var (CORBA_Object_ptr p)
: ptr_ (p)
{}
@@ -165,12 +136,6 @@ CORBA_Object_var::CORBA_Object_var (const CORBA_Object_var &p) // copy construct
: ptr_ (CORBA_Object::_duplicate (p.ptr ()))
{}
-ACE_INLINE
-CORBA_Object_var::~CORBA_Object_var (void) // destructor
-{
- CORBA::release (this->ptr_);
-}
-
ACE_INLINE CORBA_Object_var &
CORBA_Object_var::operator= (CORBA_Object_ptr p)
{
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index 126c544ba08..8f1138b853a 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -14,6 +14,31 @@
#include "tao/corba.h"
+// Just fetch the 'kind' field out of the typecode.
+void *
+CORBA_TypeCode::operator new (size_t s)
+{
+ return ::operator new (s);
+}
+
+CORBA::TypeCode_ptr
+CORBA_TypeCode::_duplicate (CORBA::TypeCode_ptr tc)
+{
+ if (tc)
+ tc->AddRef ();
+ return tc;
+}
+
+CORBA_Bounds::CORBA_Bounds (void)
+ : CORBA_UserException (CORBA::_tc_Bounds)
+{
+}
+
+CORBA_BadKind::CORBA_BadKind (void)
+ : CORBA_UserException (CORBA::_tc_BadKind)
+{
+}
+
// Constructor for CONSTANT typecodes with empty parameter lists.
// These are only created once, and those constants are shared.
diff --git a/TAO/tao/Typecode.h b/TAO/tao/Typecode.h
index 61f70055ca2..3299338a53d 100644
--- a/TAO/tao/Typecode.h
+++ b/TAO/tao/Typecode.h
@@ -23,23 +23,22 @@
// Forward decl.
class CDR;
-// Two "user exceptions" are defined for manipulating TypeCodes. These two
-// classes are really to be defined inside the TypeCode class
+// Two "user exceptions" are defined for manipulating TypeCodes. These
+// two classes are really to be defined inside the TypeCode class.
+// @@ Andy, can you please explain why they aren't defined there?
//extern CORBA::TypeCode_ptr CORBA::_tc_Bounds;
class CORBA_Bounds : public CORBA_UserException
{
public:
- CORBA_Bounds (void)
- : CORBA_UserException (CORBA::_tc_Bounds) {}
+ CORBA_Bounds (void);
};
//extern CORBA::TypeCode_ptr CORBA::_tc_BadKind;
class CORBA_BadKind : public CORBA_UserException
{
public:
- CORBA_BadKind (void)
- : CORBA_UserException (CORBA::_tc_BadKind) {}
+ CORBA_BadKind (void);
};
// A TypeCode describes data. This one's as thin a wrapper around CDR
diff --git a/TAO/tao/Typecode.i b/TAO/tao/Typecode.i
index 7eb3e2a9585..084d41e4db0 100644
--- a/TAO/tao/Typecode.i
+++ b/TAO/tao/Typecode.i
@@ -20,21 +20,6 @@ CORBA_TypeCode::equal (const CORBA::TypeCode_ptr tc,
return this->private_equal (tc, env);
}
-// just fetch the 'kind' field out of the typecode
-ACE_INLINE void *
-CORBA_TypeCode::operator new (size_t s)
-{
- return ::operator new (s);
-}
-
-ACE_INLINE CORBA::TypeCode_ptr
-CORBA_TypeCode::_duplicate (CORBA::TypeCode_ptr tc)
-{
- if (tc)
- tc->AddRef ();
- return tc;
-}
-
// returns the Repository ID
ACE_INLINE const char *
CORBA_TypeCode::id (CORBA::Environment &env) const
@@ -261,3 +246,4 @@ CORBA_TypeCode_out::operator-> (void)
{
return this->ptr_;
}
+