summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-24 13:28:35 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-24 13:28:35 +0000
commit098294d3ff4a69abb8fb7d023db325297f7e43af (patch)
tree4353df24a7f8e3e9a0a6fb49eb3b45d6fd7ea05c
parent6a0480358b46379cadd77498043c3ad69f57cb8e (diff)
downloadATCD-098294d3ff4a69abb8fb7d023db325297f7e43af.tar.gz
#include the .i file in the .h/.cpp file instead of corba.h
-rw-r--r--TAO/tao/Any.cpp4
-rw-r--r--TAO/tao/Any.h21
-rw-r--r--TAO/tao/Makefile1
-rw-r--r--TAO/tao/NVList.cpp22
-rw-r--r--TAO/tao/NVList.h4
-rw-r--r--TAO/tao/NVList.i13
-rw-r--r--TAO/tao/ORB.h16
-rw-r--r--TAO/tao/ORB_Core.cpp4
-rw-r--r--TAO/tao/ORB_Core.h21
-rw-r--r--TAO/tao/Stub.cpp7
-rw-r--r--TAO/tao/Stub.h4
-rw-r--r--TAO/tao/Stub.i2
-rw-r--r--TAO/tao/Typecode.cpp8
-rw-r--r--TAO/tao/Typecode.h6
-rw-r--r--TAO/tao/corba.h26
15 files changed, 106 insertions, 53 deletions
diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp
index c47debb254d..215a18e486b 100644
--- a/TAO/tao/Any.cpp
+++ b/TAO/tao/Any.cpp
@@ -34,6 +34,10 @@
#include "tao/corba.h"
+#if !defined (__ACE_INLINE__)
+# include "tao/Any.i"
+#endif /* ! __ACE_INLINE__ */
+
CORBA::TypeCode_ptr
CORBA_Any::type (void) const
{
diff --git a/TAO/tao/Any.h b/TAO/tao/Any.h
index 4b5d7979c59..85601218be0 100644
--- a/TAO/tao/Any.h
+++ b/TAO/tao/Any.h
@@ -1,4 +1,5 @@
// This may look like C, but it's really -*- C++ -*-
+// $Id$
// ============================================================================
//
@@ -64,8 +65,8 @@ public:
// Default constructor.
CORBA_Any (CORBA::TypeCode_ptr type,
- void *value = 0,
- CORBA::Boolean any_owns_data = CORBA::B_FALSE);
+ void *value = 0,
+ CORBA::Boolean any_owns_data = CORBA::B_FALSE);
// Constructor. The any_owns_data flag determines if the Any owns the value
CORBA_Any (const CORBA_Any &a);
@@ -159,7 +160,7 @@ public:
{
from_string (char* s,
CORBA::ULong b,
- CORBA::Boolean nocopy = CORBA::B_FALSE);
+ CORBA::Boolean nocopy = CORBA::B_FALSE);
char *val_;
CORBA::ULong bound_;
CORBA::Boolean nocopy_;
@@ -246,15 +247,15 @@ public:
// parameter, two forms of the replace method are provided.
void replace (CORBA::TypeCode_ptr type,
- const void *value,
- CORBA::Boolean any_owns_data,
- CORBA::Environment &env);
+ const void *value,
+ CORBA::Boolean any_owns_data,
+ CORBA::Environment &env);
// Replace the current typecode and data with the specified one -
// unsafe.
void replace (CORBA::TypeCode_ptr type,
- const void *value,
- CORBA::Environment &env);
+ const void *value,
+ CORBA::Environment &env);
// Replace the current typecode and data with the specified one -
// unsafe. This uses a default value for the "any_owns_data" parameter
@@ -382,4 +383,8 @@ private:
// assignment from _var disallowed
};
+#if defined (__ACE_INLINE__)
+# include "tao/Any.i"
+#endif /* __ACE_INLINE__ */
+
#endif /* TAO_ANY_H */
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile
index 0e3ae3c441c..d855d63ab58 100644
--- a/TAO/tao/Makefile
+++ b/TAO/tao/Makefile
@@ -29,6 +29,7 @@ ORBCORE_SRCS = \
Request \
Sequence \
Server_Request \
+ Stub \
Typecode \
Arg_Shifter \
CDR \
diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp
index 580d828cce5..a6808686f8a 100644
--- a/TAO/tao/NVList.cpp
+++ b/TAO/tao/NVList.cpp
@@ -1,9 +1,13 @@
-// This may look like C, but it's really -*- C++ -*-
+// $Id$
// Implementation of Named Value List and NamedValue classes
#include "tao/corba.h"
+#if !defined (__ACE_INLINE__)
+# include "tao/NVList.i"
+#endif /* ! __ACE_INLINE__ */
+
CORBA::ULong
CORBA_NamedValue::AddRef (void)
{
@@ -273,3 +277,19 @@ CORBA_NVList::add_element (CORBA::Flags flags, CORBA::Environment &env)
return 1; // success
}
+
+// This was inline, but didn't survive the removal of .i #includes
+// from corba.h. env.exception wasn't known. Maybe the circular
+// #includes between corba.h and ORB.h need to be removed.
+CORBA::NamedValue_ptr
+CORBA_NVList::item (CORBA::ULong n, CORBA::Environment &env)
+{
+ env.clear ();
+ if (n >= this->max_) // 0 based indexing
+ {
+ env.exception (new CORBA::TypeCode::Bounds ());
+ return 0;
+ }
+ else
+ return &this->values_ [n];
+}
diff --git a/TAO/tao/NVList.h b/TAO/tao/NVList.h
index 5dff27b1220..36ab8139896 100644
--- a/TAO/tao/NVList.h
+++ b/TAO/tao/NVList.h
@@ -157,4 +157,8 @@ private:
friend class CORBA_Request;
};
+#if defined (__ACE_INLINE__)
+# include "tao/NVList.i"
+#endif /* __ACE_INLINE__ */
+
#endif /* TAO_NVLIST_H */
diff --git a/TAO/tao/NVList.i b/TAO/tao/NVList.i
index 9cf97b1efcb..ae46118499b 100644
--- a/TAO/tao/NVList.i
+++ b/TAO/tao/NVList.i
@@ -48,16 +48,3 @@ CORBA_NVList::count (void) const
{
return this->max_;
}
-
-ACE_INLINE CORBA::NamedValue_ptr
-CORBA_NVList::item (CORBA::ULong n, CORBA::Environment &env)
-{
- env.clear ();
- if (n >= this->max_) // 0 based indexing
- {
- env.exception (new CORBA::TypeCode::Bounds ());
- return 0;
- }
- else
- return &this->values_ [n];
-}
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index 2fdf69ef4cb..21492794f42 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -35,7 +35,7 @@ typedef enum
{
TAO_SERVICEID_NAMESERVICE,
TAO_SERVICEID_TRADINGSERVICE
-} TAO_Service_ID;
+} TAO_Service_ID;
// For some reason, PC compilers don't implement "natural" alignment,
// but only use fixed alignment policies. The following #pragmas
@@ -747,12 +747,12 @@ public:
// can be used for initialization or in comparisons.
virtual CORBA::Object_ptr string_to_object (CORBA::String str,
- CORBA::Environment &env) = 0;
+ CORBA::Environment &env) = 0;
// Turn a string-ified object reference back into an object pointer.
// Each type of ORB, e.g. an IIOP ORB, must implement this.
// Typically these strings are created using <object_to_string()>.
virtual CORBA::String object_to_string (CORBA::Object_ptr obj,
- CORBA::Environment &env) = 0;
+ CORBA::Environment &env) = 0;
// Turn an object reference into a string. Each type of ORB,
// e.g. an IIOP ORB, must implement this. This can be used by
// servers to publish their whereabouts to clients. The output of
@@ -873,15 +873,15 @@ private:
// Resolve the trading object reference.
CORBA_Object_ptr multicast_to_service (TAO_Service_ID service_id,
- u_short port);
+ u_short port);
// Resolve the refernce of a service of type <name>.
-
+
CORBA_Object_ptr resolve_poa (void);
// Resolve the POA.
-
+
CORBA_Object_ptr resolve_poa_current (void);
// Resolve the POA current.
-
+
ACE_SYNCH_MUTEX lock_;
u_int refcount_;
ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::Boolean> open_called_;
@@ -906,7 +906,7 @@ private:
CORBA_Object_ptr trading_service_;
// If this is non-_nil(), then this is the object reference to our
// configured Trading.
-
+
// = NON-PROVIDED METHODS
CORBA_ORB (const CORBA_ORB &);
CORBA_ORB &operator= (const CORBA_ORB &);
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index f6e9a6d5eaf..bffe54d92af 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -8,6 +8,10 @@
#include "tao/TAO_Internal.h"
#include "tao/Arg_Shifter.h"
+#if !defined (__ACE_INLINE__)
+# include "tao/ORB_Core.i"
+#endif /* ! __ACE_INLINE__ */
+
typedef ACE_TSS_Singleton<TAO_ORB_Core, ACE_SYNCH_MUTEX>
TAO_ORB_CORE;
diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h
index 363e93df621..b86f4b74685 100644
--- a/TAO/tao/ORB_Core.h
+++ b/TAO/tao/ORB_Core.h
@@ -1,4 +1,5 @@
// This may look like C, but it's really -*- C++ -*-
+// $Id$
// ============================================================================
//
@@ -11,8 +12,6 @@
// = AUTHOR
// Chris Cleeland
//
-// = VERSION
-// $Id$
// ============================================================================
#if !defined (TAO_ORB_CORE_H)
@@ -21,15 +20,15 @@
# include "tao/corba.h"
typedef ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
- TAO_CONNECTOR;
+ TAO_CONNECTOR;
typedef ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler,
- ACE_SOCK_CONNECTOR,
- ACE_SYNCH_RW_MUTEX>
+ ACE_SOCK_CONNECTOR,
+ ACE_SYNCH_RW_MUTEX>
TAO_CACHED_CONNECT_STRATEGY;
typedef ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>
- TAO_NULL_CREATION_STRATEGY;
+ TAO_NULL_CREATION_STRATEGY;
typedef ACE_NOOP_Concurrency_Strategy<TAO_Client_Connection_Handler>
TAO_NULL_ACTIVATION_STRATEGY;
@@ -52,9 +51,9 @@ class TAO_Export TAO_ORB_Core
// model).
friend class CORBA_ORB;
friend CORBA::ORB_ptr CORBA::ORB_init (int &,
- char * const*,
- const char *,
- CORBA::Environment &);
+ char * const*,
+ const char *,
+ CORBA::Environment &);
public:
// = Initialization and termination methods.
TAO_ORB_Core (void);
@@ -411,6 +410,10 @@ private:
TSS_APP_ALLOCATED;
};
+#if defined (__ACE_INLINE__)
+# include "tao/ORB_Core.i"
+#endif /* __ACE_INLINE__ */
+
ACE_FACTORY_DECLARE (TAO, TAO_Resource_Factory)
extern TAO_Export TAO_ORB_Core *TAO_ORB_Core_instance (void);
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
new file mode 100644
index 00000000000..80f4731f02f
--- /dev/null
+++ b/TAO/tao/Stub.cpp
@@ -0,0 +1,7 @@
+// $Id$
+
+#include "tao/corba.h"
+
+#if !defined (__ACE_INLINE__)
+# include "tao/Stub.i"
+#endif /* ! __ACE_INLINE__ */
diff --git a/TAO/tao/Stub.h b/TAO/tao/Stub.h
index 73553e2b4d6..916082a8c78 100644
--- a/TAO/tao/Stub.h
+++ b/TAO/tao/Stub.h
@@ -260,4 +260,8 @@ private:
ACE_UNIMPLEMENTED_FUNC (STUB_Object &operator = (const STUB_Object &))
};
+#if defined (__ACE_INLINE__)
+# include "tao/Stub.i"
+#endif /* __ACE_INLINE__ */
+
#endif /* TAO_STUB_H */
diff --git a/TAO/tao/Stub.i b/TAO/tao/Stub.i
index bbe545413af..94264e0a703 100644
--- a/TAO/tao/Stub.i
+++ b/TAO/tao/Stub.i
@@ -1,3 +1,5 @@
+// $Id$
+
ACE_INLINE
STUB_Object::STUB_Object (char *p)
: type_id (p)
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index 8f1138b853a..7c12a38ecfd 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -14,6 +14,10 @@
#include "tao/corba.h"
+#if !defined (__ACE_INLINE__)
+# include "tao/Typecode.i"
+#endif /* ! __ACE_INLINE__ */
+
// Just fetch the 'kind' field out of the typecode.
void *
CORBA_TypeCode::operator new (size_t s)
@@ -30,12 +34,12 @@ CORBA_TypeCode::_duplicate (CORBA::TypeCode_ptr tc)
}
CORBA_Bounds::CORBA_Bounds (void)
- : CORBA_UserException (CORBA::_tc_Bounds)
+ : CORBA_UserException (CORBA::_tc_Bounds)
{
}
CORBA_BadKind::CORBA_BadKind (void)
- : CORBA_UserException (CORBA::_tc_BadKind)
+ : CORBA_UserException (CORBA::_tc_BadKind)
{
}
diff --git a/TAO/tao/Typecode.h b/TAO/tao/Typecode.h
index 3299338a53d..8959c516ee6 100644
--- a/TAO/tao/Typecode.h
+++ b/TAO/tao/Typecode.h
@@ -149,7 +149,7 @@ public:
size_t length,
char *buffer,
CORBA::Boolean orb_owns_tc,
- CORBA::TypeCode_ptr parent = 0);
+ CORBA::TypeCode_ptr parent = 0);
// This constructor is used both for typecode constants and for
// heap-allocated TypeCodes. The two are distinguished by the
// orb_owns_tc flag passed in by the creator.
@@ -508,4 +508,8 @@ private:
CORBA_TypeCode_ptr &ptr_;
};
+#if defined (__ACE_INLINE__)
+# include "tao/Typecode.i"
+#endif /* __ACE_INLINE__ */
+
#endif /* TAO_TYPECODE_H */
diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h
index 2d0795b1e0e..64ccc6c29ce 100644
--- a/TAO/tao/corba.h
+++ b/TAO/tao/corba.h
@@ -81,15 +81,15 @@
// configure fixed one-byte alignment policy, since some fixed policy
// needs to apply throughout an ORB.
-#if defined (_MSC_VER)
-# pragma pack (push, 1) // VC++, stack 1-byte alignment policy
+#if defined (_MSC_VER)
+# pragma pack (push, 1) // VC++, stack 1-byte alignment policy
-# ifdef _DEBUG // convert from VC++ convention ...
-# define DEBUG // ... to normal convention
-# endif
+# ifdef _DEBUG // convert from VC++ convention ...
+# define DEBUG // ... to normal convention
+# endif
-#elif defined (__BORLANDC__)
-# pragma option -a // BC++, use 1 byte alignment
+#elif defined (__BORLANDC__)
+# pragma option -a // BC++, use 1 byte alignment
#endif /* _MSC_VER */
@@ -141,7 +141,7 @@ class CORBA_String_var;
typedef u_int CORBA_Flags;
typedef void (*TAO_Skeleton)(CORBA_ServerRequest &,
- // CORBA_Object_ptr,
+ // CORBA_Object_ptr,
void *,
void *,
CORBA_Environment &);
@@ -149,8 +149,8 @@ typedef void (*TAO_Skeleton)(CORBA_ServerRequest &,
// NOTE: stub APIs are nonportable, and must be explicitly #included
// by code emitted from an IDL compiler.
-#if defined (_MSC_VER)
-# pragma pack (pop) // VC++, goes back to other padding rules
+#if defined (_MSC_VER)
+# pragma pack (pop) // VC++, goes back to other padding rules
#endif /* _MSC_VER */
// Alignment macros
@@ -162,6 +162,7 @@ typedef void (*TAO_Skeleton)(CORBA_ServerRequest &,
typedef TAO_Unbounded_Sequence<CORBA::Octet> TAO_opaque;
extern CORBA::TypeCode TC_opaque;
+#include "tao/Exception.h"
#include "tao/Any.h"
#include "tao/params.h"
@@ -170,7 +171,6 @@ extern CORBA::TypeCode TC_opaque;
#include "tao/default_client.h"
#include "tao/default_server.h"
-#include "tao/Exception.h"
#include "tao/NVList.h"
#include "tao/Object.h"
#include "tao/Principal.h"
@@ -211,16 +211,20 @@ extern TAO_Export int operator== (const TAO_ObjectKey &l,
# define do_undef_on_ACE_INLINE
# endif
+#if 0 /* These are now #included by their .h/.cpp files. */
#include "tao/ORB_Core.i"
#include "tao/Typecode.i"
#include "tao/NVList.i"
#include "tao/Any.i"
#include "tao/Stub.i"
+#endif /* 0 */
+
#include "tao/Object.i"
#include "tao/ORB.i"
#include "tao/Marshal.i"
#include "tao/CDR.i"
#include "tao/GIOP.i"
+
#include "tao/IIOP_ORB.i"
#include "tao/IIOP_Object.i"
#include "tao/Server_Request.i"