summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-26 12:28:40 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-26 12:28:40 +0000
commit91b0f7798a401310b5d03bd224abd08301e4d4f8 (patch)
tree7b5f7a76d6e975a84425aa45aac77379d7773236
parent9e2ec06c5577ecb3e560d1d158413a5c7d95082e (diff)
downloadATCD-91b0f7798a401310b5d03bd224abd08301e4d4f8.tar.gz
#include the .i file in the .h/.cpp files instead of corba.h
-rw-r--r--TAO/tao/Marshal.cpp108
-rw-r--r--TAO/tao/Marshal.h19
-rw-r--r--TAO/tao/ORB.cpp6
-rw-r--r--TAO/tao/ORB.h6
-rw-r--r--TAO/tao/ORB.i12
-rw-r--r--TAO/tao/Object.cpp22
-rw-r--r--TAO/tao/Object.h5
-rw-r--r--TAO/tao/corba.h10
8 files changed, 112 insertions, 76 deletions
diff --git a/TAO/tao/Marshal.cpp b/TAO/tao/Marshal.cpp
index adb7601a0e6..15939e72f16 100644
--- a/TAO/tao/Marshal.cpp
+++ b/TAO/tao/Marshal.cpp
@@ -1,8 +1,10 @@
+// $Id$
+
// ============================================================================
//
// = LIBRARY
// TAO
-//
+//
// = FILENAME
// marshal.cpp
//
@@ -14,13 +16,17 @@
//
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems Inc.
-// and
+// and
// Aniruddha Gokhale
-//
+//
// ============================================================================
#include "tao/corba.h"
+#if !defined (__ACE_INLINE__)
+# include "tao/Marshal.i"
+#endif /* ! __ACE_INLINE__ */
+
TAO_Marshal_Factory* TAO_Marshal::DEFAULT_MARSHAL_FACTORY = 0;
void
@@ -87,59 +93,59 @@ TAO_Marshal_Factory::~TAO_Marshal_Factory (void)
//
// Based on the kind of the typecode, return the appropriate marshal object
TAO_Marshal_Object* TAO_Marshal_Factory::make_marshal_object (CORBA::TypeCode_ptr tc,
- CORBA::Environment &env)
+ CORBA::Environment &env)
{
env.clear ();
if (tc)
{
switch (tc->kind_)
- {
- case CORBA::tk_null:
- case CORBA::tk_void:
- case CORBA::tk_short:
- case CORBA::tk_ushort:
- case CORBA::tk_long:
- case CORBA::tk_ulong:
- case CORBA::tk_float:
- case CORBA::tk_enum:
- case CORBA::tk_double:
- case CORBA::tk_longlong:
- case CORBA::tk_ulonglong:
- case CORBA::tk_boolean:
- case CORBA::tk_char:
- case CORBA::tk_octet:
- case CORBA::tk_longdouble:
- case CORBA::tk_wchar:
- return m_primitive_;
- case CORBA::tk_any:
- return m_any_;
- case CORBA::tk_TypeCode:
- return m_typecode_;
- case CORBA::tk_Principal:
- return m_principal_;
- case CORBA::tk_objref:
- return m_objref_;
- case CORBA::tk_struct:
- return m_struct_;
- case CORBA::tk_union:
- return m_union_;
- case CORBA::tk_string:
- return m_string_;
- case CORBA::tk_sequence:
- return m_sequence_;
- case CORBA::tk_array:
- return m_array_;
- case CORBA::tk_alias:
- return m_alias_;
- case CORBA::tk_except:
- return m_except_;
- case CORBA::tk_wstring:
- return m_wstring_;
- default:
- // anything else is an error
- env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
- return (TAO_Marshal_Object *)0;
- }
+ {
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ case CORBA::tk_boolean:
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ case CORBA::tk_longdouble:
+ case CORBA::tk_wchar:
+ return m_primitive_;
+ case CORBA::tk_any:
+ return m_any_;
+ case CORBA::tk_TypeCode:
+ return m_typecode_;
+ case CORBA::tk_Principal:
+ return m_principal_;
+ case CORBA::tk_objref:
+ return m_objref_;
+ case CORBA::tk_struct:
+ return m_struct_;
+ case CORBA::tk_union:
+ return m_union_;
+ case CORBA::tk_string:
+ return m_string_;
+ case CORBA::tk_sequence:
+ return m_sequence_;
+ case CORBA::tk_array:
+ return m_array_;
+ case CORBA::tk_alias:
+ return m_alias_;
+ case CORBA::tk_except:
+ return m_except_;
+ case CORBA::tk_wstring:
+ return m_wstring_;
+ default:
+ // anything else is an error
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return (TAO_Marshal_Object *)0;
+ }
}
else
{
diff --git a/TAO/tao/Marshal.h b/TAO/tao/Marshal.h
index 30ca9a3d729..ca932a6662e 100644
--- a/TAO/tao/Marshal.h
+++ b/TAO/tao/Marshal.h
@@ -1,4 +1,5 @@
// This may look like C, but it's really -*- C++ -*-
+// $Id$
// ============================================================================
//
@@ -21,15 +22,15 @@
CORBA::TypeCode::traverse_status
DEEP_COPY (CORBA::TypeCode_ptr param,
- const void *source,
- const void *dest,
- CORBA::Environment &env);
+ const void *source,
+ const void *dest,
+ CORBA::Environment &env);
CORBA::TypeCode::traverse_status
DEEP_FREE (CORBA::TypeCode_ptr param,
- const void *source,
- const void *dest,
- CORBA::Environment &env);
+ const void *source,
+ const void *dest,
+ CORBA::Environment &env);
// = Forward declarations.
class TAO_Marshal_Object;
@@ -61,7 +62,7 @@ public:
// destructor
virtual TAO_Marshal_Object *make_marshal_object (CORBA::TypeCode_ptr tc,
- CORBA::Environment &env);
+ CORBA::Environment &env);
// Factory method that returns the appropriate marshal object.
private:
@@ -519,4 +520,8 @@ public:
CORBA::Environment &env);
};
+#if defined (__ACE_INLINE__)
+# include "tao/Marshal.i"
+#endif /* __ACE_INLINE__ */
+
#endif /* TAO_MARSHAL_H */
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index b9ab07e7d0b..3fa0f16fff7 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -13,6 +13,12 @@
#include "tao/TAO_Internal.h"
#include "tao/Timeprobe.h"
+#if 0
+#if !defined (__ACE_INLINE__)
+# include "tao/ORB.i"
+#endif /* ! __ACE_INLINE__ */
+#endif
+
// COM's IUnknown support
// {A201E4C7-F258-11ce-9598-0000C07CA898}
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index 5a6475179f0..18e892cae2f 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -960,6 +960,12 @@ private:
CORBA::ORB_ptr &ptr_;
};
+#if 0
+#if defined (__ACE_INLINE__)
+# include "tao/ORB.i"
+#endif /* __ACE_INLINE__ */
+#endif
+
// Signature of a skeleton for every operation of an interface.
typedef void (*TAO_Skeleton)(CORBA::ServerRequest &,
void *, // object_ptr
diff --git a/TAO/tao/ORB.i b/TAO/tao/ORB.i
index 83d503e9dc7..85e0cdba043 100644
--- a/TAO/tao/ORB.i
+++ b/TAO/tao/ORB.i
@@ -215,12 +215,12 @@ CORBA_ORB::shutdown (CORBA::Boolean wait_for_completion)
ACE_INLINE
CORBA_ORB_var::CORBA_ORB_var (void) // default constructor
- : ptr_ (CORBA_ORB::_nil ())
+ : ptr_ (CORBA_ORB::_nil ())
{}
ACE_INLINE
CORBA_ORB_var::CORBA_ORB_var (CORBA::ORB_ptr p)
- : ptr_ (p)
+ : ptr_ (p)
{}
ACE_INLINE CORBA::ORB_ptr
@@ -231,7 +231,7 @@ CORBA_ORB_var::ptr (void) const
ACE_INLINE
CORBA_ORB_var::CORBA_ORB_var (const CORBA_ORB_var &p) // copy constructor
- : ptr_ (CORBA_ORB::_duplicate (p.ptr ()))
+ : ptr_ (CORBA_ORB::_duplicate (p.ptr ()))
{}
ACE_INLINE
@@ -312,14 +312,14 @@ CORBA_ORB_var::_retn (void)
ACE_INLINE
CORBA_ORB_out::CORBA_ORB_out (CORBA::ORB_ptr &p)
- : ptr_ (p)
+ : ptr_ (p)
{
this->ptr_ = CORBA_ORB::_nil ();
}
ACE_INLINE
CORBA_ORB_out::CORBA_ORB_out (CORBA_ORB_var &p) // constructor from _var
- : ptr_ (p.out ())
+ : ptr_ (p.out ())
{
CORBA::release (this->ptr_);
this->ptr_ = CORBA_ORB::_nil ();
@@ -327,7 +327,7 @@ CORBA_ORB_out::CORBA_ORB_out (CORBA_ORB_var &p) // constructor from _var
ACE_INLINE
CORBA_ORB_out::CORBA_ORB_out (CORBA_ORB_out &p) // copy constructor
- : ptr_ (p.ptr_)
+ : ptr_ (p.ptr_)
{}
ACE_INLINE CORBA_ORB_out &
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 70bb726a71f..4234c02e10c 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -3,10 +3,14 @@
// Copyright 1994-1995 by Sun Microsystems Inc.
// All Rights Reserved
//
-// ORB: CORBA_Object operations
+// ORB: CORBA_Object operations
#include "tao/corba.h"
+#if !defined (__ACE_INLINE__)
+# include "tao/Object.i"
+#endif /* ! __ACE_INLINE__ */
+
// GET_INTERFACE ... send a simple call to the object, it returns
// an InterfaceDef objref.
@@ -112,7 +116,7 @@ static const TAO_Call_Data Object_is_a_calldata =
CORBA::Boolean
CORBA_Object::_is_a (const CORBA::Char *type_id,
- CORBA::Environment &env)
+ CORBA::Environment &env)
{
// If the object is collocated then try locally....
if (this->is_collocated_ && this->servant_ != 0)
@@ -123,7 +127,7 @@ CORBA_Object::_is_a (const CORBA::Char *type_id,
STUB_Object *istub;
if (QueryInterface (IID_STUB_Object,
- (void **) &istub) != TAO_NOERROR)
+ (void **) &istub) != TAO_NOERROR)
{
env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return CORBA::B_FALSE;
@@ -202,10 +206,10 @@ CORBA::ImplementationDef_ptr
CORBA_Object::_get_implementation (CORBA::Environment &env)
{
STUB_Object *istub;
- CORBA::ImplementationDef_ptr retval = 0;
+ CORBA::ImplementationDef_ptr retval = 0;
if (QueryInterface (IID_STUB_Object,
- (void **) &istub) != TAO_NOERROR)
+ (void **) &istub) != TAO_NOERROR)
{
env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return retval;
@@ -239,7 +243,7 @@ CORBA_Object::_non_existent (CORBA::Environment &env)
STUB_Object *istub;
if (QueryInterface (IID_STUB_Object,
- (void **) &istub) != TAO_NOERROR)
+ (void **) &istub) != TAO_NOERROR)
{
env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return CORBA::B_FALSE;
@@ -283,7 +287,7 @@ CORBA_Object::_hash (CORBA::ULong maximum,
STUB_Object *istub;
if (QueryInterface (IID_STUB_Object,
- (void **) &istub) != TAO_NOERROR)
+ (void **) &istub) != TAO_NOERROR)
{
env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return CORBA::B_FALSE;
@@ -312,7 +316,7 @@ CORBA_Object::_is_equivalent (CORBA_Object_ptr other_obj,
}
if (QueryInterface (IID_STUB_Object,
- (void **) &istub) != TAO_NOERROR)
+ (void **) &istub) != TAO_NOERROR)
{
env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return CORBA::B_FALSE;
@@ -330,7 +334,7 @@ CORBA::Object::_key (CORBA::Environment &env)
STUB_Object *istub;
if (QueryInterface (IID_STUB_Object,
- (void **) &istub) != TAO_NOERROR)
+ (void **) &istub) != TAO_NOERROR)
{
env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return 0;
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 4be79c04f44..6f35b1c971b 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -1,4 +1,5 @@
// This may look like C, but it's really -*- C++ -*-
+// $Id$
// ============================================================================
//
@@ -196,4 +197,8 @@ private:
CORBA::Object_ptr &ptr_;
};
+#if defined (__ACE_INLINE__)
+# include "tao/Object.i"
+#endif /* __ACE_INLINE__ */
+
#endif /* CORBA_OBJECT_H */
diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h
index 64ccc6c29ce..0a97d0394e9 100644
--- a/TAO/tao/corba.h
+++ b/TAO/tao/corba.h
@@ -172,16 +172,16 @@ extern CORBA::TypeCode TC_opaque;
#include "tao/default_server.h"
#include "tao/NVList.h"
-#include "tao/Object.h"
#include "tao/Principal.h"
#include "tao/Request.h"
+#include "tao/Stub.h"
+#include "tao/Object.h"
#include "tao/Server_Request.h"
#include "tao/Typecode.h"
// Marshaling
#include "tao/Marshal.h"
#include "tao/CDR.h"
-#include "tao/Stub.h"
#include "tao/POA.h"
@@ -217,11 +217,15 @@ extern TAO_Export int operator== (const TAO_ObjectKey &l,
#include "tao/NVList.i"
#include "tao/Any.i"
#include "tao/Stub.i"
+#include "tao/Object.i"
#endif /* 0 */
-#include "tao/Object.i"
#include "tao/ORB.i"
+
+#if 0 /* These are now #included by their .h/.cpp files. */
#include "tao/Marshal.i"
+#endif /* 0 */
+
#include "tao/CDR.i"
#include "tao/GIOP.i"