summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1997-08-10 14:26:42 +0000
committergokhale <asgokhale@users.noreply.github.com>1997-08-10 14:26:42 +0000
commit80c1e04971df82da8c86b0e3ec5da4c33c8e9244 (patch)
treee610063c5af218d4030bb5ca8b8bd450cb9c8949 /TAO
parent77c27dd455853fa54768f27ab2f9cb59d24c7dce (diff)
downloadATCD-80c1e04971df82da8c86b0e3ec5da4c33c8e9244.tar.gz
CORBA_ to CORBA:: transformation. All files changed.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/Makefile8
-rw-r--r--TAO/tao/any.cpp346
-rw-r--r--TAO/tao/any.h183
-rw-r--r--TAO/tao/any.i148
-rw-r--r--TAO/tao/boa.cpp49
-rw-r--r--TAO/tao/boa.h89
-rw-r--r--TAO/tao/boa.i2
-rw-r--r--TAO/tao/client_factory.cpp4
-rw-r--r--TAO/tao/client_factory.h8
-rw-r--r--TAO/tao/client_factory.i4
-rw-r--r--TAO/tao/connect.h6
-rw-r--r--TAO/tao/corba.h108
-rw-r--r--TAO/tao/corbacom.cpp92
-rw-r--r--TAO/tao/corbacom.h585
-rw-r--r--TAO/tao/debug.cpp10
-rw-r--r--TAO/tao/decode.cpp1260
-rw-r--r--TAO/tao/deep_copy.cpp916
-rw-r--r--TAO/tao/deep_free.cpp690
-rw-r--r--TAO/tao/default_client.cpp8
-rw-r--r--TAO/tao/default_client.h3
-rw-r--r--TAO/tao/default_server.cpp8
-rw-r--r--TAO/tao/default_server.h6
-rw-r--r--TAO/tao/encode.cpp1058
-rw-r--r--TAO/tao/except.cpp122
-rw-r--r--TAO/tao/except.h82
-rw-r--r--TAO/tao/factories.cpp6
-rw-r--r--TAO/tao/factories.h141
-rw-r--r--TAO/tao/factories.i4
-rw-r--r--TAO/tao/giop.cpp214
-rw-r--r--TAO/tao/giop.h69
-rw-r--r--TAO/tao/iiopobj.cpp48
-rw-r--r--TAO/tao/iiopobj.h50
-rw-r--r--TAO/tao/iiopobj.i2
-rw-r--r--TAO/tao/iioporb.cpp78
-rw-r--r--TAO/tao/iioporb.h24
-rw-r--r--TAO/tao/iioporb.i6
-rw-r--r--TAO/tao/interp.cpp528
-rw-r--r--TAO/tao/invoke.cpp58
-rw-r--r--TAO/tao/marshal.cpp128
-rw-r--r--TAO/tao/marshal.h249
-rw-r--r--TAO/tao/marshal.i124
-rw-r--r--TAO/tao/nvlist.cpp54
-rw-r--r--TAO/tao/nvlist.h75
-rw-r--r--TAO/tao/objtable.cpp79
-rw-r--r--TAO/tao/objtable.h68
-rw-r--r--TAO/tao/optable.cpp44
-rw-r--r--TAO/tao/optable.h38
-rw-r--r--TAO/tao/orbobj.cpp127
-rw-r--r--TAO/tao/orbobj.h62
-rw-r--r--TAO/tao/orbobj.i22
-rw-r--r--TAO/tao/params.cpp4
-rw-r--r--TAO/tao/params.h38
-rw-r--r--TAO/tao/params.i11
-rw-r--r--TAO/tao/principa.cpp12
-rw-r--r--TAO/tao/principa.h14
-rw-r--r--TAO/tao/request.cpp54
-rw-r--r--TAO/tao/request.h50
-rw-r--r--TAO/tao/roa.cpp110
-rw-r--r--TAO/tao/roa.h52
-rw-r--r--TAO/tao/roa.i4
-rw-r--r--TAO/tao/sequence.h10
-rw-r--r--TAO/tao/server_factory.cpp4
-rw-r--r--TAO/tao/server_factory.h7
-rw-r--r--TAO/tao/server_factory.i1
-rw-r--r--TAO/tao/svrrqst.cpp46
-rw-r--r--TAO/tao/svrrqst.h89
-rw-r--r--TAO/tao/svrrqst.i6
-rw-r--r--TAO/tao/tc_const.cpp102
-rw-r--r--TAO/tao/typecode.cpp616
-rw-r--r--TAO/tao/typecode.h291
-rw-r--r--TAO/tao/typecode.i113
71 files changed, 5314 insertions, 4413 deletions
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile
index a665b817aa3..2415ac779c7 100644
--- a/TAO/tao/Makefile
+++ b/TAO/tao/Makefile
@@ -12,7 +12,7 @@ SHLIB = $(LIBNAME).so
# These are components that are only headers and must be installed
CORBA_HDRS = orb sequence stub orbconf objtable optable $(CORBA_SRCS)
CORBA_SRCS = any corbacom except nvlist object orbobj principa \
- request svrrqst boa typecode optable
+ request svrrqst boa typecode
# These are components that are only headers and must be installed
OTHERS_HDRS = align cdr giop iiopobj iioporb xdr roa connect params marshal debug \
@@ -32,8 +32,8 @@ OTHERS_SRCS = \
server_factory \
client_factory \
objtable \
+ optable \
connect \
- xdr \
cdr \
debug \
interp \
@@ -65,7 +65,7 @@ LDLIBS = -lACE
LIBS = -lACE
VLDLIBS = $(LDLIBS:%=%$(VAR))
-BUILD = $(VSHLIB) $(VBIN)
+BUILD = $(VSHLIB) $(VLIB) $(VBIN)
#----------------------------------------------------------------------------
@@ -88,7 +88,7 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
#RLDFLAGS := $(subst -L,-Wl\,-rpath ,$(LDFLAGS))
#CPPFLAGS += -D__IIOP_BUILD -I$(COMPATDIR) -DDEBUG
-CPPFLAGS += -I$(TAO_ROOT) -I$(COMPATDIR)
+CPPFLAGS += -I$(TAO_ROOT) -I$(COMPATDIR) #-H
LDFLAGS += $(RLDFLAGS)
INSINC = ../proto/include
diff --git a/TAO/tao/any.cpp b/TAO/tao/any.cpp
index 64dc68815c8..b33c111c318 100644
--- a/TAO/tao/any.cpp
+++ b/TAO/tao/any.cpp
@@ -32,10 +32,9 @@
// COM NOTE: Yes, this is a utility data type whose implementation is
// fully exposed. Factories for these are not normally used in C++.
-#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
-#include <objbase.h>
-#include <initguid.h>
+#include "tao/corba.h"
+#if 0
#include "tao/orb.h"
#include "tao/cdr.h"
#include "tao/debug.h"
@@ -43,17 +42,18 @@
#if !defined (__ACE_INLINE__)
# include "any.i"
#endif /* __ACE_INLINE__ */
+#endif /* 0 */
-CORBA_TypeCode_ptr
+CORBA::TypeCode_ptr
CORBA_Any::type (void) const
{
- return _type;
+ return type_;
}
-void *
+const void *
CORBA_Any::value (void) const
{
- return _value;
+ return value_;
}
// Default "Any" constructor -- initializes to nulls per the
@@ -64,9 +64,9 @@ CORBA_Any::value (void) const
CORBA_Any::CORBA_Any (void)
{
- _type = _tc_CORBA_Null;
- _value = 0;
- _orb_owns_data = CORBA_B_FALSE;
+ type_ = CORBA::_tc_null;
+ value_ = 0;
+ orb_owns_data_ = CORBA::B_FALSE;
refcount_ = 1;
}
@@ -74,14 +74,14 @@ CORBA_Any::CORBA_Any (void)
// typecode, and either holds or "consumes" an arbitrary data
// value satisfying the normal binary interface rules.
-CORBA_Any::CORBA_Any (CORBA_TypeCode_ptr tc,
+CORBA_Any::CORBA_Any (CORBA::TypeCode_ptr tc,
void *value,
- CORBA_Boolean orb_owns_data)
+ CORBA::Boolean orb_owns_data)
- : _value (value) ,
- _orb_owns_data (orb_owns_data)
+ : value_ (value) ,
+ orb_owns_data_ (orb_owns_data)
{
- _type = tc;
+ type_ = tc;
tc->AddRef ();
refcount_ = 1;
}
@@ -98,26 +98,26 @@ CORBA_Any::CORBA_Any (CORBA_TypeCode_ptr tc,
// such "visit" routines use only a single value. This is also
// slightly atypical in that it doesn't use the "context".
-static CORBA_TypeCode::traverse_status
-deep_copy (CORBA_TypeCode_ptr tc,
+static CORBA::TypeCode::traverse_status
+deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
void *, // no context
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval;
- CORBA_TCKind my_kind;
+ CORBA::TypeCode::traverse_status retval;
+ CORBA::TCKind my_kind;
if (!tc)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO) );
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO) );
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
my_kind = tc->kind (env);
- if (env.exception_type () != NO_EXCEPTION)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ if (env.exception_type () != CORBA::NO_EXCEPTION)
+ return CORBA::TypeCode::TRAVERSE_STOP;
// Deep copy from "source" to "dest" ... this code "knows" a bit
// about representations, verify it when porting to oddball
@@ -127,66 +127,66 @@ deep_copy (CORBA_TypeCode_ptr tc,
// See the TypeCode interpreter code for more details about the
// representational assumptions here.
- retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
+ retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
switch (my_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_char:
- case tk_octet:
- *(CORBA_Octet *) dest = *(CORBA_Octet *) source;
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ *(CORBA::Octet *) dest = *(CORBA::Octet *) source;
break;
- case tk_short:
- case tk_ushort:
- *(CORBA_Short *) dest = *(CORBA_Short *) source;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ *(CORBA::Short *) dest = *(CORBA::Short *) source;
break;
- case tk_wchar:
- *(CORBA_WChar *) dest = *(CORBA_WChar *) source;
+ case CORBA::tk_wchar:
+ *(CORBA::WChar *) dest = *(CORBA::WChar *) source;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- *(CORBA_Long *) dest = *(CORBA_Long *) source;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ *(CORBA::Long *) dest = *(CORBA::Long *) source;
break;
- case tk_longlong:
- case tk_ulonglong:
- case tk_double:
- *(CORBA_LongLong *) dest = *(CORBA_LongLong *) source;
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ case CORBA::tk_double:
+ *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source;
break;
- case tk_longdouble:
- *(CORBA_LongDouble *) dest = *(CORBA_LongDouble *) source;
+ case CORBA::tk_longdouble:
+ *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source;
break;
- case tk_boolean:
- *(CORBA_Boolean *) dest = *(CORBA_Boolean *) source;
+ case CORBA::tk_boolean:
+ *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source;
break;
- case tk_any:
+ case CORBA::tk_any:
(void) new (dest) CORBA_Any (*(CORBA_Any*) source);
break;
- case tk_TypeCode:
- if ((*(CORBA_TypeCode_ptr *) source) != 0)
+ case CORBA::tk_TypeCode:
+ if ((*(CORBA::TypeCode_ptr *) source) != 0)
dest = source;
else
- dest = _tc_CORBA_Null;
- ((CORBA_TypeCode_ptr) dest)->AddRef ();
+ dest = CORBA::_tc_null;
+ ((CORBA::TypeCode_ptr) dest)->AddRef ();
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
{
- CORBA_Principal_ptr src, dst;
+ CORBA::Principal_ptr src, dst;
- src = *(CORBA_Principal_ptr *) source;
- dst = *(CORBA_Principal_ptr *) dest = new CORBA_Principal;
+ src = *(CORBA::Principal_ptr *) source;
+ dst = *(CORBA::Principal_ptr *) dest = new CORBA::Principal;
// Principals are just opaque IDs ... copy them
@@ -195,7 +195,7 @@ deep_copy (CORBA_TypeCode_ptr tc,
if (dst->id.length > 0)
{
- dst->id.buffer = new CORBA_Octet [(unsigned) dst->id.length];
+ dst->id.buffer = new CORBA::Octet [(unsigned) dst->id.length];
ACE_OS::memcpy (dst->id.buffer, src->id.buffer,
(size_t) dst->id.length);
}
@@ -204,22 +204,22 @@ deep_copy (CORBA_TypeCode_ptr tc,
}
break;
- case tk_objref:
- *(CORBA_Object_ptr *) dest = CORBA_Object::
- _duplicate (*(CORBA_Object_ptr *) source);
+ case CORBA::tk_objref:
+ *(CORBA::Object_ptr *) dest = CORBA::Object::
+ _duplicate (*(CORBA::Object_ptr *) source);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
{
- CORBA_OctetSeq *src, *dst;
- CORBA_TypeCode_ptr tcp;
+ CORBA::OctetSeq *src, *dst;
+ CORBA::TypeCode_ptr tcp;
size_t size;
// Rely on binary format of sequences -- all are the same
// except for the type pointed to by "buffer"
- src = (CORBA_OctetSeq *) source;
- dst = (CORBA_OctetSeq *) dest;
+ src = (CORBA::OctetSeq *) source;
+ dst = (CORBA::OctetSeq *) dest;
assert (src->length <= UINT_MAX);
dst->length = dst->maximum = src->length;
@@ -230,7 +230,7 @@ deep_copy (CORBA_TypeCode_ptr tc,
if (env.exception () != 0)
{
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
break;
}
@@ -238,7 +238,7 @@ deep_copy (CORBA_TypeCode_ptr tc,
if (env.exception () != 0)
{
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
break;
}
tcp->Release ();
@@ -248,53 +248,53 @@ deep_copy (CORBA_TypeCode_ptr tc,
// general traverse fill in those buffer elements.
size *= (size_t) src->length;
- dst->buffer = new CORBA_Octet[size];
+ dst->buffer = new CORBA::Octet[size];
}
// FALLTHROUGH
- case tk_struct:
- case tk_union:
- case tk_array:
- case tk_alias:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
return tc->traverse (source,
dest,
- (CORBA_TypeCode::VisitRoutine) deep_copy,
+ (CORBA::TypeCode::VisitRoutine) deep_copy,
0,
env);
- case tk_except:
+ case CORBA::tk_except:
// Exceptions in memory have a "hidden" typecode up front, used
// to ensure that memory is appropriately freed and to hold the
// exception ID. We just copy that typecode, the traverse code
// ignores it completely.
- *(CORBA_TypeCode_ptr *) dest = *(CORBA_TypeCode_ptr *) source;
- (void) (*(CORBA_TypeCode_ptr *) dest)->AddRef ();
+ *(CORBA::TypeCode_ptr *) dest = *(CORBA::TypeCode_ptr *) source;
+ (void) (*(CORBA::TypeCode_ptr *) dest)->AddRef ();
return tc->traverse (source,
dest,
- (CORBA_TypeCode::VisitRoutine) deep_copy,
+ (CORBA::TypeCode::VisitRoutine) deep_copy,
0,
env);
- case tk_enum:
+ case CORBA::tk_enum:
*(int *) dest = *(int *) source;
break;
- case tk_string:
- *(CORBA_String *) dest =
- CORBA_string_copy (*(CORBA_String *) source);
+ case CORBA::tk_string:
+ *(CORBA::String *) dest =
+ CORBA::string_copy (*(CORBA::String *) source);
break;
- case tk_wstring:
- *(CORBA_WString *) dest =
- CORBA_wstring_copy (*(CORBA_WString *) source);
+ case CORBA::tk_wstring:
+ *(CORBA::WString *) dest =
+ CORBA::wstring_copy (*(CORBA::WString *) source);
break;
default:
dmsg ("deep copy default case ?");
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO) );
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO) );
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
break;
}
return retval;
@@ -304,29 +304,29 @@ deep_copy (CORBA_TypeCode_ptr tc,
CORBA_Any::CORBA_Any (const CORBA_Any &src)
{
- CORBA_Environment env;
+ CORBA::Environment env;
size_t size;
- if (src._type != 0)
- _type = src._type;
+ if (src.type_ != 0)
+ type_ = src.type_;
else
- _type = _tc_CORBA_Null;
+ type_ = CORBA::_tc_null;
- _type->AddRef ();
- _orb_owns_data = CORBA_B_TRUE;
+ type_->AddRef ();
+ orb_owns_data_ = CORBA::B_TRUE;
- size = _type->size (env); // XXX check error status
- _value = (char *) calloc (1, size);
+ size = type_->size (env); // XXX check error status
+ value_ = (char *) calloc (1, size);
#if 0
- (void) _type->traverse (src._value,
- _value,
- (CORBA_TypeCode::VisitRoutine) deep_copy,
+ (void) type_->traverse (src.value_,
+ value_,
+ (CORBA::TypeCode::VisitRoutine) deep_copy,
0,
env);
#endif /* replaced by our optimizations */
- (void) DEEP_COPY (_type, src._value, _value, env);
+ (void) DEEP_COPY (type_, src.value_, value_, env);
}
// Helper routine for "Any" destructor.
@@ -339,45 +339,45 @@ CORBA_Any::CORBA_Any (const CORBA_Any &src)
// in most cases it does nothing. Also, it uses neither the second
// value nor the context parameter.
-static CORBA_TypeCode::traverse_status
-deep_free (CORBA_TypeCode_ptr tc,
+static CORBA::TypeCode::traverse_status
+deep_free (CORBA::TypeCode_ptr tc,
const void *value,
const void *, // value2 unused
void *, // context unused
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
// Don't do anything if the value is a null pointer.
if (!value)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
- CORBA_TypeCode::traverse_status retval;
- CORBA_TCKind my_kind;
+ CORBA::TypeCode::traverse_status retval;
+ CORBA::TCKind my_kind;
if (!tc)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO) );
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO) );
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
my_kind = tc->kind (env);
- if (env.exception_type () != NO_EXCEPTION)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ if (env.exception_type () != CORBA::NO_EXCEPTION)
+ return CORBA::TypeCode::TRAVERSE_STOP;
// Free only embedded pointers ... which don't exist in most
// primitive types.
- retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
+ retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
switch (my_kind)
{
- case tk_struct:
- case tk_union:
- case tk_array:
- case tk_alias:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
return tc->traverse (value,
0,
- (CORBA_TypeCode::VisitRoutine) deep_free,
+ (CORBA::TypeCode::VisitRoutine) deep_free,
0,
env);
@@ -401,42 +401,42 @@ deep_free (CORBA_TypeCode_ptr tc,
// and "tc" are equivalent, (c) releasing that typecode found
// within the exception.
//
- case tk_except:
+ case CORBA::tk_except:
return retval;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = tc->traverse (value,
0,
- (CORBA_TypeCode::VisitRoutine) deep_free,
+ (CORBA::TypeCode::VisitRoutine) deep_free,
0,
env);
// @@ This better be allocated via new[].
- delete [] ((CORBA_OctetSeq *) value)->buffer;
+ delete [] ((CORBA::OctetSeq *) value)->buffer;
break;
- case tk_TypeCode:
- if ((*(CORBA_TypeCode_ptr *) value) != 0)
- (*(CORBA_TypeCode_ptr *) value)->Release ();
+ case CORBA::tk_TypeCode:
+ if ((*(CORBA::TypeCode_ptr *) value) != 0)
+ (*(CORBA::TypeCode_ptr *) value)->Release ();
break;
- case tk_Principal:
- CORBA_release (*(CORBA_Principal_ptr *) value);
+ case CORBA::tk_Principal:
+ CORBA::release (*(CORBA::Principal_ptr *) value);
break;
- case tk_objref:
- CORBA_release (*(CORBA_Object_ptr *) value);
+ case CORBA::tk_objref:
+ CORBA::release (*(CORBA::Object_ptr *) value);
break;
- case tk_string:
- CORBA_string_free (*(CORBA_String *) value);
+ case CORBA::tk_string:
+ CORBA::string_free (*(CORBA::String *) value);
break;
- case tk_wstring:
- CORBA_wstring_free (*(CORBA_WString *) value);
+ case CORBA::tk_wstring:
+ CORBA::wstring_free (*(CORBA::WString *) value);
break;
- case tk_any:
-#if defined (__BORLANDC__)
+ case CORBA::tk_any:
+#ifdef __BORLANDC__
// XXX BC++ doesn't yet accept explicit calls to destructors
// with this syntax. A simple workaround must exist, though;
// other explicit destructor calls work.
@@ -448,11 +448,11 @@ deep_free (CORBA_TypeCode_ptr tc,
break;
default:
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
- if (env.exception_type () != NO_EXCEPTION)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ if (env.exception_type () != CORBA::NO_EXCEPTION)
+ return CORBA::TypeCode::TRAVERSE_STOP;
else
return retval;
}
@@ -468,46 +468,46 @@ deep_free (CORBA_TypeCode_ptr tc,
CORBA_Any::~CORBA_Any (void)
{
- CORBA_Environment env;
+ CORBA::Environment env;
// assert (refcount_ == 0);
- if (_orb_owns_data)
+ if (orb_owns_data_)
{
- // (void) deep_free (_type, _value, 0, 0, env);
- DEEP_FREE (_type, _value, 0, env);
- delete _value;
+ // (void) deep_free (type_, value_, 0, 0, env);
+ DEEP_FREE (type_, value_, 0, env);
+ delete value_;
}
- if (_type)
- _type->Release ();
+ if (type_)
+ type_->Release ();
}
// all-at-once replacement of the contents of an "Any"
void
-CORBA_Any::replace (CORBA_TypeCode_ptr tc,
+CORBA_Any::replace (CORBA::TypeCode_ptr tc,
const void *v,
- CORBA_Boolean orb_owns_data,
- CORBA_Environment &env)
+ CORBA::Boolean orb_owns_data,
+ CORBA::Environment &env)
{
- if (_orb_owns_data)
+ if (orb_owns_data_)
{
- // (void) deep_free (_type, _value, 0, 0, env);
- if (_value)
- DEEP_FREE (_type, _value, 0, env);
- delete _value;
+ // (void) deep_free (type_, value_, 0, 0, env);
+ if (value_)
+ DEEP_FREE (type_, value_, 0, env);
+ delete value_;
}
- if (_type != 0)
- _type->Release ();
+ if (type_ != 0)
+ type_->Release ();
env.clear ();
- _type = tc;
+ type_ = tc;
tc->AddRef ();
- _value = (void *) v;
- _orb_owns_data = orb_owns_data;
+ value_ = (void *) v;
+ orb_owns_data_ = orb_owns_data;
}
// For COM -- IUnKnown operations
@@ -563,10 +563,10 @@ CORBA_Any::QueryInterface (REFIID riid,
CORBA_Any::CORBA_Any (const VARIANT &src)
{
- _orb_owns_data = CORBA_B_TRUE;
+ orb_owns_data_ = CORBA::B_TRUE;
refcount_ = 1;
- _type = _tc_CORBA_Void;
- _value = 0;
+ type_ = CORBA::_tc_void;
+ value_ = 0;
*this = src;
}
@@ -582,36 +582,36 @@ CORBA_Any::operator = (const VARIANT &src)
switch (src.vt & 0x0fff)
{
case VT_EMPTY:
- _type = _tc_CORBA_Void;
- _value = 0;
+ type_ = CORBA::_tc_void;
+ value_ = 0;
break;
case VT_NULL:
- _type = _tc_CORBA_Null;
- _value = 0;
+ type_ = CORBA::_tc_null;
+ value_ = 0;
break;
case VT_I2:
- _type = _tc_CORBA_Short;
- _value = new CORBA_Short ((src.vt & VT_BYREF)
+ type_ = CORBA::_tc_short;
+ value_ = new CORBA::Short ((src.vt & VT_BYREF)
? (*src.piVal) : src.iVal);
break;
case VT_I4:
- _type = _tc_CORBA_Long;
- _value = new CORBA_Long ((src.vt & VT_BYREF)
+ type_ = CORBA::_tc_long;
+ value_ = new CORBA::Long ((src.vt & VT_BYREF)
? (*src.plVal) : src.lVal);
break;
case VT_R4:
- _type = _tc_CORBA_Float;
- _value = new CORBA_Float ((src.vt & VT_BYREF)
+ type_ = CORBA::_tc_float;
+ value_ = new CORBA::Float ((src.vt & VT_BYREF)
? (*src.pfltVal) : src.fltVal);
break;
case VT_R8:
- _type = _tc_CORBA_Double;
- _value = new CORBA_Double ((src.vt & VT_BYREF)
+ type_ = CORBA::_tc_double;
+ value_ = new CORBA::Double ((src.vt & VT_BYREF)
? (*src.pdblVal) : src.dblVal);
break;
@@ -634,15 +634,15 @@ CORBA_Any::operator = (const VARIANT &src)
// XXX what to do?
case VT_UI1:
- _type = _tc_CORBA_Octet;
- _value = new CORBA_Octet ((src.vt & VT_BYREF)
+ type_ = CORBA::_tc_octet;
+ value_ = new CORBA::Octet ((src.vt & VT_BYREF)
? (*src.pbVal) : src.bVal);
break;
default:
// XXX report some exception ... throw it?
- _type = _tc_CORBA_Void;
- _value = 0;
+ type_ = CORBA::_tc_void;
+ value_ = 0;
break;
}
diff --git a/TAO/tao/any.h b/TAO/tao/any.h
index fc7df644dd3..e987f25cd5e 100644
--- a/TAO/tao/any.h
+++ b/TAO/tao/any.h
@@ -13,23 +13,22 @@
//
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems, Inc.
+//
+// Remaining CORBA compliant functions added by Aniruddha Gokhale
//
// ============================================================================
#if !defined (TAO_ANY_H)
#define TAO_ANY_H
-#include "ace/OS.h"
-#include <objbase.h>
-
+#if 0
#include "ace/Synch_T.h"
-
#include "tao/orb.h"
#include "tao/typecode.h"
-
-extern "C" const IID IID_CORBA_Any;
+#endif
class ACE_Svc_Export CORBA_Any : public IUnknown
+{
// = TITLE
// Class "Any" can wrap values of any type, with the assistance
// of a TypeCode to describe that type.
@@ -37,7 +36,6 @@ class ACE_Svc_Export CORBA_Any : public IUnknown
// = DESCRIPTION
// XXX should find a way to make its memory allocation always go
// within the appropriate OLE heap...
-{
public:
// = Minor codes for exceptional returns
enum
@@ -51,9 +49,9 @@ public:
CORBA_Any (void);
// Default constructor.
- CORBA_Any (CORBA_TypeCode_ptr type,
+ CORBA_Any (CORBA::TypeCode_ptr type,
void *value = 0,
- CORBA_Boolean orb_owns_data = CORBA_B_FALSE);
+ CORBA::Boolean orb_owns_data = CORBA::B_FALSE);
// Constructor.
CORBA_Any (const CORBA_Any &a);
@@ -62,6 +60,138 @@ public:
virtual ~CORBA_Any (void);
// Destructor.
+ CORBA_Any &operator= (const CORBA_Any &);
+ // assignment operator
+
+ // = NOTE: 94-9-14 has assignment operator plus many insertion, as specified
+ // below
+
+ // =type safe insertion
+
+ void operator<<= (CORBA::Short);
+ // insert a short
+
+ void operator<<= (CORBA::UShort);
+ // insert an unsigned short
+
+ void operator<<= (CORBA::Long);
+ // insert a long
+
+ void operator<<= (CORBA::ULong);
+ // insert an unsigned long
+
+ void operator<<= (CORBA::Float);
+ // insert a float
+
+ void operator<<= (CORBA::Double);
+ // insert a double
+
+ void operator<<= (const CORBA_Any&);
+ // insert an Any
+
+ void operator<<= (const char*);
+ // insert unbounded strings
+
+ // =type safe extraction
+
+ CORBA::Boolean operator>>= (CORBA::Short&) const;
+ // extract a short
+
+ CORBA::Boolean operator>>= (CORBA::UShort&) const;
+ // extract an unsigned short
+
+ CORBA::Boolean operator>>= (CORBA::Long&) const;
+ // extract a long
+
+ CORBA::Boolean operator>>= (CORBA::ULong&) const;
+ // extract an unsigned long
+
+ CORBA::Boolean operator>>= (CORBA::Float&) const;
+ // extract a float
+
+ CORBA::Boolean operator>>= (CORBA::Double&) const;
+ // extract a double
+
+ CORBA::Boolean operator>>= (CORBA_Any&) const;
+ // extract an Any
+
+ CORBA::Boolean operator>>= (char*&) const;
+ // extract an unbounded string
+
+ // special types needed for insertion and extraction of booleans, octets,
+ // chars, and bounded strings
+
+ struct from_boolean
+ {
+ from_boolean (CORBA::Boolean b);
+ CORBA::Boolean val_;
+ };
+
+ struct from_octet
+ {
+ from_octet (CORBA::Octet o);
+ CORBA::Octet val_;
+ };
+
+ struct from_char
+ {
+ from_char (CORBA::Char c);
+ CORBA::Char val_;
+ };
+
+ struct from_string
+ {
+ from_string (char* s, CORBA::ULong b, CORBA::Boolean nocopy = CORBA::B_FALSE);
+ char *val_;
+ CORBA::ULong bound_;
+ CORBA::Boolean nocopy_;
+ };
+
+ void operator<<= (from_boolean);
+ // insert a boolean
+
+ void operator<<= (from_char);
+ // insert a char
+
+ void operator<<= (from_octet);
+ // insert an octet
+
+ void operator<<= (from_string);
+ // insert a bounded string
+
+ // special types for extracting octets, chars, booleans, and bounded strings
+
+ struct to_boolean
+ {
+ to_boolean (CORBA::Boolean &b);
+ CORBA::Boolean &ref_;
+ };
+
+ struct to_char
+ {
+ to_char (CORBA::Char &c);
+ CORBA::Char &ref_;
+ };
+
+ struct to_octet
+ {
+ to_octet (CORBA::Octet &o);
+ CORBA::Octet &ref_;
+ };
+
+ struct to_string
+ {
+ to_string (char *&s, CORBA::ULong b);
+ char *&ref_;
+ CORBA::ULong bound_;
+ };
+
+ // extraction of the special types
+ CORBA::Boolean operator>>= (to_boolean) const;
+ CORBA::Boolean operator>>= (to_octet) const;
+ CORBA::Boolean operator>>= (to_char) const;
+ CORBA::Boolean operator>>= (to_string) const;
+
// = ALLOCATION
void *operator new (size_t, const void *p);
// Placement new.
@@ -70,18 +200,16 @@ public:
void operator delete (void *p);
// Default delete
- // = NOTE: 94-9-14 has assignment operator plus many insertion,
-
- void replace (CORBA_TypeCode_ptr type,
+ void replace (CORBA::TypeCode_ptr type,
const void *value,
- CORBA_Boolean orb_owns_data,
- CORBA_Environment &env);
- // replace the current typecode and data with the specified one
+ CORBA::Boolean orb_owns_data,
+ CORBA::Environment &env);
+ // replace the current typecode and data with the specified one - unsafe
- CORBA_TypeCode_ptr type (void) const;
+ CORBA::TypeCode_ptr type (void) const;
// Return <type> of <Any>.
- void *value (void) const;
+ const void *value (void) const;
// Return <value> of <Any>.
// = Methods required for COM <IUnknown> support.
@@ -103,13 +231,13 @@ public:
// cast operator.
private:
- CORBA_TypeCode_ptr _type;
+ CORBA::TypeCode_ptr type_;
// Typecode for the <Any>.
- void *_value;
+ void *value_;
// Value for the <Any>.
- CORBA_Boolean _orb_owns_data;
+ CORBA::Boolean orb_owns_data_;
// Flag that indicates the ORB is responsible for deleting the data.
u_int refcount_;
@@ -118,16 +246,15 @@ private:
ACE_SYNCH_MUTEX lock_;
// Serialize access to the reference count.
- // = NOT PROVIDED
- CORBA_Any &operator = (const CORBA_Any &a);
-
- // 94-9-14 hides unsigned char insert/extract
+ void replace (CORBA::TypeCode_ptr type,
+ const void *value,
+ CORBA::Boolean orb_owns_data);
+ // helper for extraction operators that don't pass en environment parameter
+ // 94-9-14 hides unsigned char insert/extract
+ void operator<<= (unsigned char);
+ CORBA::Boolean operator>>= (unsigned char&) const;
};
-# if defined(__ACE_INLINE__)
-# include "any.i"
-# endif
-
#endif /* TAO_ANY_H */
diff --git a/TAO/tao/any.i b/TAO/tao/any.i
index 6bd4c901add..f326a2c0a20 100644
--- a/TAO/tao/any.i
+++ b/TAO/tao/any.i
@@ -15,3 +15,151 @@ CORBA_Any::operator delete (void *p)
{
::operator delete (p);
}
+
+// insertion operators
+
+ACE_INLINE void
+CORBA_Any::operator<<= (CORBA::Short s)
+{
+ replace (CORBA::_tc_short, new CORBA::Short (s), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (CORBA::UShort s)
+{
+ replace (CORBA::_tc_ushort, new CORBA::UShort (s), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (CORBA::Long l)
+{
+ replace (CORBA::_tc_long, new CORBA::Long (l), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (CORBA::ULong l)
+{
+ replace (CORBA::_tc_ulong, new CORBA::ULong (l), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (CORBA::Float f)
+{
+ replace (CORBA::_tc_float, new CORBA::Float (f), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (CORBA::Double d)
+{
+ replace (CORBA::_tc_double, new CORBA::Double (d), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (const CORBA_Any& a)
+{
+ replace (CORBA::_tc_any, new CORBA_Any (a), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (const char* s)
+{
+ replace (CORBA::_tc_string, CORBA::string_dup (s), CORBA::B_TRUE);
+}
+
+// implementing the special types
+ACE_INLINE
+CORBA_Any::from_boolean::from_boolean (CORBA::Boolean b)
+ : val_ (b)
+{
+}
+
+ACE_INLINE
+CORBA_Any::to_boolean::to_boolean (CORBA::Boolean &b)
+ : ref_ (b)
+{
+}
+
+ACE_INLINE
+CORBA_Any::from_octet::from_octet (CORBA::Octet o)
+ : val_ (o)
+{
+}
+
+ACE_INLINE
+CORBA_Any::to_octet::to_octet (CORBA::Octet &o)
+ : ref_ (o)
+{
+}
+
+ACE_INLINE
+CORBA_Any::from_char::from_char (CORBA::Char c)
+ : val_ (c)
+{
+}
+
+ACE_INLINE
+CORBA_Any::to_char::to_char (CORBA::Char &c)
+ : ref_ (c)
+{
+}
+
+ACE_INLINE
+CORBA_Any::from_string::from_string (char *s, CORBA::ULong b, CORBA::Boolean nocopy)
+ : val_ (s),
+ bound_ (b),
+ nocopy_ (nocopy)
+{
+}
+
+ACE_INLINE
+CORBA_Any::to_string::to_string (char *&s, CORBA::ULong b)
+ : ref_ (s),
+ bound_ (b)
+{
+}
+
+// insertion from special types
+
+ACE_INLINE void
+CORBA_Any::operator<<= (from_boolean b)
+{
+ replace (CORBA::_tc_boolean, new CORBA::Boolean (b.val_), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (from_octet o)
+{
+ replace (CORBA::_tc_octet, new CORBA::Octet (o.val_), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (from_char c)
+{
+ replace (CORBA::_tc_char, new CORBA::Char (c.val_), CORBA::B_TRUE);
+}
+
+ACE_INLINE void
+CORBA_Any::operator<<= (from_string s)
+{
+ if (s.nocopy_)
+ replace (CORBA::_tc_string, s.val_, CORBA::B_TRUE);
+ else
+ replace (CORBA::_tc_string, CORBA::string_dup (s.val_), CORBA::B_TRUE);
+}
+
+// extraction: these are safe and hence we have to check that the typecode of
+// the Any is equal to the one we are trying to extract into
+
+ACE_INLINE CORBA::Boolean
+CORBA_Any::operator>>= (CORBA::Short &s) const
+{
+ CORBA::Environment env;
+
+ if (type_->equal (CORBA::_tc_short, env))
+ {
+ s = *(CORBA::Short *) value_;
+ return CORBA::B_TRUE;
+ }
+ else
+ return CORBA::B_FALSE;
+}
diff --git a/TAO/tao/boa.cpp b/TAO/tao/boa.cpp
index 7c51f62edd7..f807fa76cad 100644
--- a/TAO/tao/boa.cpp
+++ b/TAO/tao/boa.cpp
@@ -10,6 +10,7 @@
// the modules knowing about IIOP. In the future, a looser coupling
// between OA initialiszation and protocol components is desired.
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -22,16 +23,17 @@
#include "tao/iioporb.h"
#include "tao/roa.h"
+#endif /* 0 */
+#include "tao/corba.h"
// {A201E4C8-F258-11ce-9598-0000C07CA898}
DEFINE_GUID (IID_BOA,
0xa201e4c8, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98) ;
-// destructor
-TAO_Object_Table::~TAO_Object_Table (void)
-{
-}
+#if !defined (__ACE_INLINE__)
+# include "boa.i"
+#endif
// A "Named BOA" is used in bootstrapping some part of the ORB since
// it's name-to-address binding is managed by the OS. Examples of
@@ -50,10 +52,10 @@ TAO_Object_Table::~TAO_Object_Table (void)
// XXX the coupling could stand to be looser here, so this module did
// not know specifically about the Internet ORB !!
-CORBA_BOA_ptr
-CORBA_BOA::get_named_boa (CORBA_ORB_ptr orb,
- CORBA_String name,
- CORBA_Environment &env)
+CORBA::BOA_ptr
+CORBA_BOA::get_named_boa (CORBA::ORB_ptr orb,
+ CORBA::String name,
+ CORBA::Environment &env)
{
env.clear ();
@@ -83,7 +85,7 @@ CORBA_BOA::get_named_boa (CORBA_ORB_ptr orb,
// We don't know how to deal with this kind of ORB. Report error.
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO) );
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO) );
return 0;
}
@@ -91,9 +93,9 @@ CORBA_BOA::get_named_boa (CORBA_ORB_ptr orb,
// matter to anyone; it is only used to create object references with
// a short lifespan, namely that of the process acquiring this BOA.
-CORBA_BOA_ptr
-CORBA_BOA::get_boa (CORBA_ORB_ptr orb,
- CORBA_Environment &env)
+CORBA::BOA_ptr
+CORBA_BOA::get_boa (CORBA::ORB_ptr orb,
+ CORBA::Environment &env)
{
env.clear ();
@@ -122,18 +124,18 @@ CORBA_BOA::get_boa (CORBA_ORB_ptr orb,
// We don't know how to deal with this kind of ORB. Report error.
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO) );
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO) );
return 0;
}
-void CORBA_BOA::dispatch (CORBA_OctetSeq &key,
- CORBA_ServerRequest &req,
+void CORBA_BOA::dispatch (CORBA::OctetSeq &key,
+ CORBA::ServerRequest &req,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
TAO_Skeleton skel; // pointer to function pointer for the operation
- CORBA_Object_ptr obj; // object that will be looked up based on the key
- CORBA_String opname;
+ CORBA::Object_ptr obj; // object that will be looked up based on the key
+ CORBA::String opname;
// Get the skeleton
@@ -163,19 +165,16 @@ void CORBA_BOA::dispatch (CORBA_OctetSeq &key,
}
int
-CORBA_BOA::find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj)
+CORBA_BOA::find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj)
{
return objtable_->find (key, obj);
}
int
-CORBA_BOA::bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj)
+CORBA_BOA::bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj)
{
return objtable_->bind (key, obj);
}
-#if !defined (__ACE_INLINE__)
-# include "boa.i"
-#endif /* __ACE_INLINE__ */
diff --git a/TAO/tao/boa.h b/TAO/tao/boa.h
index c9b3630202a..97ed7f43eec 100644
--- a/TAO/tao/boa.h
+++ b/TAO/tao/boa.h
@@ -24,38 +24,24 @@
#if !defined (TAO_BOA_H)
#define TAO_BOA_H
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include "ace/SOCK_Stream.h"
#include "tao/orb.h"
#include "tao/sequence.h"
#include "tao/svrrqst.h"
-
-// @@ Shouldn't this go into the CORBA:: namespace? It doesn't belong
-// at global scope!
-
-// True of <obj> is nil.
-CORBA_Boolean is_nil (CORBA_BOA_ptr obj);
-
-// Decrement reference count on <obj>.
-ACE_INLINE void CORBA_release (CORBA_BOA_ptr obj);
-
-extern "C" const IID IID_BOA;
-
-// =Forward declarations
-struct TAO_Dispatch_Context;
-class TAO_Object_Table;
+#endif /* 0 */
// @@ Why does this inherit from IUnknown?
-
class CORBA_BOA : public IUnknown
+{
// = TITLE
// The <{TAO}> Basic Object Adapter.
-{
public:
- virtual CORBA_Object_ptr create (CORBA_OctetSeq& obj_id,
- CORBA_String type_id,
- CORBA_Environment& env) = 0;
+ virtual CORBA::Object_ptr create (CORBA::OctetSeq& obj_id,
+ CORBA::String type_id,
+ CORBA::Environment& env) = 0;
// Create a reference to an object, using identifying information
// that is fully exposed to applications. (An ORB may use additional
// data internally, of course.)
@@ -80,22 +66,22 @@ public:
// BOA" objects won't want those semantics as much as "Anonymous"
// ones.
- typedef void (CORBA_BOA::*dsi_handler) (CORBA_OctetSeq &obj_id,
- CORBA_ServerRequest &request,
+ typedef void (CORBA_BOA::*dsi_handler) (CORBA::OctetSeq &obj_id,
+ CORBA::ServerRequest &request,
void *context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// @@ Please add a comment. BTW, weren't we planning to rename this
// typedef?
// @@ Weren't we planning to rename this method?
virtual int handle_message (TAO_Dispatch_Context &context,
- CORBA_Environment &env) = 0;
+ CORBA::Environment &env) = 0;
// Reads incoming GIOP messages, dispatches them, and sends back any
// required replies. Returns 1 for success, 0==EOF, -1==error.
virtual void register_dir (dsi_handler skeleton,
void *context,
- CORBA_Environment &env) = 0;
+ CORBA::Environment &env) = 0;
// All invocations are handled using DSI ... slightly enhanced from
// the original CORBA 2.0 specs, to improve performance by getting
// rid of all mallocation for calls with fixed-size parameter lists.
@@ -128,7 +114,7 @@ public:
// such as maintaining persistent tables keyed by references to
// objects that may no longer exist.
- virtual void please_shutdown (CORBA_Environment &env) = 0;
+ virtual void please_shutdown (CORBA::Environment &env) = 0;
// Please Shutdown -- reject all further incoming requests, and
// allow all currently active calls (e.g. "this one") to complete.
// This ensures that OS resources associated with this OA can be
@@ -136,7 +122,7 @@ public:
// refcounting on this BOA.
void run (struct timeval *tvp,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// Run -- call get_request () in a loop until shutdown completes.
// Uses as much concurrency as is provided in this environment.
// Initiate shutdown if we've been idle for the specified time.
@@ -145,8 +131,8 @@ public:
// defined here purely for convenience, to help some applications
// avoid writing that loop.
- static CORBA_BOA_ptr get_boa (CORBA_ORB_ptr orb,
- CORBA_Environment &env);
+ static CORBA::BOA_ptr get_boa (CORBA::ORB_ptr orb,
+ CORBA::Environment &env);
// Get an "anonymous" BOA pseudo-objref ... this is the API that
// most applications will use. It returns a BOA which is not
// otherwise in use (though it may have been used in the past).
@@ -155,9 +141,9 @@ public:
// references when BOA::create () is called with the same object and
// type IDs. This is not true for two different BOAs.
- static CORBA_BOA_ptr get_named_boa (CORBA_ORB_ptr orb,
- CORBA_String name,
- CORBA_Environment &env);
+ static CORBA::BOA_ptr get_named_boa (CORBA::ORB_ptr orb,
+ CORBA::String name,
+ CORBA::Environment &env);
// Get a "named" BOA ... most applications don't use/need this API.
//
// BOA names are for ORB/system bootstrapping purposes, and need not
@@ -165,34 +151,34 @@ public:
// guaranteed to include more than one system. The names themselves
// are administered using system-specific mechanisms and policies.
- virtual void clean_shutdown (CORBA_Environment &env) = 0;
+ virtual void clean_shutdown (CORBA::Environment &env) = 0;
// NON-STANDARD CALL. OA user asks for a clean shutdown of the OA
// after currently active calls complete. OA "requester" (calls
// <get_request>) asks if we're shutting down, and if so closes down
// transport cleanly.
- virtual CORBA_Boolean shutting_down (void) = 0;
+ virtual CORBA::Boolean shutting_down (void) = 0;
// NON-STANDARD CALL. Returns <TRUE> if we're in the process of
// shutting down.
- void dispatch (CORBA_OctetSeq &key,
- CORBA_ServerRequest &req,
+ void dispatch (CORBA::OctetSeq &key,
+ CORBA::ServerRequest &req,
void *context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// @@ Please add a comment.
- virtual int bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj);
- // Registers a CORBA_Object into the object table and associates the
+ virtual int bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj);
+ // Registers a CORBA::Object into the object table and associates the
// key with it. Returns -1 on failure, 0 on success, 1 on
// duplicate.
- virtual int find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj);
+ virtual int find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj);
// Looks up an object in the object table using <{key}>. Returns
// non-negative integer on success, or -1 on failure.
- virtual CORBA_ORB_ptr orb (void) const = 0;
+ virtual CORBA::ORB_ptr orb (void) const = 0;
// Return the ORB with which this OA is associated.
virtual ACE_INET_Addr get_addr (void) const = 0;
@@ -204,6 +190,7 @@ protected:
};
struct TAO_Dispatch_Context
+{
// = TITLE
// Structure holding information necessary for GIOP functionality.
//
@@ -211,14 +198,14 @@ struct TAO_Dispatch_Context
// Data structure passed as "context" to the GIOP code, which then
// calls back one of the two helper routines as part of handling any
// particular incoming request.
-{
- CORBA_BOA::dsi_handler skeleton_;
+
+ CORBA::BOA::dsi_handler skeleton_;
// Function pointer to skeleton glue function.
- void (*check_forward_) (CORBA_OctetSeq& key,
- CORBA_Object_ptr& fwd_ref,
+ void (*check_forward_) (CORBA::OctetSeq& key,
+ CORBA::Object_ptr& fwd_ref,
void* context,
- CORBA_Environment& env);
+ CORBA::Environment& env);
// Function to check if the request should be forwarded (whatever
// that means).
@@ -226,7 +213,7 @@ struct TAO_Dispatch_Context
// Who knows...another overloading of the word "context".
// @@ Can we please try to remove this?
- CORBA_BOA_ptr oa_;
+ CORBA::BOA_ptr oa_;
// This should really be a BOA_ptr, but currently it doesn't support
// the one call we need to make through here: <handle_message ()>.
@@ -235,10 +222,6 @@ struct TAO_Dispatch_Context
// NOTE!!! This type MUST match that used for ROA_Handler!
};
-# if defined (__ACE_INLINE__)
-# include "boa.i"
-# endif /* __ACE_INLINE__ */
-
#endif /* TAO_BOA_H */
diff --git a/TAO/tao/boa.i b/TAO/tao/boa.i
index 6aa1db7531f..49c915a60a2 100644
--- a/TAO/tao/boa.i
+++ b/TAO/tao/boa.i
@@ -1,7 +1,7 @@
// CORBA dup/release build on top of COM's (why not).
ACE_INLINE void
-CORBA_release (CORBA_BOA_ptr obj)
+CORBA::release (CORBA::BOA_ptr obj)
{
if (obj)
obj->Release ();
diff --git a/TAO/tao/client_factory.cpp b/TAO/tao/client_factory.cpp
index cd1f0c48f09..bb699909693 100644
--- a/TAO/tao/client_factory.cpp
+++ b/TAO/tao/client_factory.cpp
@@ -13,9 +13,13 @@
// $Id$
// ============================================================================
+#if 0
#if !defined (__ACE_INLINE__)
# include "client_factory.i"
#endif /* __ACE_INLINE__ */
+#endif /* 0 */
+
+#include "tao/corba.h"
// Template specializations which allow the cached connection manager
// to work better.
diff --git a/TAO/tao/client_factory.h b/TAO/tao/client_factory.h
index 24695713293..9b861ea1f11 100644
--- a/TAO/tao/client_factory.h
+++ b/TAO/tao/client_factory.h
@@ -18,6 +18,7 @@
#if !defined (TAO_CLIENT_FACTORY_H)
# define TAO_CLIENT_FACTORY_H
+#if 0
# include "ace/SOCK_Acceptor.h"
# include "ace/SOCK_Connector.h"
# include "ace/Svc_Handler.h"
@@ -26,6 +27,7 @@
# include "ace/Synch.h"
# include "tao/params.h"
+#endif /* 0 */
class TAO_Client_Connection_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
// = TITLE
@@ -42,14 +44,14 @@ public:
virtual int open (void *);
// Initialization hook
- void in_use (CORBA_Boolean);
+ void in_use (CORBA::Boolean);
// Set the in-use flag.
- CORBA_Boolean in_use (void);
+ CORBA::Boolean in_use (void);
// Return state of the in-use flag.
private:
- CORBA_Boolean in_use_;
+ CORBA::Boolean in_use_;
// True value indicates that something is using this handler.
};
diff --git a/TAO/tao/client_factory.i b/TAO/tao/client_factory.i
index efb9c3e3132..54a82884c75 100644
--- a/TAO/tao/client_factory.i
+++ b/TAO/tao/client_factory.i
@@ -3,14 +3,14 @@ TAO_Client_Connection_Handler::TAO_Client_Connection_Handler (ACE_Thread_Manager
: in_use_ (0)
{}
-ACE_INLINE CORBA_Boolean
+ACE_INLINE CORBA::Boolean
TAO_Client_Connection_Handler::in_use (void)
{
return in_use_;
}
ACE_INLINE void
-TAO_Client_Connection_Handler::in_use (CORBA_Boolean flag)
+TAO_Client_Connection_Handler::in_use (CORBA::Boolean flag)
{
in_use_ = flag;
}
diff --git a/TAO/tao/connect.h b/TAO/tao/connect.h
index a84fe7ae278..e1787fe0bf7 100644
--- a/TAO/tao/connect.h
+++ b/TAO/tao/connect.h
@@ -16,11 +16,13 @@
//
// ============================================================================
+#if 0
# include "ace/Reactor.h"
# include "ace/Acceptor.h"
# include "ace/SOCK_Acceptor.h"
# include "ace/Synch.h"
# include "ace/Svc_Handler.h"
+#endif
// Forward Decls
class TAO_OA_Parameters;
@@ -53,8 +55,4 @@ private:
typedef ACE_Strategy_Acceptor<TAO_OA_Connection_Handler, ACE_SOCK_ACCEPTOR> ROA_Acceptor;
-# if defined (__ACE_INLINE__)
-# include "connect.i"
-# endif
-
#endif /* TAO_CONNECT_H */
diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h
index 6ea4fdfaca7..34ef4671eac 100644
--- a/TAO/tao/corba.h
+++ b/TAO/tao/corba.h
@@ -1,5 +1,3 @@
-// This may look like C, but it's really -*- C++ -*-
-
// ============================================================================
//
// = LIBRARY
@@ -25,37 +23,109 @@
//
// ============================================================================
-#if !defined (TAO_CORBA_H)
+#if !defined(TAO_CORBA_H)
#define TAO_CORBA_H
+// ACE specific includes
+#include "ace/OS.h"
+#include "ace/Get_Opt.h"
+#include "ace/Log_Msg.h"
+#include "ace/SOCK_Stream.h"
+#include "ace/Synch_T.h"
+#include "ace/ACE.h"
+#include "ace/Synch.h"
+#include "ace/Hash_Map_Manager.h"
+#include "ace/SString.h"
+#include "ace/INET_Addr.h"
+#include "ace/SOCK_Acceptor.h"
+#include "ace/SOCK_Connector.h"
+#include "ace/Strategies_T.h"
+#include "ace/Connector.h"
+#include "ace/Singleton.h"
+#include "ace/Reactor.h"
+#include "ace/Acceptor.h"
+#include "ace/SOCK_Acceptor.h"
+#include "ace/Synch.h"
+#include "ace/Svc_Handler.h"
+
+// COM stuff
+#include <objbase.h>
+#include <initguid.h>
+
+// ORB configuration
#include "tao/orbconf.h"
+// Alignment macros
#include "tao/align.h"
+
+// Defines CORBA namespace
+#include "tao/corbacom.h"
+
+// individual CORBA classes
+#include "tao/sequence.h" // used by many
#include "tao/any.h"
#include "tao/boa.h"
-#include "tao/cdr.h"
-#include "tao/connect.h"
-#include "tao/corbacom.h"
-#include "tao/debug.h"
+
+#include "tao/params.h"
+//#include "tao/factories.h"
+#include "tao/client_factory.h"
+#include "tao/client_factory.h"
+#include "tao/server_factory.h"
+#include "tao/default_client.h"
+#include "tao/default_server.h"
+
#include "tao/except.h"
-#include "tao/factories.h"
-#include "tao/giop.h"
-#include "tao/iiopobj.h"
-#include "tao/iioporb.h"
-#include "tao/marshal.h"
+#include "tao/orbobj.h"
#include "tao/nvlist.h"
#include "tao/object.h"
-#include "tao/objtable.h"
-#include "tao/optable.h"
-#include "tao/orb.h"
#include "tao/orbobj.h"
-#include "tao/params.h"
#include "tao/principa.h"
#include "tao/request.h"
-#include "tao/roa.h"
-#include "tao/sequence.h"
-#include "tao/stub.h"
#include "tao/svrrqst.h"
#include "tao/typecode.h"
+// Marshaling
+#include "tao/marshal.h"
+#include "tao/cdr.h"
+#include "tao/stub.h"
+
+// GIOP - IIOP related includes
+#include "tao/iiopobj.h"
+#include "tao/iioporb.h"
+#include "tao/giop.h"
+
+// TAO specific includes
+#include "tao/connect.h"
+#include "tao/objtable.h"
+#include "tao/optable.h"
+#include "tao/debug.h"
+
+// TAO's specialized BOA
+#include "tao/roa.h"
+
+//#include "tao/xdr.h"
+
+// include all the *.i file here
+# if defined (__ACE_INLINE__)
+#include "tao/any.i"
+#include "tao/boa.i"
+#include "tao/object.i" // should always be
+#include "tao/orbobj.i"
+#include "tao/typecode.i"
+#include "tao/svrrqst.i"
+//#include "tao/factories.i"
+#include "tao/params.i"
+#include "tao/client_factory.i"
+#include "tao/server_factory.i"
+#include "tao/default_client.i"
+#include "tao/default_server.i"
+#include "cdr.i" //always
+#include "marshal.i" // always
+#include "iiopobj.i"
+#include "iioporb.i"
+#include "connect.i"
+#include "roa.i"
+#endif /* __ACE_INLINE__ */
+
+
#endif /* TAO_CORBA_H */
diff --git a/TAO/tao/corbacom.cpp b/TAO/tao/corbacom.cpp
index 5c7ca11ab82..fe59a49eff6 100644
--- a/TAO/tao/corbacom.cpp
+++ b/TAO/tao/corbacom.cpp
@@ -4,7 +4,7 @@
//
// ORB: support for primitive data types
-#include "tao/orb.h"
+#include "tao/corba.h"
// @@ Chris, do we really need to use HAVE_WIDEC_H anymore? Isn't
// this handled by ACE?
@@ -15,34 +15,34 @@
// String utility support; this can need to be integrated with the
// ORB's own memory allocation subsystem.
-ACE_Svc_Export CORBA_String
-CORBA_string_alloc (CORBA_ULong len)
+ACE_Svc_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)];
+ return new CORBA::Char [(size_t)(len + 1)];
}
-CORBA_String
-CORBA_string_copy (const CORBA_Char *const str)
+CORBA::String
+CORBA::string_copy (const CORBA::Char *str)
{
if (!str)
return 0;
- CORBA_String retval = CORBA_string_alloc (ACE_OS::strlen (str));
+ CORBA::String retval = CORBA::string_alloc (ACE_OS::strlen (str));
// clear the contents of the allocated string
ACE_OS::memset(retval, '\0', ACE_OS::strlen (str));
return ACE_OS::strcpy (retval, str);
}
-CORBA_String
-CORBA_string_dup (const CORBA_Char *const str)
+CORBA::String
+CORBA::string_dup (const CORBA::Char *str)
{
- return CORBA_string_copy(str);
+ return CORBA::string_copy (str);
}
ACE_Svc_Export void
-CORBA_string_free (CORBA_Char *const str)
+CORBA::string_free (CORBA::Char *str)
{
delete [] str;
}
@@ -51,75 +51,75 @@ CORBA_string_free (CORBA_Char *const str)
// String_var type
// ----------------------------------------------------------------------
-CORBA_String_var::CORBA_String_var (void)
+CORBA::String_var::String_var (void)
{
this->ptr_ = 0;
}
-CORBA_String_var::~CORBA_String_var (void)
+CORBA::String_var::~String_var (void)
{
if (this->ptr_ != 0)
{
- CORBA_string_free (this->ptr_);
+ CORBA::string_free (this->ptr_);
}
}
-CORBA_String_var::CORBA_String_var (char *p)
+CORBA::String_var::String_var (char *p)
: ptr_ (p)
{
// argument is consumed. p should never be NULL
}
-CORBA_String_var::CORBA_String_var (const char *p)
- : ptr_ (CORBA_string_dup ((char *)p))
+CORBA::String_var::String_var (const char *p)
+ : ptr_ (CORBA::string_dup ((char *)p))
{
}
-CORBA_String_var::CORBA_String_var (const CORBA_String_var& r)
+CORBA::String_var::String_var (const CORBA::String_var& r)
{
- this->ptr_ = CORBA_string_dup (r.ptr_);
+ this->ptr_ = CORBA::string_dup (r.ptr_);
}
-CORBA_String_var &
-CORBA_String_var::operator= (char *p)
+CORBA::String_var &
+CORBA::String_var::operator= (char *p)
{
if (this->ptr_ != p)
{
if (this->ptr_ != 0)
- CORBA_string_free (this->ptr_);
+ CORBA::string_free (this->ptr_);
this->ptr_ = p;
}
return *this;
}
-CORBA_String_var &
-CORBA_String_var::operator= (const char *p)
+CORBA::String_var &
+CORBA::String_var::operator= (const char *p)
{
if (this->ptr_ != 0)
- CORBA_string_free (this->ptr_);
+ CORBA::string_free (this->ptr_);
- this->ptr_ = CORBA_string_dup (p);
+ this->ptr_ = CORBA::string_dup (p);
return *this;
}
-CORBA_String_var &
-CORBA_String_var::operator= (const CORBA_String_var& r)
+CORBA::String_var &
+CORBA::String_var::operator= (const CORBA::String_var& r)
{
if (this->ptr_ != 0)
- CORBA_string_free (this->ptr_);
- this->ptr_ = CORBA_string_dup (r.ptr_);
+ CORBA::string_free (this->ptr_);
+ this->ptr_ = CORBA::string_dup (r.ptr_);
return *this;
}
-CORBA_Char &
-CORBA_String_var::operator[] (CORBA_ULong index)
+CORBA::Char &
+CORBA::String_var::operator[] (CORBA::ULong index)
{
// we need to verify bounds else raise some exception
return this->ptr_[index];
}
-CORBA_Char
-CORBA_String_var::operator[] (CORBA_ULong index) const
+CORBA::Char
+CORBA::String_var::operator[] (CORBA::ULong index) const
{
// we need to verify bounds else raise some exception
return this->ptr_[index];
@@ -130,7 +130,7 @@ CORBA_String_var::operator[] (CORBA_ULong index) const
// that header file ...
extern "C" unsigned
-wslen (const CORBA_WChar *str)
+wslen (const CORBA::WChar *str)
{
u_int len = 0;
@@ -139,11 +139,11 @@ wslen (const CORBA_WChar *str)
return len;
}
-extern "C" CORBA_WChar *
-wscpy (CORBA_WChar *dest,
- const CORBA_WChar *src)
+extern "C" CORBA::WChar *
+wscpy (CORBA::WChar *dest,
+ const CORBA::WChar *src)
{
- CORBA_WChar *retval = dest;
+ CORBA::WChar *retval = dest;
while ((*dest++ = *src++) != 0)
continue;
@@ -154,24 +154,24 @@ wscpy (CORBA_WChar *dest,
// Wide Character string utility support; this can need to be
// integrated with the ORB's own memory allocation subsystem.
-CORBA_WString
-CORBA_wstring_alloc (CORBA_ULong len)
+CORBA::WString
+CORBA::wstring_alloc (CORBA::ULong len)
{
- return new CORBA_WChar [(size_t) (len + 1)];
+ return new CORBA::WChar [(size_t) (len + 1)];
}
-CORBA_WString
-CORBA_wstring_copy (const CORBA_WChar *const str)
+CORBA::WString
+CORBA::wstring_copy (const CORBA::WChar *const str)
{
if (*str)
return 0;
- CORBA_WString retval = CORBA_wstring_alloc (wslen (str));
+ CORBA::WString retval = CORBA::wstring_alloc (wslen (str));
return wscpy (retval, str);
}
void
-CORBA_wstring_free (CORBA_WChar *const str)
+CORBA::wstring_free (CORBA::WChar *const str)
{
delete str;
}
diff --git a/TAO/tao/corbacom.h b/TAO/tao/corbacom.h
index df3216b9c77..e0eef773458 100644
--- a/TAO/tao/corbacom.h
+++ b/TAO/tao/corbacom.h
@@ -19,162 +19,563 @@
#if !defined (TAO_CORBACOM_H)
#define TAO_CORBACOM_H
+// For some reason, PC compilers don't implement "natural" alignment,
+// but only use fixed alignment policies. The following #pragmas
+// 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
+
+# ifdef _DEBUG // convert from VC++ convention ...
+# define DEBUG // ... to normal convention
+# endif
+
+#elif defined (__BORLANDC__)
+# pragma option -a // BC++, use 1 byte alignment
+
+#endif
+
#if !defined (TAO_CONST)
//Something to document the fact that we want to put 'const' in front
// of a type, but that it won't turn out the way we want, e.g., we
// really want to express that a CORBA_String is const, but since CORBA_String
// is a char*, the const modifies the pointer and not the pointed-to, and
// some compilers (like SGI's EDG-derived thang) complain.
-# define TAO_CONST
+#define TAO_CONST
#endif /* TAO_CONST */
-# if SIZEOF_BOOL != 0
-typedef bool CORBA_Boolean;
-# define CORBA_B_FALSE false
-# define CORBA_B_TRUE true
+// Forward declarations of some data types are needed.
+
+class CORBA_Any;
+//typedef class CORBA_Any *CORBA_Any_ptr;
+
+class CORBA_TypeCode;
+//typedef class CORBA_TypeCode *CORBA_TypeCode_ptr;
+
+class CORBA_BOA;
+//typedef class CORBA_BOA *CORBA_BOA_ptr;
+
+class CORBA_Exception;
+//typedef class CORBA_Exception *CORBA_Exception_ptr;
+
+class CORBA_Request;
+//typedef class CORBA_Request *CORBA_Request_ptr;
+
+class CORBA_NamedValue;
+//typedef class CORBA_NamedValue *CORBA_NamedValue_ptr;
+
+class CORBA_NVList;
+//typedef class CORBA_NVList *CORBA_NVList_ptr;
+
+class CORBA_ORB;
+//typedef class CORBA_ORB *CORBA_ORB_ptr;
+
+class CORBA_Object;
+//typedef class CORBA_Object *CORBA_Object_ptr;
+
+class CORBA_ServerRequest;
+//typedef class CORBA_ServerRequest *CORBA_ServerRequest_ptr;
+
+class CORBA_Environment;
+//typedef class CORBA_Environment *CORBA_Environment_ptr;
+
+class CORBA_Principal;
+//typedef class CORBA_Principal *CORBA_Principal_ptr;
+
+class CORBA_SystemException;
+class CORBA_UserException;
+
+// forward declarations of system exceptions
+#define SYSEX(name) \
+class CORBA_ ## name;
+ SYSEX(UNKNOWN);
+ SYSEX(BAD_PARAM);
+ SYSEX(NO_MEMORY);
+ SYSEX(IMP_LIMIT);
+ SYSEX(COMM_FAILURE);
+ SYSEX(INV_OBJREF);
+ SYSEX(OBJECT_NOT_EXIST);
+ SYSEX(NO_PERMISSION);
+ SYSEX(INTERNAL);
+ SYSEX(MARSHAL);
+ SYSEX(INITIALIZE);
+ SYSEX(NO_IMPLEMENT);
+ SYSEX(BAD_TYPECODE);
+ SYSEX(BAD_OPERATION);
+ SYSEX(NO_RESOURCES);
+ SYSEX(NO_RESPONSE);
+ SYSEX(PERSIST_STORE);
+ SYSEX(BAD_INV_ORDER);
+ SYSEX(TRANSIENT);
+ SYSEX(FREE_MEM);
+ SYSEX(INV_IDENT);
+ SYSEX(INV_FLAG);
+ SYSEX(INTF_REPOS);
+ SYSEX(BAD_CONTEXT);
+ SYSEX(OBJ_ADAPTER);
+ SYSEX(DATA_CONVERSION);
+#undef SYSEX
+
+typedef class CORBA_ImplementationDef *CORBA_ImplementationDef_ptr;
+
+typedef class CORBA_InterfaceDef *CORBA_InterfaceDef_ptr;
+
+// =Forward declarations
+struct TAO_Dispatch_Context;
+class TAO_Object_Table;
+class TAO_Operation_Table;
+class TAO_Client_Strategy_Factory;
+class TAO_Server_Strategy_Factory;
+class TAO_ORB_Parameters;
+class CDR;
+
+// enum values defined in nvlist.hh, bitwise ORed.
+typedef u_int CORBA_Flags;
+
+template <class T>
+struct CORBA_SEQUENCE;
+
+class ACE_Svc_Export CORBA
+{
+ // = TITLE
+ // class CORBA
+ // =DESCRIPTION
+ // Provides the CORBA namespace.
+public:
+# if SIZEOF_BOOL != 0
+ typedef bool Boolean;
+# define B_FALSE false
+# define B_TRUE true
+
# else /* "bool" not builtin to this compiler */
-typedef int CORBA_Boolean;
-enum { CORBA_B_FALSE = 0, CORBA_B_TRUE = 1 };
+ typedef int Boolean;
+ enum { B_FALSE = 0, B_TRUE = 1 };
# endif /* "bool" not builtin */
-typedef u_char CORBA_Octet;
+ typedef u_char Octet;
-typedef short CORBA_Short;
-typedef u_short CORBA_UShort;
+ typedef short Short;
+ typedef u_short UShort;
// CORBA "Long" (and its unsigned cousin) are 32 bits, just like on
// almost all C/C++ compilers.
# if SIZEOF_LONG == 4
-typedef long CORBA_Long;
-typedef u_long CORBA_ULong;
+ typedef long Long;
+ typedef u_long ULong;
# else
-// just assume "int" is 4 bytes long ...
-typedef int CORBA_Long;
-typedef u_int CORBA_ULong;
+ // just assume "int" is 4 bytes long ...
+ typedef int Long;
+ typedef u_int ULong;
# endif /* SIZEOF_LONG != 4 */
-// 94-9-32 Appendix A, also the OMG C++ mapping, stipulate that 64 bit
-// integers are "LongLong".
-//
-// NOTE: those are IDL extensions, not yet standard.
+ // 94-9-32 Appendix A, also the OMG C++ mapping, stipulate that 64 bit
+ // integers are "LongLong".
+ //
+ // NOTE: those are IDL extensions, not yet standard.
# if SIZEOF_LONG_LONG == 8
-typedef long long CORBA_LongLong;
-typedef unsigned long long CORBA_ULongLong;
+ typedef long long LongLong;
+ typedef unsigned long long ULongLong;
# elif SIZEOF_LONG == 8
-typedef long CORBA_LongLong;
-typedef u_long CORBA_ULongLong;
+ typedef long LongLong;
+ typedef u_long ULongLong;
# elif defined (_MSC_VER) && _MSC_VER >= 900
-typedef __int64 CORBA_LongLong;
-typedef unsigned __int64 CORBA_ULongLong;
+ typedef __int64 LongLong;
+ typedef unsigned __int64 ULongLong;
# else
-// If "long long" isn't native, programs can't use these data types in
-// normal arithmetic expressions. If any particular application can
-// cope with the loss of range it can define conversion operators
-// itself.
+ // If "long long" isn't native, programs can't use these data types in
+ // normal arithmetic expressions. If any particular application can
+ // cope with the loss of range it can define conversion operators
+ // itself.
# define NONNATIVE_LONGLONG
# if defined (TAO_WORDS_BIGENDIAN)
-struct CORBA_LongLong { CORBA_Long h, l; };
-struct CORBA_ULongLong { CORBA_Long h, l; };
+ struct LongLong { Long h, l; };
+ struct ULongLong { Long h, l; };
# else
-struct CORBA_LongLong { CORBA_Long l, h; };
-struct CORBA_ULongLong { CORBA_ULong l, h; };
+ struct LongLong { Long l, h; };
+ struct ULongLong { ULong l, h; };
# endif /* !TAO_WORDS_BIGENDIAN */
# endif /* no native 64 bit integer type */
-typedef float CORBA_Float;
-typedef double CORBA_Double;
+ typedef float Float;
+ typedef double Double;
-// 94-9-32 Appendix A defines a 128 bit floating point "long double"
-// data type, with greatly extended precision and four more bits of
-// exponent (compared to "double").
-//
-// NOTE: that is an IDL extension, not yet standard.
+ // 94-9-32 Appendix A defines a 128 bit floating point "long double"
+ // data type, with greatly extended precision and four more bits of
+ // exponent (compared to "double").
+ //
+ // NOTE: that is an IDL extension, not yet standard.
# if SIZEOF_LONG_DOUBLE == 16
-typedef long double CORBA_LongDouble;
+ typedef long double LongDouble;
# else
# define NONNATIVE_LONGDOUBLE
-struct CORBA_LongDouble
-{
- char ld[16];
-};
+ struct LongDouble
+ {
+ char ld[16];
+ };
# endif /* SIZEOF_LONG_DOUBLE != 16 */
-typedef char CORBA_Char;
-typedef CORBA_Char *CORBA_String;
+ typedef char Char;
+ typedef Char *String;
-ACE_Svc_Export CORBA_String CORBA_string_alloc (CORBA_ULong len);
-CORBA_String CORBA_string_copy (const CORBA_Char *const);
-CORBA_String CORBA_string_dup (const CORBA_Char *const);
-ACE_Svc_Export void CORBA_string_free (CORBA_Char *const);
+ static ACE_Svc_Export String string_alloc (ULong len);
+ static ACE_Svc_Export String string_copy (const Char *);
+ static ACE_Svc_Export String string_dup (const Char *);
+ static ACE_Svc_Export void string_free (Char *);
+ typedef CORBA_SEQUENCE<Octet> OctetSeq;
-class CORBA_String_var
+ class String_var
// = TITLE
// String var class. Provides automatic deallocation of storage for the
// string once it goes out of scope.
-{
-public:
- CORBA_String_var (void);
- // default constructor
+ {
+ public:
+ String_var (void);
+ // default constructor
- CORBA_String_var (char *p);
- // constructor, owns p
+ String_var (char *p);
+ // constructor, owns p
- CORBA_String_var (const char *p);
- // constructor. Makes a copy of p
+ String_var (const char *p);
+ // constructor. Makes a copy of p
- CORBA_String_var (const CORBA_String_var &s);
- // copy constructor
+ String_var (const String_var &s);
+ // copy constructor
- ~CORBA_String_var (void);
- // destructor
+ ~String_var (void);
+ // destructor
- CORBA_String_var &operator= (char *p);
- // assignment operator
+ String_var &operator= (char *p);
+ // assignment operator
- CORBA_String_var &operator= (const char *p);
- // assignment to a const char*. Makes a copy.
+ String_var &operator= (const char *p);
+ // assignment to a const char*. Makes a copy.
- CORBA_String_var &operator= (const CORBA_String_var &s);
- // assignment operator
+ String_var &operator= (const String_var &s);
+ // assignment operator
- operator char *() { return ptr_; }
- // access and modify
+ operator char *() { return ptr_; }
+ // access and modify
- operator const char *() const {return ptr_; };
- // only read privileges
+ operator const char *() const {return ptr_; };
+ // only read privileges
- char &operator[] (CORBA_ULong index);
- // allows access and modification using an index
+ char &operator[] (ULong index);
+ // allows access and modification using an index
- char operator[] (CORBA_ULong index) const;
- // allows only accessing thru an index
+ char operator[] (ULong index) const;
+ // allows only accessing thru an index
-private:
- char *ptr_;
- // instance
-};
+ private:
+ char *ptr_;
+ // instance
+ };
-// 94-9-32 Appendix A defines 16-bit UNICODE characters as
-// "WChar", and null-terminated strings of them as "WString".
-//
-// NOTE: those are IDL extensions, not yet standard.
+ // 94-9-32 Appendix A defines 16-bit UNICODE characters as
+ // "WChar", and null-terminated strings of them as "WString".
+ //
+ // NOTE: those are IDL extensions, not yet standard.
# if SIZEOF_WCHAR_T < 2
-typedef short CORBA_WChar;
+ typedef short WChar;
# else
-typedef wchar_t CORBA_WChar;
+ typedef wchar_t WChar;
# endif /* SIZEOF _WCHAR_T < 2 */
-typedef CORBA_WChar *CORBA_WString;
+ typedef WChar *WString;
+
+ static ACE_Svc_Export WString wstring_alloc (ULong len);
+ static ACE_Svc_Export WString wstring_copy (const WChar *const);
+ static ACE_Svc_Export void wstring_free (WChar *const);
+
+ // various CORBA defined classes
+ typedef CORBA_Any Any;
+ // typedef CORBA_Any_var Any_var;
+ // XXXASG - need to do this var class
+ typedef Any *Any_ptr;
+
+ typedef CORBA_BOA BOA;
+ typedef BOA *BOA_ptr;
+
+ typedef CORBA_Environment Environment;
+ typedef Environment *Environment_ptr;
+
+ typedef CORBA_Exception Exception;
+ typedef Exception *Exception_ptr;
+
+ typedef CORBA_NamedValue NamedValue;
+ typedef NamedValue *NamedValue_ptr;
+
+ typedef CORBA_NVList NVList;
+ typedef NVList *NVList_ptr;
+
+ typedef CORBA_Object Object;
+ typedef CORBA_Object *Object_ptr;
+
+ typedef CORBA_Principal Principal;
+ typedef CORBA_Principal *Principal_ptr;
+
+ typedef CORBA_ORB ORB;
+ typedef ORB *ORB_ptr;
+
+ typedef CORBA_Request Request;
+ typedef Request *Request_ptr;
+
+ typedef CORBA_ServerRequest ServerRequest;
+ typedef ServerRequest *ServerRequest_ptr;
+
+ typedef CORBA_SystemException
+ SystemException;
+
+ typedef CORBA_TypeCode TypeCode;
+ typedef TypeCode *TypeCode_ptr;
+
+ typedef CORBA_UserException UserException;
+
+ typedef CORBA_SEQUENCE <CORBA::TypeCode_ptr> ExceptionList;
+ typedef ExceptionList *ExceptionList_ptr;
+
+ typedef CORBA_ImplementationDef *ImplementationDef_ptr;
+
+ typedef class CORBA_InterfaceDef *InterfaceDef_ptr;
+
+ // enum values defined in nvlist.hh, bitwise ORed.
+ typedef u_int Flags;
+
+ // Completion Status for System exceptions
+ enum CompletionStatus
+ {
+ COMPLETED_YES, // successful or exceptional completion
+ COMPLETED_NO, // didn't change any state; retry is OK
+ COMPLETED_MAYBE // can't say what happened; retry unsafe
+ };
+
+ // exception type
+ enum ExceptionType
+ {
+ NO_EXCEPTION,
+ SYSTEM_EXCEPTION,
+ USER_EXCEPTION
+ };
+
+ // all the system exception classes
+#define SYSEX(name) \
+ typedef CORBA_ ## name name
+ SYSEX(UNKNOWN);
+ SYSEX(BAD_PARAM);
+ SYSEX(NO_MEMORY);
+ SYSEX(IMP_LIMIT);
+ SYSEX(COMM_FAILURE);
+ SYSEX(INV_OBJREF);
+ SYSEX(OBJECT_NOT_EXIST);
+ SYSEX(NO_PERMISSION);
+ SYSEX(INTERNAL);
+ SYSEX(MARSHAL);
+ SYSEX(INITIALIZE);
+ SYSEX(NO_IMPLEMENT);
+ SYSEX(BAD_TYPECODE);
+ SYSEX(BAD_OPERATION);
+ SYSEX(NO_RESOURCES);
+ SYSEX(NO_RESPONSE);
+ SYSEX(PERSIST_STORE);
+ SYSEX(BAD_INV_ORDER);
+ SYSEX(TRANSIENT);
+ SYSEX(FREE_MEM);
+ SYSEX(INV_IDENT);
+ SYSEX(INV_FLAG);
+ SYSEX(INTF_REPOS);
+ SYSEX(BAD_CONTEXT);
+ SYSEX(OBJ_ADAPTER);
+ SYSEX(DATA_CONVERSION);
+#undef SYSEX
+
+
+ //= all the CORBA::is_nil methods
+ static Boolean is_nil (BOA_ptr);
+ static Boolean is_nil (Object_ptr);
+ static Boolean is_nil (Environment_ptr);
+ static Boolean is_nil (NamedValue_ptr);
+ static Boolean is_nil (NVList_ptr);
+ static Boolean is_nil (Request_ptr);
+ // static Boolean is_nil (Context_ptr);
+ static Boolean is_nil (TypeCode_ptr);
+ static Boolean is_nil (ORB_ptr);
+ static Boolean is_nil (Principal_ptr);
+ static Boolean is_nil (ServerRequest_ptr req);
+
+ // = all the CORBA release methods
+ static void release (BOA_ptr);
+ static void release (Object_ptr);
+ static void release (Environment_ptr);
+ static void release (NamedValue_ptr);
+ static void release (NVList_ptr);
+ static void release (Request_ptr);
+ static void release (Principal_ptr);
+ // static Boolean release (Context_ptr);
+ static void release (TypeCode_ptr);
+ static void release (ORB_ptr);
+ static void release (ServerRequest_ptr req);
+
+ enum TCKind
+ {
+ tk_null = 0,
+ tk_void = 1,
+ tk_short = 2,
+ tk_long = 3,
+ tk_ushort = 4,
+ tk_ulong = 5,
+ tk_float = 6,
+ tk_double = 7,
+ tk_boolean = 8,
+ tk_char = 9,
+ tk_octet = 10,
+ tk_any = 11,
+ tk_TypeCode = 12,
+ tk_Principal = 13,
+ tk_objref = 14,
+ tk_struct = 15,
+ tk_union = 16,
+ tk_enum = 17,
+ tk_string = 18,
+ tk_sequence = 19,
+ tk_array = 20,
+ tk_alias = 21, // 94-11-7
+ tk_except = 22, // 94-11-7
+
+ // these five are OMG-IDL data type extensions
+ tk_longlong = 23, // 94-9-32 Appendix A (+ 2)
+ tk_ulonglong = 24, // 94-9-32 Appendix A (+ 2)
+ tk_longdouble = 25, // 94-9-32 Appendix A (+ 2)
+ tk_wchar = 26, // 94-9-32 Appendix A (+ 2)
+ tk_wstring = 27, // 94-9-32 Appendix A (+ 2)
+
+ // This symbol is not defined by CORBA 2.0. It's used to speed up
+ // dispatch based on TCKind values, and lets many important ones
+ // just be table lookups. It must always be the last enum value!!
+
+ TC_KIND_COUNT
+ };
+
+ // All the typecode constants
+ static TypeCode_ptr _tc_null;
+ static TypeCode_ptr _tc_void;
+ static TypeCode_ptr _tc_short;
+ static TypeCode_ptr _tc_long;
+ static TypeCode_ptr _tc_ushort;
+ static TypeCode_ptr _tc_ulong;
+ static TypeCode_ptr _tc_float;
+ static TypeCode_ptr _tc_double;
+ static TypeCode_ptr _tc_boolean;
+ static TypeCode_ptr _tc_char;
+ static TypeCode_ptr _tc_octet;
+ static TypeCode_ptr _tc_any;
+ static TypeCode_ptr _tc_TypeCode;
+ static TypeCode_ptr _tc_Principal;
+ static TypeCode_ptr _tc_Object;
+ static TypeCode_ptr _tc_struct;
+ static TypeCode_ptr _tc_union;
+ static TypeCode_ptr _tc_enum;
+ static TypeCode_ptr _tc_string;
+ static TypeCode_ptr _tc_sequence;
+ static TypeCode_ptr _tc_array;
+ static TypeCode_ptr _tc_alias;
+ static TypeCode_ptr _tc_except;
+ static TypeCode_ptr _tc_longlong;
+ static TypeCode_ptr _tc_ulonglong;
+ static TypeCode_ptr _tc_longdouble;
+ static TypeCode_ptr _tc_wchar;
+ static TypeCode_ptr _tc_wstring;
+
+ // typecode constants for system exceptions
+#define SYSEX(name) \
+ static TypeCode_ptr _tc_ ## name
+
+SYSEX(UNKNOWN);
+SYSEX(BAD_PARAM);
+SYSEX(NO_MEMORY);
+SYSEX(IMP_LIMIT);
+SYSEX(COMM_FAILURE);
+SYSEX(INV_OBJREF);
+SYSEX(OBJECT_NOT_EXIST);
+SYSEX(NO_PERMISSION);
+SYSEX(INTERNAL);
+SYSEX(MARSHAL);
+SYSEX(INITIALIZE);
+SYSEX(NO_IMPLEMENT);
+SYSEX(BAD_TYPECODE);
+SYSEX(BAD_OPERATION);
+SYSEX(NO_RESOURCES);
+SYSEX(NO_RESPONSE);
+SYSEX(PERSIST_STORE);
+SYSEX(BAD_INV_ORDER);
+SYSEX(TRANSIENT);
+SYSEX(FREE_MEM);
+SYSEX(INV_IDENT);
+SYSEX(INV_FLAG);
+SYSEX(INTF_REPOS);
+SYSEX(BAD_CONTEXT);
+SYSEX(OBJ_ADAPTER);
+SYSEX(DATA_CONVERSION);
+#undef SYSEX
+
+ static TypeCode_ptr _tc_Bounds;
+ static TypeCode_ptr _tc_BadKind;
+
+ ORB_ptr ACE_Svc_Export ORB_init (int &argc,
+ char *const *argv,
+ char *orb_name,
+ Environment &env);
+ // ORB initialisation, per OMG document 94-9-46.
+
+ // Define flags for NVList add methods
+ enum
+ {
+ ARG_IN = 0x01,
+ ARG_OUT = 0x02,
+ ARG_INOUT = 0x04,
+ IN_COPY_VALUE = 0x08,
+ OUT_LIST_MEMORY = 0x10
+ };
+
+};
-CORBA_WString CORBA_wstring_alloc (CORBA_ULong len);
-CORBA_WString CORBA_wstring_copy (const CORBA_WChar *const);
-void CORBA_wstring_free (CORBA_WChar *const);
+typedef void (*TAO_Skeleton)(CORBA::ServerRequest &,
+ CORBA::Object_ptr,
+ CORBA::Environment &);
+// signature of a skeleton for every operation of an interface
+
+// COM interface IIDs
+extern "C" const IID IID_CORBA_Any;
+extern "C" const IID IID_BOA;
+extern "C" const IID IID_CORBA_Exception;
+extern "C" const IID IID_CORBA_UserException;
+extern "C" const IID IID_CORBA_SystemException;
+extern "C" const IID IID_CORBA_Request;
+extern "C" const IID IID_CORBA_Object;
+extern "C" const IID IID_CORBA_ORB;
+extern "C" const IID IID_CORBA_NVList;
+extern "C" const IID IID_CORBA_Principal;
+extern "C" const IID IID_CORBA_TypeCode;
+extern "C" const IID IID_CORBA_ServerRequest;
+extern "C" const IID IID_IIOP_ServerRequest;
+extern "C" const IID IID_STUB_Object;
+extern "C" const IID IID_IIOP_Object;
+extern "C" const IID IID_IIOP_ORB;
+extern "C" const IID IID_ROA;
+
+// 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
+#endif /* VC++ */
+
+// BC++ we leave with 1-byte padding rules...
#endif /* TAO_CORBA_COM_H */
diff --git a/TAO/tao/debug.cpp b/TAO/tao/debug.cpp
index 943bacc83c8..29b4083f6ed 100644
--- a/TAO/tao/debug.cpp
+++ b/TAO/tao/debug.cpp
@@ -11,8 +11,12 @@
//
// XXX on Windows, make it always use OutputDebugString () instead of stdio
+#if 0
#include "tao/orb.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
#if !defined (ACE_HAS_PTHREADS) // _POSIX_THREAD_SAFE_FUNCTIONS implied
#define flockfile(f)
@@ -192,10 +196,10 @@ dmsg_v (const char *_FAR fmt,
}
void ACE_Svc_Export
-_dmsg_x (CORBA_Environment _FAR &env,
+_dmsg_x (CORBA::Environment _FAR &env,
const char *_FAR info)
{
- const CORBA_Exception *ex = env.exception ();
+ const CORBA::Exception *ex = env.exception ();
setup ();
flockfile (debug_stream);
@@ -203,7 +207,7 @@ _dmsg_x (CORBA_Environment _FAR &env,
ACE_OS::fprintf (debug_stream, "exception '%s' at '%s'\n", ex->id (), info);
if (env.exception_type () == SYSTEM_EXCEPTION)
{
- CORBA_SystemException *sysex = (CORBA_SystemException *) ex;
+ CORBA::SystemException *sysex = (CORBA::SystemException *) ex;
emit_prefix (debug_stream);
ACE_OS::fprintf (debug_stream, "minor %#lx, completion %#lx\n",
diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp
index 6e06f58d3c9..f19631e118c 100644
--- a/TAO/tao/decode.cpp
+++ b/TAO/tao/decode.cpp
@@ -20,22 +20,26 @@
//
// ============================================================================
+#if 0
#include "tao/orb.h"
#include "tao/cdr.h"
#include "tao/giop.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
#if defined (HAVE_WIDEC_H)
# include <widec.h>
#else
extern "C"
{
- u_int wslen (const CORBA_WChar *);
- CORBA_WChar *wscpy (CORBA_WChar *, const CORBA_WChar *);
+ u_int wslen (const CORBA::WChar *);
+ CORBA::WChar *wscpy (CORBA::WChar *, const CORBA::WChar *);
}
#endif /* HAVE_WIDEC_H */
-extern CORBA_TypeCode TC_opaque;
+extern CORBA::TypeCode TC_opaque;
// The decoder is exactly the reverse of the encoder, except that:
//
@@ -44,7 +48,7 @@ extern CORBA_TypeCode TC_opaque;
// TypeCodes, and strings.
//
// * The decoder is used when retrieving typecode parameters from
-// encapsulations. This means it must deal with "tk_indirect",
+// encapsulations. This means it must deal with "CORBA::tk_indirect",
// the magic value (~0) signifying typecode indirection.
//
// This second case is identified by a bit of a hack: the second
@@ -58,235 +62,235 @@ extern CORBA_TypeCode TC_opaque;
// code out into a separate routine called both by CDR::decoder () and
// by the code retrieving typecode parameters from encapsulations.
-CORBA_TypeCode_ptr __tc_consts [TC_KIND_COUNT] =
+CORBA::TypeCode_ptr __tc_consts [CORBA::TC_KIND_COUNT] =
{
- _tc_CORBA_Null
- , _tc_CORBA_Void
- , _tc_CORBA_Short
- , _tc_CORBA_Long
- , _tc_CORBA_UShort
-
- , _tc_CORBA_ULong
- , _tc_CORBA_Float
- , _tc_CORBA_Double
- , _tc_CORBA_Boolean
- , _tc_CORBA_Char
-
- , _tc_CORBA_Octet
- , _tc_CORBA_Any
- , _tc_CORBA_TypeCode
- , _tc_CORBA_Principal
- , 0 // _tc_CORBA_Object ... type ID is CORBA::Object
-
- , 0 // tk_struct
- , 0 // tk_union
- , 0 // tk_enum
- , 0 // _tc_CORBA_String ... unbounded
- , 0 // tk_sequence
-
- , 0 // tk_array
-
- , 0 // tk_alias
- , 0 // tk_except
-
- , _tc_CORBA_LongLong
- , _tc_CORBA_ULongLong
- , _tc_CORBA_LongDouble
- , _tc_CORBA_WChar
- , 0 // _tc_CORBA_WString ... unbounded
+ CORBA::_tc_null
+ , CORBA::_tc_void
+ , CORBA::_tc_short
+ , CORBA::_tc_long
+ , CORBA::_tc_ushort
+
+ , CORBA::_tc_ulong
+ , CORBA::_tc_float
+ , CORBA::_tc_double
+ , CORBA::_tc_boolean
+ , CORBA::_tc_char
+
+ , CORBA::_tc_octet
+ , CORBA::_tc_any
+ , CORBA::_tc_TypeCode
+ , CORBA::_tc_Principal
+ , 0 // CORBA::_tc_Object ... type ID is CORBA_Object
+
+ , 0 // CORBA_tk_struct
+ , 0 // CORBA_tk_union
+ , 0 // CORBA_tk_enum
+ , 0 // CORBA::_tc_string ... unbounded
+ , 0 // CORBA_tk_sequence
+
+ , 0 // CORBA_tk_array
+
+ , 0 // CORBA_tk_alias
+ , 0 // CORBA_tk_except
+
+ , CORBA::_tc_longlong
+ , CORBA::_tc_ulonglong
+ , CORBA::_tc_longdouble
+ , CORBA::_tc_wchar
+ , 0 // CORBA::_tc_wstring ... unbounded
};
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Primitive::decode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Primitive::decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // status of encode operation
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
switch (tc->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_decoding = stream->get_short (*(CORBA_Short *) data);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_decoding = stream->get_short (*(CORBA::Short *) data);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_decoding = stream->get_long (*(CORBA_Long *) data);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_decoding = stream->get_long (*(CORBA::Long *) data);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_decoding = stream->get_longlong (*(CORBA_LongLong *) data);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_decoding = stream->get_longlong (*(CORBA::LongLong *) data);
break;
- case tk_boolean:
- continue_decoding = stream->get_boolean (*(CORBA_Boolean *) data);
+ case CORBA::tk_boolean:
+ continue_decoding = stream->get_boolean (*(CORBA::Boolean *) data);
break;
- case tk_char:
- case tk_octet:
- continue_decoding = stream->get_char (*(CORBA_Char *) data);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_decoding = stream->get_char (*(CORBA::Char *) data);
break;
- case tk_longdouble:
- continue_decoding = stream->get_longdouble (*(CORBA_LongDouble *) data);
+ case CORBA::tk_longdouble:
+ continue_decoding = stream->get_longdouble (*(CORBA::LongDouble *) data);
break;
- case tk_wchar:
- continue_decoding = stream->get_wchar (*(CORBA_WChar *) data);
+ case CORBA::tk_wchar:
+ continue_decoding = stream->get_wchar (*(CORBA::WChar *) data);
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
// we are not a primitive type
}
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Primitive::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Any::decode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Any::decode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Any *any = (CORBA_Any *) data;
- CORBA_TypeCode_ptr elem_tc; // typecode of the element that makes the Any
+ CORBA::Any *any = (CORBA::Any *) data;
+ CORBA::TypeCode_ptr elem_tc; // typecode of the element that makes the Any
void *value = 0; // value maintained by the Any
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // status of encode operation
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
- // encode the typecode description for the element
- if (stream->decode (_tc_CORBA_TypeCode,
+ // decode the typecode description for the element
+ if (stream->decode (CORBA::_tc_TypeCode,
&elem_tc,
- 0,
- env) == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ this,
+ env) == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- value = new CORBA_Octet[elem_tc->size (env)];
+ value = new CORBA::Octet[elem_tc->size (env)];
if (env.exception () == 0)
{
// switch on the data type and handle the cases for
// primitives here for efficiency rather than calling
switch (elem_tc->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_decoding = stream->get_short (*(CORBA_Short *) value);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_decoding = stream->get_short (*(CORBA::Short *) value);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_decoding = stream->get_long (*(CORBA_Long *) value);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_decoding = stream->get_long (*(CORBA::Long *) value);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_decoding = stream->get_longlong (*(CORBA_LongLong *) value);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_decoding = stream->get_longlong (*(CORBA::LongLong *) value);
break;
- case tk_boolean:
- continue_decoding = stream->get_boolean (*(CORBA_Boolean *) value);
+ case CORBA::tk_boolean:
+ continue_decoding = stream->get_boolean (*(CORBA::Boolean *) value);
break;
- case tk_char:
- case tk_octet:
- continue_decoding = stream->get_char (*(CORBA_Char *) value);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_decoding = stream->get_char (*(CORBA::Char *) value);
break;
- case tk_longdouble:
- continue_decoding = stream->get_longdouble (*(CORBA_LongDouble *) value);
+ case CORBA::tk_longdouble:
+ continue_decoding = stream->get_longdouble (*(CORBA::LongDouble *) value);
break;
- case tk_wchar:
- continue_decoding = stream->get_wchar (*(CORBA_WChar *) value);
+ case CORBA::tk_wchar:
+ continue_decoding = stream->get_wchar (*(CORBA::WChar *) value);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->decode (elem_tc, value, 0, env);
break;
default:
// anything else is an error
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE)
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE)
{
// allocate an Any and populate it with the value and typecode. This
// eventually appears as "data"
- (void) new (any) CORBA_Any (elem_tc, value, CORBA_B_TRUE);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ (void) new (any) CORBA::Any (elem_tc, value, CORBA::B_TRUE);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
{
// free the allocated storage and release the typecode
delete [] value;
- CORBA_release (elem_tc);
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ CORBA::release (elem_tc);
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Any::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
-CORBA_TypeCode::traverse_status
-TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode_ptr *tcp; // typecode to be decoded
- CORBA_ULong kind; // typecode kind
- CORBA_TypeCode_ptr parent = (CORBA_TypeCode_ptr) parent_typecode; // TypeCode
+ CORBA::TypeCode_ptr *tcp; // typecode to be decoded
+ CORBA::ULong kind; // typecode kind
+ CORBA::TypeCode_ptr parent = (CORBA::TypeCode_ptr) parent_typecode; // TypeCode
// for the
// parent
// decode the "kind" field of the typecode from the stream
continue_decoding = stream->get_ulong (kind);
- if (continue_decoding == CORBA_B_TRUE)
+ if (continue_decoding == CORBA::B_TRUE)
{
- tcp = (CORBA_TypeCode_ptr *) data; // the data has to be a TypeCode_ptr*
+ tcp = (CORBA::TypeCode_ptr *) data; // the data has to be a TypeCode_ptr*
// Typecodes with empty parameter lists all have preallocated
// constants. We use those to reduce memory consumption and
// heap access ... also, to speed things up!
- if (kind < TC_KIND_COUNT
+ if (kind < CORBA::TC_KIND_COUNT
&& (*tcp = __tc_consts [(u_int) kind]) != 0)
*tcp = __tc_consts [(u_int) kind];
else
{
- if (kind == ~(CORBA_ULong)0 || kind < TC_KIND_COUNT)
+ if (kind == ~(CORBA::ULong)0 || kind < CORBA::TC_KIND_COUNT)
{
// either a non-constant typecode or an indirected typecode
switch (kind)
@@ -294,31 +298,31 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
// Need special handling for all kinds of typecodes
// that have nonempty parameter lists ...
default: // error: missed a case!
- env.exception (new CORBA_INTERNAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
// Some have "simple" parameter lists ... some of these also
// have preallocated constants that could be used.
- case tk_string:
- case tk_wstring:
+ case CORBA::tk_string:
+ case CORBA::tk_wstring:
{
- CORBA_ULong bound;
+ CORBA::ULong bound;
continue_decoding = stream->get_ulong (bound);
if (continue_decoding)
{
if (bound == 0)
{
- if (kind == tk_string)
- *tcp = _tc_CORBA_String;
+ if (kind == CORBA::tk_string)
+ *tcp = CORBA::_tc_string;
else
- *tcp = _tc_CORBA_WString;
+ *tcp = CORBA::_tc_wstring;
}
else
{
// bounded string. Save the bounds
- *tcp = new CORBA_TypeCode ((CORBA_TCKind) kind,
- bound, 0, CORBA_B_FALSE,
+ *tcp = new CORBA::TypeCode ((CORBA::TCKind) kind,
+ bound, 0, CORBA::B_FALSE,
parent);
// (*tcp)->_parent = parent;
}
@@ -336,8 +340,8 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
{
if (parent_typecode == 0)
{
- env.exception (new CORBA_INTERNAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// Get the long indicating the encapsulation offset,
@@ -345,7 +349,7 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
// but has space enough only for the typecode and the
// length for the encapsulated parameters.
CDR indir_stream;
- CORBA_Long offset;
+ CORBA::Long offset;
continue_decoding = stream->get_long (offset);
if (continue_decoding)
@@ -369,7 +373,7 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
// Reject indirections outside parent's scope.
if (indir_stream.next < parent->_buffer)
- continue_decoding = CORBA_B_FALSE;
+ continue_decoding = CORBA::B_FALSE;
}
// Get "kind" and length of target typecode
@@ -379,16 +383,16 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
// typecode -- not the right assumption; see how the
// TypeCode interpreter does it.
- CORBA_ULong indir_kind;
- CORBA_ULong indir_len;
+ CORBA::ULong indir_kind;
+ CORBA::ULong indir_len;
// retrieve the typecode kind
if (continue_decoding)
continue_decoding = indir_stream.get_ulong (indir_kind);
if (continue_decoding
- && indir_kind >= TC_KIND_COUNT)
- continue_decoding = CORBA_B_FALSE;
+ && indir_kind >= CORBA::TC_KIND_COUNT)
+ continue_decoding = CORBA::B_FALSE;
// now retrieve the encapsulation length
if (continue_decoding)
@@ -400,10 +404,10 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
// reducing the cost of getting typecodes.
if (continue_decoding)
{
- *tcp = new CORBA_TypeCode ((CORBA_TCKind) indir_kind,
+ *tcp = new CORBA::TypeCode ((CORBA::TCKind) indir_kind,
indir_len, // length of encapsulation
indir_stream.next, // octet buffer
- CORBA_B_FALSE, // ORB
+ CORBA::B_FALSE, // ORB
// doesn't own
parent); // this is our parent
#if 0
@@ -416,17 +420,17 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
// The rest have "complex" parameter lists that are
// encoded as bulk octets ...
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_enum:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_enum:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
{
- CORBA_ULong length;
- CORBA_Octet *buffer;
+ CORBA::ULong length;
+ CORBA::Octet *buffer;
continue_decoding = stream->get_ulong (length);
if (!continue_decoding)
@@ -435,56 +439,62 @@ TAO_Marshal_TypeCode::decode (CORBA_TypeCode_ptr,
// if length > MAXUNSIGNED, error ...
u_int len = (u_int) length;
- buffer = new CORBA_Octet[len];
+#if 0
+ buffer = new CORBA::Octet[len];
for (u_int i = 0; i < len && continue_decoding; i++)
continue_decoding = stream->get_octet (buffer [i]);
+#endif
if (!continue_decoding)
{
- delete [] buffer;
+ // delete [] buffer;
break;
}
- *tcp = new CORBA_TypeCode ((CORBA_TCKind) kind,
+ *tcp = new CORBA::TypeCode ((CORBA::TCKind) kind,
len,
- buffer,
- CORBA_B_FALSE,
+ // buffer,
+ stream->next,
+ CORBA::B_FALSE,
parent);
+ // skip length number of bytes in the stream, else we may
+ // leave the stream in an undefined state
+ (void) stream->skip_bytes (length);
// (*tcp)->_parent = parent;
}
} // end of switch
}
else // bad _kind value to be decoded
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg ("TAO_Marshal_TypeCode: Bad _kind value in CDR stream");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
}
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_TypeCode::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode Principal
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Principal::decode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Principal::decode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_Principal_ptr *pp = (CORBA_Principal_ptr *) data;
- CORBA_ULong len;
+ CORBA::Principal_ptr *pp = (CORBA::Principal_ptr *) data;
+ CORBA::ULong len;
continue_decoding = stream->get_ulong (len);
if (len == 0)
@@ -492,42 +502,42 @@ TAO_Marshal_Principal::decode (CORBA_TypeCode_ptr,
else
{
// allocate storage for Principal and its buffer
- *pp = new CORBA_Principal;
- (*pp)->id.buffer = new CORBA_Octet [ (size_t) len];
+ *pp = new CORBA::Principal;
+ (*pp)->id.buffer = new CORBA::Octet [ (size_t) len];
(*pp)->id.maximum = (*pp)->id.length = len;
for (u_int i = 0;
- continue_decoding != CORBA_B_FALSE && i < len;
+ continue_decoding != CORBA::B_FALSE && i < len;
i++)
continue_decoding = stream->get_octet ((*pp)->id.buffer [i]);
}
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Principal::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// decode obj ref
-CORBA_TypeCode::traverse_status
-TAO_Marshal_ObjRef::decode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_String type_hint;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::String type_hint;
// First, read the type hint. This will be the type_id encoded in an
// object reference.
- stream->decode (_tc_CORBA_String, &type_hint, 0, env);
+ stream->decode (CORBA::_tc_string, &type_hint, 0, env);
// Read the profiles, discarding all until an IIOP profile comes by.
// Once we see an IIOP profile, ignore any further ones.
@@ -538,7 +548,7 @@ TAO_Marshal_ObjRef::decode (CORBA_TypeCode_ptr,
// just need to be able to access such preloaded libraries here as
// we unmarshal objrefs.
- CORBA_ULong profiles;
+ CORBA::ULong profiles;
IIOP_Object *objdata = 0;
// get the count of profiles that follow
@@ -548,14 +558,14 @@ TAO_Marshal_ObjRef::decode (CORBA_TypeCode_ptr,
if (profiles == 0)
{
- *(CORBA_Object_ptr *) data = CORBA_Object::_nil ();
+ *(CORBA::Object_ptr *) data = CORBA::Object::_nil ();
delete type_hint;
}
else
{
while (profiles-- != 0 && continue_decoding)
{
- CORBA_ULong tmp;
+ CORBA::ULong tmp;
// get the profile ID tag
stream->get_ulong (tmp);
@@ -609,14 +619,14 @@ TAO_Marshal_ObjRef::decode (CORBA_TypeCode_ptr,
}
// Get host and port
- if (str.decode (_tc_CORBA_String, &profile->host, 0, env)
- != CORBA_TypeCode::TRAVERSE_CONTINUE
+ if (str.decode (CORBA::_tc_string, &profile->host, 0, env)
+ != CORBA::TypeCode::TRAVERSE_CONTINUE
|| !str.get_ushort (profile->port))
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("error decoding IIOP host/port");
objdata->Release ();
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// ... and object key
@@ -624,56 +634,56 @@ TAO_Marshal_ObjRef::decode (CORBA_TypeCode_ptr,
continue_decoding = str.decode (&TC_opaque,
&profile->object_key,
0,
- env) == CORBA_TypeCode::TRAVERSE_CONTINUE;
+ env) == CORBA::TypeCode::TRAVERSE_CONTINUE;
if (str.remaining != 0)
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("extra data at end of IIOP profile data");
objdata->Release ();
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
}
if (objdata == 0)
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg2 ("no IIOP v%d.%d (or earlier) profile in IOR!",
IIOP::MY_MAJOR, IIOP::MY_MINOR);
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
{
- // retrieve the CORBA_Object from the IIOP_Object we created before.
+ // retrieve the CORBA::Object from the IIOP_Object we created before.
if (objdata->QueryInterface (IID_CORBA_Object,
(void **) data) != NOERROR)
- continue_decoding = CORBA_B_FALSE;
+ continue_decoding = CORBA::B_FALSE;
objdata->Release ();
}
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("marshaling encode_struct detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// decode structs
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Struct::decode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Struct::decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
CDR *stream = (CDR *) context;
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
- CORBA_TypeCode_ptr param;
- CORBA_Long size, alignment;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
+ CORBA::TypeCode_ptr param;
+ CORBA::Long size, alignment;
// number of fields in the struct
int member_count = tc->member_count (env);
@@ -681,8 +691,8 @@ TAO_Marshal_Struct::decode (CORBA_TypeCode_ptr tc,
if (env.exception () == 0)
{
for (int i = 0; i < member_count
- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE;
+ && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE;
i++)
{
param = tc->member_type (i, env);
@@ -697,49 +707,49 @@ TAO_Marshal_Struct::decode (CORBA_TypeCode_ptr tc,
data = ptr_align_binary (data, alignment);
switch (param->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_decoding = stream->get_short (*(CORBA_Short *) data);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_decoding = stream->get_short (*(CORBA::Short *) data);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_decoding = stream->get_long (*(CORBA_Long *) data);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_decoding = stream->get_long (*(CORBA::Long *) data);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_decoding = stream->get_longlong (*(CORBA_LongLong *) data);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_decoding = stream->get_longlong (*(CORBA::LongLong *) data);
break;
- case tk_boolean:
- continue_decoding = stream->get_boolean (*(CORBA_Boolean *) data);
+ case CORBA::tk_boolean:
+ continue_decoding = stream->get_boolean (*(CORBA::Boolean *) data);
break;
- case tk_char:
- case tk_octet:
- continue_decoding = stream->get_char (*(CORBA_Char *) data);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_decoding = stream->get_char (*(CORBA::Char *) data);
break;
- case tk_longdouble:
- continue_decoding = stream->get_longdouble (*(CORBA_LongDouble *) data);
+ case CORBA::tk_longdouble:
+ continue_decoding = stream->get_longdouble (*(CORBA::LongDouble *) data);
break;
- case tk_wchar:
- continue_decoding = stream->get_wchar (*(CORBA_WChar *) data);
+ case CORBA::tk_wchar:
+ continue_decoding = stream->get_wchar (*(CORBA::WChar *) data);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->decode (param, data, 0, env);
break;
default:
@@ -748,50 +758,50 @@ TAO_Marshal_Struct::decode (CORBA_TypeCode_ptr tc,
data = (char *) data + size;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("marshaling encode_struct detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode unions
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Union::decode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Union::decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *data2,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
- CORBA_TypeCode_ptr discrim_tc;
- CORBA_TypeCode_ptr member_tc;
- CORBA_Any_ptr member_label;
- CORBA_ULong discrim_size_with_pad;
+ CORBA::TypeCode_ptr discrim_tc;
+ CORBA::TypeCode_ptr member_tc;
+ CORBA::Any_ptr member_label;
+ CORBA::ULong discrim_size_with_pad;
const void *discrim_val;
- CORBA_ULong member_count;
- CORBA_Long default_index;
- CORBA_ULong i;
- CORBA_TypeCode_ptr default_tc = 0;
- CORBA_Boolean discrim_matched = CORBA_B_FALSE;
+ CORBA::ULong member_count;
+ CORBA::Long default_index;
+ CORBA::ULong i;
+ CORBA::TypeCode_ptr default_tc = 0;
+ CORBA::Boolean discrim_matched = CORBA::B_FALSE;
discrim_tc = tc->discriminator_type (env);
// get the discriminator type
@@ -800,7 +810,7 @@ TAO_Marshal_Union::decode (CORBA_TypeCode_ptr tc,
{
// decode the discriminator value
retval = stream->decode (discrim_tc, data, data2, env);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
discrim_size_with_pad = tc->TAO_discrim_pad_size (env);
@@ -832,37 +842,37 @@ TAO_Marshal_Union::decode (CORBA_TypeCode_ptr tc,
// do the matching
switch (member_label->type ()->kind (env))
{
- case tk_short:
- case tk_ushort:
- if (*(CORBA_Short *) member_label->value () ==
- *(CORBA_Short *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ if (*(CORBA::Short *) member_label->value () ==
+ *(CORBA::Short *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_enum:
- if (*(CORBA_ULong *) member_label->value () ==
- *(CORBA_ULong *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_enum:
+ if (*(CORBA::ULong *) member_label->value () ==
+ *(CORBA::ULong *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_char:
- if (*(CORBA_Char *) member_label->value () ==
- *(CORBA_Char *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_char:
+ if (*(CORBA::Char *) member_label->value () ==
+ *(CORBA::Char *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_wchar:
- if (*(CORBA_WChar *) member_label->value () ==
- *(CORBA_WChar *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_wchar:
+ if (*(CORBA::WChar *) member_label->value () ==
+ *(CORBA::WChar *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_boolean:
- if (*(CORBA_Boolean *) member_label->value () ==
- *(CORBA_Boolean *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_boolean:
+ if (*(CORBA::Boolean *) member_label->value () ==
+ *(CORBA::Boolean *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}// end of switch
// get the member typecode
@@ -880,65 +890,65 @@ TAO_Marshal_Union::decode (CORBA_TypeCode_ptr tc,
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of for loop
// we are here only if there was no match
if (default_tc)
return stream->decode (default_tc, data, data2, env);
else
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// decode string
-CORBA_TypeCode::traverse_status
-TAO_Marshal_String::decode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_String::decode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_ULong len = 0;
- CORBA_String str;
+ CORBA::ULong len = 0;
+ CORBA::String str;
// On decode, omit the check against specified string bounds, and
// cope with illegal "zero length" strings (all lengths on the wire
@@ -951,42 +961,42 @@ TAO_Marshal_String::decode (CORBA_TypeCode_ptr,
continue_decoding = stream->get_ulong (len);
// note that the encoded length is 1 more than the length of the string
// because it also accounts for the terminating NULL character
- *((CORBA_String *) data) = str = new CORBA_Char [(size_t) (len)];
+ *((CORBA::String *) data) = str = new CORBA::Char [(size_t) (len)];
if (len != 0)
{
- while (continue_decoding != CORBA_B_FALSE && len-- != 0)
+ while (continue_decoding != CORBA::B_FALSE && len-- != 0)
{
- continue_decoding = stream->get_char (*(CORBA_Char *) str);
+ continue_decoding = stream->get_char (*(CORBA::Char *) str);
str++;
}
}
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_TypeCode::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// decode sequence
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Sequence::decode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Sequence::decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context;
- CORBA_OctetSeq *seq = (CORBA_OctetSeq *) data;
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
- CORBA_TypeCode_ptr tc2; // typecode of the element
+ CORBA::OctetSeq *seq = (CORBA::OctetSeq *) data;
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode_ptr tc2; // typecode of the element
size_t size; // size of element
- CORBA_ULong bounds;
+ CORBA::ULong bounds;
char *value;
// First unmarshal the sequence length ... we trust it to be right
@@ -1013,130 +1023,130 @@ TAO_Marshal_Sequence::decode (CORBA_TypeCode_ptr tc,
{
bounds = seq->length;
// allocate a buffer to hold the sequence
- seq->buffer = new CORBA_Octet [size *(size_t) seq->maximum];
+ seq->buffer = new CORBA::Octet [size *(size_t) seq->maximum];
value = (char *) seq->buffer;
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_short (*(CORBA_Short *) value);
+ continue_decoding = stream->get_short (*(CORBA::Short *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_long (*(CORBA_Long *) value);
+ continue_decoding = stream->get_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_longlong (*(CORBA_LongLong *) value);
+ continue_decoding = stream->get_longlong (*(CORBA::LongLong *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_boolean:
+ case CORBA::tk_boolean:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_boolean (*(CORBA_Boolean *) value);
+ continue_decoding = stream->get_boolean (*(CORBA::Boolean *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_char:
- case tk_octet:
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_char (*(CORBA_Char *) value);
+ continue_decoding = stream->get_char (*(CORBA::Char *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_longdouble:
+ case CORBA::tk_longdouble:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_longdouble (*(CORBA_LongDouble *) value);
+ continue_decoding = stream->get_longdouble (*(CORBA::LongDouble *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_wchar (*(CORBA_WChar *) value);
+ continue_decoding = stream->get_wchar (*(CORBA::WChar *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_enum:
+ case CORBA::tk_enum:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_long (*(CORBA_Long *) value);
+ continue_decoding = stream->get_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
// handle all aggregate types here
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
// For those aggregate types whose size is constant, we
// compute it only once
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = stream->decode (tc2, value, 0, env);
value += size;
}
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
default:
break;
@@ -1145,29 +1155,29 @@ TAO_Marshal_Sequence::decode (CORBA_TypeCode_ptr tc,
} // no exception computing content type
} // length is > 0
else
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// decode array
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Array::decode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Array::decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context;
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
- CORBA_TypeCode_ptr tc2; // typecode of the element
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode_ptr tc2; // typecode of the element
size_t size; // size of element
- CORBA_ULong bounds;
+ CORBA::ULong bounds;
char *value = (char *) data;
// retrieve the bounds of the array
@@ -1184,126 +1194,126 @@ TAO_Marshal_Array::decode (CORBA_TypeCode_ptr tc,
{
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_short (*(CORBA_Short *) value);
+ continue_decoding = stream->get_short (*(CORBA::Short *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_long (*(CORBA_Long *) value);
+ continue_decoding = stream->get_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_longlong (*(CORBA_LongLong *) value);
+ continue_decoding = stream->get_longlong (*(CORBA::LongLong *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_boolean:
+ case CORBA::tk_boolean:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_boolean (*(CORBA_Boolean *) value);
+ continue_decoding = stream->get_boolean (*(CORBA::Boolean *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_char:
- case tk_octet:
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_char (*(CORBA_Char *) value);
+ continue_decoding = stream->get_char (*(CORBA::Char *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_longdouble:
+ case CORBA::tk_longdouble:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_longdouble (*(CORBA_LongDouble *) value);
+ continue_decoding = stream->get_longdouble (*(CORBA::LongDouble *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_wchar (*(CORBA_WChar *) value);
+ continue_decoding = stream->get_wchar (*(CORBA::WChar *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_enum:
+ case CORBA::tk_enum:
// For primitives, compute the size only once
- while (bounds-- && continue_decoding == CORBA_B_TRUE)
+ while (bounds-- && continue_decoding == CORBA::B_TRUE)
{
- continue_decoding = stream->get_long (*(CORBA_Long *) value);
+ continue_decoding = stream->get_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
// handle all aggregate types here
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
// For those aggregate types whose size is constant, we
// compute it only once
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = stream->decode (tc2, value, 0, env);
value += size;
}
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
default:
break;
@@ -1312,24 +1322,24 @@ TAO_Marshal_Array::decode (CORBA_TypeCode_ptr tc,
} // no exception computing content type
} // no exception computing bounds
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// decode alias
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Alias::decode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Alias::decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode_ptr tc2; // typecode of the aliased type
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::TypeCode_ptr tc2; // typecode of the aliased type
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // status of decode operation
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of decode operation
char *value = (char *) data;
tc2 = tc->content_type (env);
@@ -1339,65 +1349,65 @@ TAO_Marshal_Alias::decode (CORBA_TypeCode_ptr tc,
// efficiency rather than calling
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_decoding = stream->get_short (*(CORBA_Short *) value);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_decoding = stream->get_short (*(CORBA::Short *) value);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_decoding = stream->get_long (*(CORBA_Long *) value);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_decoding = stream->get_long (*(CORBA::Long *) value);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_decoding = stream->get_longlong (*(CORBA_LongLong *) value);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_decoding = stream->get_longlong (*(CORBA::LongLong *) value);
break;
- case tk_boolean:
- continue_decoding = stream->get_boolean (*(CORBA_Boolean *) value);
+ case CORBA::tk_boolean:
+ continue_decoding = stream->get_boolean (*(CORBA::Boolean *) value);
break;
- case tk_char:
- case tk_octet:
- continue_decoding = stream->get_char (*(CORBA_Char *) value);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_decoding = stream->get_char (*(CORBA::Char *) value);
break;
- case tk_longdouble:
- continue_decoding = stream->get_longdouble (*(CORBA_LongDouble *) value);
+ case CORBA::tk_longdouble:
+ continue_decoding = stream->get_longdouble (*(CORBA::LongDouble *) value);
break;
- case tk_wchar:
- continue_decoding = stream->get_wchar (*(CORBA_WChar *) value);
+ case CORBA::tk_wchar:
+ continue_decoding = stream->get_wchar (*(CORBA::WChar *) value);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->decode (tc2, value, 0, env);
break;
default:
// anything else is an error
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
}
// tc2->Release ();
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Alias::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -1408,28 +1418,28 @@ TAO_Marshal_Alias::decode (CORBA_TypeCode_ptr tc,
// established.
//
// NOTE: This is asymmetric with respect to encoding exceptions.
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Except::decode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Except::decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
CDR *stream = (CDR *) context;
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
- CORBA_TypeCode_ptr param;
- CORBA_Long size, alignment;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
+ CORBA::TypeCode_ptr param;
+ CORBA::Long size, alignment;
- data = (char *) data + sizeof (CORBA_Exception);
+ data = (char *) data + sizeof (CORBA::Exception);
// number of fields in the struct
int member_count = tc->member_count (env);
if (env.exception () == 0)
{
for (int i = 0; i < member_count
- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE; i++)
+ && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE; i++)
{
param = tc->member_type (i, env);
if (env.exception () == 0)
@@ -1443,49 +1453,49 @@ TAO_Marshal_Except::decode (CORBA_TypeCode_ptr tc,
data = ptr_align_binary (data, alignment);
switch (param->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_decoding = stream->get_short (*(CORBA_Short *) data);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_decoding = stream->get_short (*(CORBA::Short *) data);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_decoding = stream->get_long (*(CORBA_Long *) data);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_decoding = stream->get_long (*(CORBA::Long *) data);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_decoding = stream->get_longlong (*(CORBA_LongLong *) data);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_decoding = stream->get_longlong (*(CORBA::LongLong *) data);
break;
- case tk_boolean:
- continue_decoding = stream->get_boolean (*(CORBA_Boolean *) data);
+ case CORBA::tk_boolean:
+ continue_decoding = stream->get_boolean (*(CORBA::Boolean *) data);
break;
- case tk_char:
- case tk_octet:
- continue_decoding = stream->get_char (*(CORBA_Char *) data);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_decoding = stream->get_char (*(CORBA::Char *) data);
break;
- case tk_longdouble:
- continue_decoding = stream->get_longdouble (*(CORBA_LongDouble *) data);
+ case CORBA::tk_longdouble:
+ continue_decoding = stream->get_longdouble (*(CORBA::LongDouble *) data);
break;
- case tk_wchar:
- continue_decoding = stream->get_wchar (*(CORBA_WChar *) data);
+ case CORBA::tk_wchar:
+ continue_decoding = stream->get_wchar (*(CORBA::WChar *) data);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->decode (param, data, 0, env);
break;
default:
@@ -1494,41 +1504,41 @@ TAO_Marshal_Except::decode (CORBA_TypeCode_ptr tc,
data = (char *) data + size;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Except detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// decode wstring
-CORBA_TypeCode::traverse_status
-TAO_Marshal_WString::decode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_WString::decode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_decoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_WChar *str = *(CORBA_WChar **) data;
- CORBA_ULong len;
+ CORBA::WChar *str = *(CORBA::WChar **) data;
+ CORBA::ULong len;
// On decode, omit the check against specified wstring bounds, and
// cope with illegal "zero length" strings (all lengths on the wire
@@ -1540,22 +1550,22 @@ TAO_Marshal_WString::decode (CORBA_TypeCode_ptr,
continue_decoding = stream->get_ulong (len);
- *((CORBA_WChar **) data) = str = new CORBA_WChar [(size_t) (len)];
+ *((CORBA::WChar **) data) = str = new CORBA::WChar [(size_t) (len)];
if (len != 0)
- while (continue_decoding != CORBA_B_FALSE && len--)
+ while (continue_decoding != CORBA::B_FALSE && len--)
{
continue_decoding = stream->get_wchar (*str);
str++;
}
- if (continue_decoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (continue_decoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_TypeCode::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
diff --git a/TAO/tao/deep_copy.cpp b/TAO/tao/deep_copy.cpp
index 308b1029ba2..9da7dc8b34b 100644
--- a/TAO/tao/deep_copy.cpp
+++ b/TAO/tao/deep_copy.cpp
@@ -26,22 +26,26 @@
//
// ============================================================================
+#if 0
#include "tao/orb.h"
#include "tao/cdr.h"
#include "tao/giop.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
#if defined (HAVE_WIDEC_H)
# include <widec.h>
#else
extern "C"
{
- u_int wslen (const CORBA_WChar *);
- CORBA_WChar *wscpy (CORBA_WChar *, const CORBA_WChar *);
+ unsigned int wslen (const CORBA::WChar *);
+ CORBA::WChar *wscpy (CORBA::WChar *, const CORBA::WChar *);
}
#endif /* HAVE_WIDEC_H */
-extern CORBA_TypeCode TC_opaque;
+extern CORBA::TypeCode TC_opaque;
// Deep copy from "source" to "dest" ... this code "knows" a bit
// about representations, verify it when porting to oddball
@@ -50,172 +54,172 @@ extern CORBA_TypeCode TC_opaque;
//
-CORBA_TypeCode::traverse_status
-DEEP_COPY (CORBA_TypeCode_ptr param,
+CORBA::TypeCode::traverse_status
+DEEP_COPY (CORBA::TypeCode_ptr param,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
switch (param->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- *(CORBA_Short *) dest = *(CORBA_Short *) source;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ *(CORBA::Short *) dest = *(CORBA::Short *) source;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- *(CORBA_Long *) dest = *(CORBA_Long *) source;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ *(CORBA::Long *) dest = *(CORBA::Long *) source;
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- *(CORBA_LongLong *) dest = *(CORBA_LongLong *) source;
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source;
break;
- case tk_boolean:
- *(CORBA_Boolean *) dest = *(CORBA_Boolean *) source;
+ case CORBA::tk_boolean:
+ *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source;
break;
- case tk_char:
- case tk_octet:
- *(CORBA_Char *) dest = *(CORBA_Char *) source;
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ *(CORBA::Char *) dest = *(CORBA::Char *) source;
break;
- case tk_longdouble:
- *(CORBA_LongDouble *) dest = *(CORBA_LongDouble *) source;
+ case CORBA::tk_longdouble:
+ *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source;
break;
- case tk_wchar:
- *(CORBA_WChar *) dest = *(CORBA_WChar *) source;
+ case CORBA::tk_wchar:
+ *(CORBA::WChar *) dest = *(CORBA::WChar *) source;
break;
- case tk_any:
+ case CORBA::tk_any:
retval = TAO_Marshal_Any::deep_copy (param, source, dest, env);
break;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
retval = TAO_Marshal_TypeCode::deep_copy (param, source, dest, env);
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
retval = TAO_Marshal_Principal::deep_copy (param, source, dest, env);
break;
- case tk_objref:
+ case CORBA::tk_objref:
retval = TAO_Marshal_ObjRef::deep_copy (param, source, dest, env);
break;
- case tk_struct:
+ case CORBA::tk_struct:
retval = TAO_Marshal_Struct::deep_copy (param, source, dest, env);
break;
- case tk_union:
+ case CORBA::tk_union:
retval = TAO_Marshal_Union::deep_copy (param, source, dest, env);
break;
- case tk_string:
+ case CORBA::tk_string:
retval = TAO_Marshal_String::deep_copy (param, source, dest, env);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_copy (param, source, dest, env);
break;
- case tk_array:
+ case CORBA::tk_array:
retval = TAO_Marshal_Array::deep_copy (param, source, dest, env);
break;
- case tk_alias:
+ case CORBA::tk_alias:
retval = TAO_Marshal_Alias::deep_copy (param, source, dest, env);
break;
- case tk_except:
+ case CORBA::tk_except:
retval = TAO_Marshal_Except::deep_copy (param, source, dest, env);
break;
- case tk_wstring:
+ case CORBA::tk_wstring:
retval = TAO_Marshal_WString::deep_copy (param, source, dest, env);
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
} // end of switch
return retval;
}
// deep copy for primitives
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Primitive::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Primitive::deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
if (tc)
{
- CORBA_TCKind my_kind = tc->kind (env);
+ CORBA::TCKind my_kind = tc->kind (env);
if (env.exception () == 0)
{
switch (my_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
// @@ I assume this should be an error...
break;
- case tk_char:
- case tk_octet:
- *(CORBA_Octet *) dest = *(CORBA_Octet *) source;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ *(CORBA::Octet *) dest = *(CORBA::Octet *) source;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
- *(CORBA_Short *) dest = *(CORBA_Short *) source;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ *(CORBA::Short *) dest = *(CORBA::Short *) source;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
- case tk_wchar:
- *(CORBA_WChar *) dest = *(CORBA_WChar *) source;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_wchar:
+ *(CORBA::WChar *) dest = *(CORBA::WChar *) source;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- *(CORBA_Long *) dest = *(CORBA_Long *) source;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ *(CORBA::Long *) dest = *(CORBA::Long *) source;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
- case tk_longlong:
- case tk_ulonglong:
- case tk_double:
- *(CORBA_LongLong *) dest = *(CORBA_LongLong *) source;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ case CORBA::tk_double:
+ *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
- case tk_longdouble:
- *(CORBA_LongDouble *) dest = *(CORBA_LongDouble *) source;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_longdouble:
+ *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
- case tk_boolean:
- *(CORBA_Boolean *) dest = *(CORBA_Boolean *) source;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_boolean:
+ *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Primitive::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
dmsg ("TAO_Marshal_Primitive::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE) );
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE) );
dmsg ("TAO_Marshal_Primitive::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// deep_copy for Principal
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Principal::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Principal::deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
if (tc)
{
- CORBA_Principal_ptr src = *(CORBA_Principal_ptr *) source;
- CORBA_Principal_ptr dst = *(CORBA_Principal_ptr *) dest = new CORBA_Principal;
+ CORBA::Principal_ptr src = *(CORBA::Principal_ptr *) source;
+ CORBA::Principal_ptr dst = *(CORBA::Principal_ptr *) dest = new CORBA::Principal;
if (dst)
{
@@ -225,48 +229,48 @@ TAO_Marshal_Principal::deep_copy (CORBA_TypeCode_ptr tc,
if (dst->id.length > 0)
{
- dst->id.buffer = new CORBA_Octet [(u_int) dst->id.length];
+ dst->id.buffer = new CORBA::Octet [(u_int) dst->id.length];
if (dst->id.buffer)
{
ACE_OS::memcpy (dst->id.buffer,
src->id.buffer,
(size_t) dst->id.length);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
{
- env.exception (new CORBA_NO_MEMORY (COMPLETED_MAYBE) );
+ env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_MAYBE) );
dmsg ("TAO_Marshal_Principal::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
dst->id.buffer = 0;
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
}
else
{
- env.exception (new CORBA_NO_MEMORY (COMPLETED_MAYBE) );
+ env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_MAYBE) );
dmsg ("TAO_Marshal_Principal::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE) );
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE) );
dmsg ("TAO_Marshal_Primitive::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_copy structs
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Struct::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Struct::deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
if (tc)
{
@@ -275,96 +279,96 @@ TAO_Marshal_Struct::deep_copy (CORBA_TypeCode_ptr tc,
if (env.exception () == 0)
{
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
for (int i = 0; i < member_count
- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE;
+ && retval == CORBA::TypeCode::TRAVERSE_CONTINUE;
i++)
{
// get the typecode for the ith field
- CORBA_TypeCode_ptr param = tc->member_type (i, env);
+ CORBA::TypeCode_ptr param = tc->member_type (i, env);
if (env.exception () == 0)
{
// get the size of the field
- CORBA_Long size = param->size (env);
+ CORBA::Long size = param->size (env);
if (env.exception () == 0)
{
// get the alignment of the field
- CORBA_Long alignment = param->alignment (env);
+ CORBA::Long alignment = param->alignment (env);
if (env.exception () == 0)
{
switch (param->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- *(CORBA_Short *) dest = *(CORBA_Short *) source;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ *(CORBA::Short *) dest = *(CORBA::Short *) source;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- *(CORBA_Long *) dest = *(CORBA_Long *) source;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ *(CORBA::Long *) dest = *(CORBA::Long *) source;
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- *(CORBA_LongLong *) dest = *(CORBA_LongLong *) source;
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source;
break;
- case tk_boolean:
- *(CORBA_Boolean *) dest = *(CORBA_Boolean *) source;
+ case CORBA::tk_boolean:
+ *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source;
break;
- case tk_char:
- case tk_octet:
- *(CORBA_Char *) dest = *(CORBA_Char *) source;
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ *(CORBA::Char *) dest = *(CORBA::Char *) source;
break;
- case tk_longdouble:
- *(CORBA_LongDouble *) dest = *(CORBA_LongDouble *) source;
+ case CORBA::tk_longdouble:
+ *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source;
break;
- case tk_wchar:
- *(CORBA_WChar *) dest = *(CORBA_WChar *) source;
+ case CORBA::tk_wchar:
+ *(CORBA::WChar *) dest = *(CORBA::WChar *) source;
break;
- case tk_any:
+ case CORBA::tk_any:
retval = TAO_Marshal_Any::deep_copy (param, source, dest, env);
break;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
retval = TAO_Marshal_TypeCode::deep_copy (param, source, dest, env);
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
retval = TAO_Marshal_Principal::deep_copy (param, source, dest, env);
break;
- case tk_objref:
+ case CORBA::tk_objref:
retval = TAO_Marshal_ObjRef::deep_copy (param, source, dest, env);
break;
- case tk_struct:
+ case CORBA::tk_struct:
retval = TAO_Marshal_Struct::deep_copy (param, source, dest, env);
break;
- case tk_union:
+ case CORBA::tk_union:
retval = TAO_Marshal_Union::deep_copy (param, source, dest, env);
break;
- case tk_string:
+ case CORBA::tk_string:
retval = TAO_Marshal_String::deep_copy (param, source, dest, env);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_copy (param, source, dest, env);
break;
- case tk_array:
+ case CORBA::tk_array:
retval = TAO_Marshal_Array::deep_copy (param, source, dest, env);
break;
- case tk_alias:
+ case CORBA::tk_alias:
retval = TAO_Marshal_Alias::deep_copy (param, source, dest, env);
break;
- case tk_except:
+ case CORBA::tk_except:
retval = TAO_Marshal_Except::deep_copy (param, source, dest, env);
break;
- case tk_wstring:
+ case CORBA::tk_wstring:
retval = TAO_Marshal_WString::deep_copy (param, source, dest, env);
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
} // end of switch
source = (char *) source + size;
dest = (char *) dest + size;
@@ -372,68 +376,68 @@ TAO_Marshal_Struct::deep_copy (CORBA_TypeCode_ptr tc,
else // exception computing alignment
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing size
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing typecode
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of loop
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception getting member count
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_copy for union
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Union::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Union::deep_copy (CORBA::TypeCode_ptr tc,
const void *data,
const void *data2,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode_ptr discrim_tc = tc->discriminator_type (env);
+ CORBA::TypeCode_ptr discrim_tc = tc->discriminator_type (env);
// Get the discriminator type.
if (env.exception () == 0)
{
// deep_copy the discriminator value
- CORBA_TypeCode::traverse_status retval =
+ CORBA::TypeCode::traverse_status retval =
DEEP_COPY (discrim_tc, data, data2, env);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- CORBA_ULong discrim_size_with_pad =
+ CORBA::ULong discrim_size_with_pad =
tc->TAO_discrim_pad_size (env);
if (env.exception () == 0)
{
- CORBA_TypeCode_ptr default_tc = 0;
+ CORBA::TypeCode_ptr default_tc = 0;
const void *discrim_val = data; // save the pointer to the discriminator
// value
@@ -441,7 +445,7 @@ TAO_Marshal_Union::deep_copy (CORBA_TypeCode_ptr tc,
data = (char *) data + discrim_size_with_pad;
data2 = (char *) data2 + discrim_size_with_pad;
// now get ready to marshal the actual union value
- CORBA_Long default_index = tc->default_index (env);
+ CORBA::Long default_index = tc->default_index (env);
if (env.exception () == 0)
{
int member_count = tc->member_count (env);
@@ -453,49 +457,49 @@ TAO_Marshal_Union::deep_copy (CORBA_TypeCode_ptr tc,
// and marshal accordingly. Otherwise it is an error.
for (int i = 0; member_count-- != 0; i++)
{
- CORBA_Any_ptr member_label = tc->member_label (i, env);
+ CORBA::Any_ptr member_label = tc->member_label (i, env);
if (env.exception () == 0)
{
- CORBA_Boolean discrim_matched = CORBA_B_FALSE;
+ CORBA::Boolean discrim_matched = CORBA::B_FALSE;
// do the matching
switch (member_label->type ()->kind (env))
{
- case tk_short:
- case tk_ushort:
- if (*(CORBA_Short *) member_label->value () ==
- *(CORBA_Short *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ if (*(CORBA::Short *) member_label->value () ==
+ *(CORBA::Short *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_enum:
- if (*(CORBA_ULong *) member_label->value () ==
- *(CORBA_ULong *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_enum:
+ if (*(CORBA::ULong *) member_label->value () ==
+ *(CORBA::ULong *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_char:
- if (*(CORBA_Char *) member_label->value () ==
- *(CORBA_Char *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_char:
+ if (*(CORBA::Char *) member_label->value () ==
+ *(CORBA::Char *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_wchar:
- if (*(CORBA_WChar *) member_label->value () ==
- *(CORBA_WChar *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_wchar:
+ if (*(CORBA::WChar *) member_label->value () ==
+ *(CORBA::WChar *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_boolean:
- if (*(CORBA_Boolean *) member_label->value () ==
- *(CORBA_Boolean *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_boolean:
+ if (*(CORBA::Boolean *) member_label->value () ==
+ *(CORBA::Boolean *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}// end of switch
// get the member typecode
- CORBA_TypeCode_ptr member_tc = tc->member_type (i, env);
+ CORBA::TypeCode_ptr member_tc = tc->member_type (i, env);
if (env.exception () == 0)
{
if (default_index >= 0 && default_index-- == 0)
@@ -509,14 +513,14 @@ TAO_Marshal_Union::deep_copy (CORBA_TypeCode_ptr tc,
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of while
@@ -524,53 +528,53 @@ TAO_Marshal_Union::deep_copy (CORBA_TypeCode_ptr tc,
if (default_tc)
return DEEP_COPY (default_tc, data, data2, env);
else
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_copy for Sequence
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Sequence::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
- CORBA_TypeCode_ptr tc2; // typecode of the element
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode_ptr tc2; // typecode of the element
size_t size; // size of element
- CORBA_ULong bounds;
+ CORBA::ULong bounds;
char *value1, *value2;
- CORBA_OctetSeq *src, *dst;
+ CORBA::OctetSeq *src, *dst;
CDR stream; // used only to access the marshal_object factory
// Rely on binary format of sequences -- all are the same
@@ -578,8 +582,8 @@ TAO_Marshal_Sequence::deep_copy (CORBA_TypeCode_ptr tc,
if (tc)
{
- src = (CORBA_OctetSeq *) source;
- dst = (CORBA_OctetSeq *) dest;
+ src = (CORBA::OctetSeq *) source;
+ dst = (CORBA::OctetSeq *) dest;
assert (src->length <= UINT_MAX);
dst->length = dst->maximum = src->length;
@@ -596,7 +600,7 @@ TAO_Marshal_Sequence::deep_copy (CORBA_TypeCode_ptr tc,
bounds = src->length;
// allocate a buffer to hold the sequence
- dst->buffer = new CORBA_Octet [size *(size_t) src->maximum];
+ dst->buffer = new CORBA::Octet [size *(size_t) src->maximum];
if (dst->buffer)
{
value1 = (char *) src->buffer;
@@ -604,80 +608,80 @@ TAO_Marshal_Sequence::deep_copy (CORBA_TypeCode_ptr tc,
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
- case tk_enum:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ 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:
+ case CORBA::tk_enum:
// just do a memcpy rather than copying each element
ACE_OS::memcpy (value2, value1, size*bounds);
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
// handle all aggregate types here
- case tk_any:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_any:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Any::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_TypeCode:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_TypeCode:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_TypeCode::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_Principal:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_Principal:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Principal::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_objref:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_objref:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_ObjRef::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_struct:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_struct:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Struct::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_union:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_union:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Union::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_string:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_string:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Any::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
@@ -685,40 +689,40 @@ TAO_Marshal_Sequence::deep_copy (CORBA_TypeCode_ptr tc,
}
retval = TAO_Marshal_String::deep_copy (tc2, source, dest, env);
break;
- case tk_sequence:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_sequence:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Sequence::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_array:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_array:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Array::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_alias:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_alias:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Alias::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_except:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_except:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Except::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
}
break;
- case tk_wstring:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_wstring:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_WString::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
@@ -726,62 +730,62 @@ TAO_Marshal_Sequence::deep_copy (CORBA_TypeCode_ptr tc,
}
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
break;
} // end of switch
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
// error exit
- // CORBA_release (tc2);
- env.exception (new CORBA_NO_MEMORY (COMPLETED_MAYBE));
+ // CORBA::release (tc2);
+ env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_MAYBE));
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing size
{
- // CORBA_release (tc2);
+ // CORBA::release (tc2);
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing content type
{
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_copy for Array
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Array::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Array::deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
- CORBA_TypeCode_ptr tc2; // typecode of the element
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode_ptr tc2; // typecode of the element
size_t size; // size of element
- CORBA_ULong bounds;
+ CORBA::ULong bounds;
CDR stream; // used only to access the marshal_object factory
// Rely on binary format of sequences -- all are the same
@@ -802,79 +806,79 @@ TAO_Marshal_Array::deep_copy (CORBA_TypeCode_ptr tc,
{
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
- case tk_enum:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ 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:
+ case CORBA::tk_enum:
// just do a memcpy rather than copying each element
ACE_OS::memcpy ((char *) dest, (char *) source, size*bounds);
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
// handle all aggregate types here
- case tk_any:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_any:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Any::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_TypeCode:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_TypeCode:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_TypeCode::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_Principal:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_Principal:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Principal::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_objref:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_objref:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_ObjRef::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_struct:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_struct:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Struct::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_union:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_union:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Union::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_string:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_string:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Any::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
@@ -882,40 +886,40 @@ TAO_Marshal_Array::deep_copy (CORBA_TypeCode_ptr tc,
}
retval = TAO_Marshal_String::deep_copy (tc2, source, dest, env);
break;
- case tk_sequence:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_sequence:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Sequence::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_array:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_array:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Array::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_alias:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_alias:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Alias::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_except:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_except:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Except::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
dest = (char *) dest + size;
}
break;
- case tk_wstring:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_wstring:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_WString::deep_copy (tc2, source, dest, env);
source = (char *) source + size;
@@ -923,49 +927,49 @@ TAO_Marshal_Array::deep_copy (CORBA_TypeCode_ptr tc,
}
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
break;
} // end of switch
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // no exception computing size
else
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_STOP;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_STOP;
} // no exception computing content type
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
} // bounds are fine
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_copy alias
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Alias::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Alias::deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode_ptr tc2; // typecode of the aliased type
+ CORBA::TypeCode_ptr tc2; // typecode of the aliased type
CDR stream; // to access the marshal object
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // status of deep_copy operation
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of deep_copy operation
if (tc)
{
@@ -977,116 +981,116 @@ TAO_Marshal_Alias::deep_copy (CORBA_TypeCode_ptr tc,
// efficiency
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
- *(CORBA_Short *) dest = *(CORBA_Short *) source;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- *(CORBA_Long *) dest = *(CORBA_Long *) source;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- *(CORBA_LongLong *) dest = *(CORBA_LongLong *) source;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_boolean:
- *(CORBA_Boolean *) dest = *(CORBA_Boolean *) source;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_char:
- case tk_octet:
- *(CORBA_Char *) dest = *(CORBA_Char *) source;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_longdouble:
- *(CORBA_LongDouble *) dest = *(CORBA_LongDouble *) source;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_wchar:
- *(CORBA_WChar *) dest = *(CORBA_WChar *) source;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_any:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ *(CORBA::Short *) dest = *(CORBA::Short *) source;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ *(CORBA::Long *) dest = *(CORBA::Long *) source;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_boolean:
+ *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ *(CORBA::Char *) dest = *(CORBA::Char *) source;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_longdouble:
+ *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_wchar:
+ *(CORBA::WChar *) dest = *(CORBA::WChar *) source;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_any:
retval = TAO_Marshal_Any::deep_copy (tc2, source, dest, env);
break;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
retval = TAO_Marshal_TypeCode::deep_copy (tc2, source, dest, env);
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
retval = TAO_Marshal_Principal::deep_copy (tc2, source, dest, env);
break;
- case tk_objref:
+ case CORBA::tk_objref:
retval = TAO_Marshal_ObjRef::deep_copy (tc2, source, dest, env);
break;
- case tk_struct:
+ case CORBA::tk_struct:
retval = TAO_Marshal_Struct::deep_copy (tc2, source, dest, env);
break;
- case tk_union:
+ case CORBA::tk_union:
retval = TAO_Marshal_Union::deep_copy (tc2, source, dest, env);
break;
- case tk_string:
+ case CORBA::tk_string:
retval = TAO_Marshal_String::deep_copy (tc2, source, dest, env);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_copy (tc2, source, dest, env);
break;
- case tk_array:
+ case CORBA::tk_array:
retval = TAO_Marshal_Array::deep_copy (tc2, source, dest, env);
break;
- case tk_alias:
+ case CORBA::tk_alias:
retval = TAO_Marshal_Alias::deep_copy (tc2, source, dest, env);
break;
- case tk_except:
+ case CORBA::tk_except:
retval = TAO_Marshal_Except::deep_copy (tc2, source, dest, env);
break;
- case tk_wstring:
+ case CORBA::tk_wstring:
retval = TAO_Marshal_WString::deep_copy (tc2, source, dest, env);
break;
default:
// anything else is an error
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Alias::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception getting content_type
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_copy structs
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Except::deep_copy (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Except::deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_TypeCode_ptr param;
- CORBA_Long size, alignment;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode_ptr param;
+ CORBA::Long size, alignment;
CDR stream;
if (tc)
@@ -1095,8 +1099,8 @@ TAO_Marshal_Except::deep_copy (CORBA_TypeCode_ptr tc,
// to ensure that memory is appropriately freed and to hold the
// exception ID. We just copy that typecode
- *(CORBA_TypeCode_ptr *) dest = *(CORBA_TypeCode_ptr *) source;
- (void) (*(CORBA_TypeCode_ptr *) dest)->AddRef ();
+ *(CORBA::TypeCode_ptr *) dest = *(CORBA::TypeCode_ptr *) source;
+ (void) (*(CORBA::TypeCode_ptr *) dest)->AddRef ();
// compute the number of fields in the struct
int member_count = tc->member_count (env);
@@ -1104,7 +1108,7 @@ TAO_Marshal_Except::deep_copy (CORBA_TypeCode_ptr tc,
{
for (int i = 0;
i < member_count
- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE;
+ && retval == CORBA::TypeCode::TRAVERSE_CONTINUE;
i++)
{
// get the typecode for the ith field
@@ -1121,75 +1125,75 @@ TAO_Marshal_Except::deep_copy (CORBA_TypeCode_ptr tc,
{
switch (param->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- *(CORBA_Short *) dest = *(CORBA_Short *) source;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ *(CORBA::Short *) dest = *(CORBA::Short *) source;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- *(CORBA_Long *) dest = *(CORBA_Long *) source;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ *(CORBA::Long *) dest = *(CORBA::Long *) source;
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- *(CORBA_LongLong *) dest = *(CORBA_LongLong *) source;
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source;
break;
- case tk_boolean:
- *(CORBA_Boolean *) dest = *(CORBA_Boolean *) source;
+ case CORBA::tk_boolean:
+ *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source;
break;
- case tk_char:
- case tk_octet:
- *(CORBA_Char *) dest = *(CORBA_Char *) source;
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ *(CORBA::Char *) dest = *(CORBA::Char *) source;
break;
- case tk_longdouble:
- *(CORBA_LongDouble *) dest = *(CORBA_LongDouble *) source;
+ case CORBA::tk_longdouble:
+ *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source;
break;
- case tk_wchar:
- *(CORBA_WChar *) dest = *(CORBA_WChar *) source;
+ case CORBA::tk_wchar:
+ *(CORBA::WChar *) dest = *(CORBA::WChar *) source;
break;
- case tk_any:
+ case CORBA::tk_any:
retval = TAO_Marshal_Any::deep_copy (param, source, dest, env);
break;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
retval = TAO_Marshal_TypeCode::deep_copy (param, source, dest, env);
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
retval = TAO_Marshal_Principal::deep_copy (param, source, dest, env);
break;
- case tk_objref:
+ case CORBA::tk_objref:
retval = TAO_Marshal_ObjRef::deep_copy (param, source, dest, env);
break;
- case tk_struct:
+ case CORBA::tk_struct:
retval = TAO_Marshal_Struct::deep_copy (param, source, dest, env);
break;
- case tk_union:
+ case CORBA::tk_union:
retval = TAO_Marshal_Union::deep_copy (param, source, dest, env);
break;
- case tk_string:
+ case CORBA::tk_string:
retval = TAO_Marshal_String::deep_copy (param, source, dest, env);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_copy (param, source, dest, env);
break;
- case tk_array:
+ case CORBA::tk_array:
retval = TAO_Marshal_Array::deep_copy (param, source, dest, env);
break;
- case tk_alias:
+ case CORBA::tk_alias:
retval = TAO_Marshal_Alias::deep_copy (param, source, dest, env);
break;
- case tk_except:
+ case CORBA::tk_except:
retval = TAO_Marshal_Except::deep_copy (param, source, dest, env);
break;
- case tk_wstring:
+ case CORBA::tk_wstring:
retval = TAO_Marshal_WString::deep_copy (param, source, dest, env);
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
} // end of switch
source = (char *) source + size;
dest = (char *) dest + size;
@@ -1197,40 +1201,40 @@ TAO_Marshal_Except::deep_copy (CORBA_TypeCode_ptr tc,
else // exception computing alignment
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing size
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing typecode
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of loop
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception getting member count
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
diff --git a/TAO/tao/deep_free.cpp b/TAO/tao/deep_free.cpp
index 3dbc59bfc6a..3f7d0575cc9 100644
--- a/TAO/tao/deep_free.cpp
+++ b/TAO/tao/deep_free.cpp
@@ -28,22 +28,26 @@
//
// ============================================================================
+#if 0
#include "tao/orb.h"
#include "tao/cdr.h"
#include "tao/giop.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
#if defined (HAVE_WIDEC_H)
# include <widec.h>
#else
extern "C"
{
- u_int wslen (const CORBA_WChar *);
- CORBA_WChar *wscpy (CORBA_WChar *, const CORBA_WChar *);
+ u_int wslen (const CORBA::WChar *);
+ CORBA::WChar *wscpy (CORBA::WChar *, const CORBA::WChar *);
}
#endif /* HAVE_WIDEC_H */
-extern CORBA_TypeCode TC_opaque;
+extern CORBA::TypeCode TC_opaque;
// Deep copy from "source" to "dest" ... this code "knows" a bit
// about representations, verify it when porting to oddball
@@ -52,83 +56,83 @@ extern CORBA_TypeCode TC_opaque;
//
-CORBA_TypeCode::traverse_status
-DEEP_FREE (CORBA_TypeCode_ptr param,
+CORBA::TypeCode::traverse_status
+DEEP_FREE (CORBA::TypeCode_ptr param,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
switch (param->_kind)
{
- case tk_null:
- case tk_void:
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
+ 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:
break;
- case tk_any:
+ case CORBA::tk_any:
retval = TAO_Marshal_Any::deep_free (param, source, dest, env);
break;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
retval = TAO_Marshal_TypeCode::deep_free (param, source, dest, env);
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
retval = TAO_Marshal_Principal::deep_free (param, source, dest, env);
break;
- case tk_objref:
+ case CORBA::tk_objref:
retval = TAO_Marshal_ObjRef::deep_free (param, source, dest, env);
break;
- case tk_struct:
+ case CORBA::tk_struct:
retval = TAO_Marshal_Struct::deep_free (param, source, dest, env);
break;
- case tk_union:
+ case CORBA::tk_union:
retval = TAO_Marshal_Union::deep_free (param, source, dest, env);
break;
- case tk_string:
+ case CORBA::tk_string:
retval = TAO_Marshal_String::deep_free (param, source, dest, env);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_free (param, source, dest, env);
break;
- case tk_array:
+ case CORBA::tk_array:
retval = TAO_Marshal_Array::deep_free (param, source, dest, env);
break;
- case tk_alias:
+ case CORBA::tk_alias:
retval = TAO_Marshal_Alias::deep_free (param, source, dest, env);
break;
- case tk_except:
+ case CORBA::tk_except:
retval = TAO_Marshal_Except::deep_free (param, source, dest, env);
break;
- case tk_wstring:
+ case CORBA::tk_wstring:
retval = TAO_Marshal_WString::deep_free (param, source, dest, env);
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
} // end of switch
return retval;
}
// deep copy for primitives
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Primitive::deep_free (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Primitive::deep_free (CORBA::TypeCode_ptr tc,
const void *,
const void *,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TCKind my_kind;
+ CORBA::TCKind my_kind;
if (tc)
{
@@ -138,53 +142,53 @@ TAO_Marshal_Primitive::deep_free (CORBA_TypeCode_ptr tc,
{
switch (my_kind)
{
- case tk_null:
- case tk_void:
- case tk_char:
- case tk_octet:
- case tk_short:
- case tk_ushort:
- case tk_wchar:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- case tk_longlong:
- case tk_ulonglong:
- case tk_double:
- case tk_longdouble:
- case tk_boolean:
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ case CORBA::tk_wchar:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ case CORBA::tk_double:
+ case CORBA::tk_longdouble:
+ case CORBA::tk_boolean:
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Primitive::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
dmsg ("TAO_Marshal_Primitive::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE) );
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE) );
dmsg ("TAO_Marshal_Primitive::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_free structs
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Struct::deep_free (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Struct::deep_free (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_TypeCode_ptr param;
- CORBA_Long size, alignment;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode_ptr param;
+ CORBA::Long size, alignment;
CDR stream;
if (tc)
@@ -194,7 +198,7 @@ TAO_Marshal_Struct::deep_free (CORBA_TypeCode_ptr tc,
if (env.exception () == 0)
{
for (int i = 0; i < member_count && retval ==
- CORBA_TypeCode::TRAVERSE_CONTINUE; i++)
+ CORBA::TypeCode::TRAVERSE_CONTINUE; i++)
{
// get the typecode for the ith field
param = tc->member_type (i, env);
@@ -210,123 +214,123 @@ TAO_Marshal_Struct::deep_free (CORBA_TypeCode_ptr tc,
{
switch (param->_kind)
{
- case tk_null:
- case tk_void:
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
+ 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:
break;
- case tk_any:
+ case CORBA::tk_any:
retval = TAO_Marshal_Any::deep_free (param, source, dest, env);
break;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
retval = TAO_Marshal_TypeCode::deep_free (param, source, dest, env);
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
retval = TAO_Marshal_Principal::deep_free (param, source, dest, env);
break;
- case tk_objref:
+ case CORBA::tk_objref:
retval = TAO_Marshal_ObjRef::deep_free (param, source, dest, env);
break;
- case tk_struct:
+ case CORBA::tk_struct:
retval = TAO_Marshal_Struct::deep_free (param, source, dest, env);
break;
- case tk_union:
+ case CORBA::tk_union:
retval = TAO_Marshal_Union::deep_free (param, source, dest, env);
break;
- case tk_string:
+ case CORBA::tk_string:
retval = TAO_Marshal_String::deep_free (param, source, dest, env);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_free (param, source, dest, env);
break;
- case tk_array:
+ case CORBA::tk_array:
retval = TAO_Marshal_Array::deep_free (param, source, dest, env);
break;
- case tk_alias:
+ case CORBA::tk_alias:
retval = TAO_Marshal_Alias::deep_free (param, source, dest, env);
break;
- case tk_except:
+ case CORBA::tk_except:
retval = TAO_Marshal_Except::deep_free (param, source, dest, env);
break;
- case tk_wstring:
+ case CORBA::tk_wstring:
retval = TAO_Marshal_WString::deep_free (param, source, dest, env);
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
} // end of switch
source = (char *)source + size;
}
else // exception computing alignment
{
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing size
{
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing typecode
{
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of loop
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception getting member count
{
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_free for union
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Union::deep_free (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Union::deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *data2,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_TypeCode_ptr discrim_tc;
- CORBA_TypeCode_ptr member_tc;
- CORBA_Any_ptr member_label;
- CORBA_ULong discrim_size_with_pad;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode_ptr discrim_tc;
+ CORBA::TypeCode_ptr member_tc;
+ CORBA::Any_ptr member_label;
+ CORBA::ULong discrim_size_with_pad;
const void *discrim_val;
- CORBA_ULong member_count;
- CORBA_Long default_index;
- CORBA_ULong i;
- CORBA_TypeCode_ptr default_tc = 0;
- CORBA_Boolean discrim_matched = CORBA_B_FALSE;
+ CORBA::ULong member_count;
+ CORBA::Long default_index;
+ CORBA::ULong i;
+ CORBA::TypeCode_ptr default_tc = 0;
+ CORBA::Boolean discrim_matched = CORBA::B_FALSE;
discrim_tc = tc->discriminator_type (env);
// get the discriminator type
@@ -334,7 +338,7 @@ TAO_Marshal_Union::deep_free (CORBA_TypeCode_ptr tc,
{
// deep_free the discriminator value
retval = DEEP_FREE (discrim_tc, data, data2, env);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
discrim_size_with_pad = tc->TAO_discrim_pad_size (env);
if (env.exception () == 0)
@@ -363,37 +367,37 @@ TAO_Marshal_Union::deep_free (CORBA_TypeCode_ptr tc,
// do the matching
switch (member_label->type ()->kind (env))
{
- case tk_short:
- case tk_ushort:
- if (*(CORBA_Short *)member_label->value () ==
- *(CORBA_Short *)discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ if (*(CORBA::Short *)member_label->value () ==
+ *(CORBA::Short *)discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_enum:
- if (*(CORBA_ULong *)member_label->value () ==
- *(CORBA_ULong *)discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_enum:
+ if (*(CORBA::ULong *)member_label->value () ==
+ *(CORBA::ULong *)discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_char:
- if (*(CORBA_Char *)member_label->value () ==
- *(CORBA_Char *)discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_char:
+ if (*(CORBA::Char *)member_label->value () ==
+ *(CORBA::Char *)discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_wchar:
- if (*(CORBA_WChar *)member_label->value () ==
- *(CORBA_WChar *)discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_wchar:
+ if (*(CORBA::WChar *)member_label->value () ==
+ *(CORBA::WChar *)discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_boolean:
- if (*(CORBA_Boolean *)member_label->value () ==
- *(CORBA_Boolean *)discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_boolean:
+ if (*(CORBA::Boolean *)member_label->value () ==
+ *(CORBA::Boolean *)discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}// end of switch
// get the member typecode
@@ -413,68 +417,68 @@ TAO_Marshal_Union::deep_free (CORBA_TypeCode_ptr tc,
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of while
// we are here only if there was no match
if (default_tc)
return DEEP_FREE (default_tc, data, data2, env);
else
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_free for Sequence
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Sequence::deep_free (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Sequence::deep_free (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
- CORBA_TypeCode_ptr tc2; // typecode of the element
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode_ptr tc2; // typecode of the element
size_t size; // size of element
- CORBA_ULong bounds;
+ CORBA::ULong bounds;
char *value1;
- CORBA_OctetSeq *src;
+ CORBA::OctetSeq *src;
CDR stream; // used only to access the marshal_object factory
// Rely on binary format of sequences -- all are the same
@@ -482,7 +486,7 @@ TAO_Marshal_Sequence::deep_free (CORBA_TypeCode_ptr tc,
if (tc)
{
- src = (CORBA_OctetSeq *) source;
+ src = (CORBA::OctetSeq *) source;
// get element typecode
tc2 = tc->content_type (env);
@@ -498,162 +502,162 @@ TAO_Marshal_Sequence::deep_free (CORBA_TypeCode_ptr tc,
value1 = (char *)src->buffer;
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
- case tk_enum:
+ 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_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:
+ case CORBA::tk_enum:
delete [] src->buffer;
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
// handle all aggregate types here
- case tk_any:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_any:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Any::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_TypeCode:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_TypeCode:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_TypeCode::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_Principal:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_Principal:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Principal::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_objref:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_objref:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_ObjRef::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_struct:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_struct:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Struct::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_union:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_union:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Union::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_string:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_string:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Any::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
retval = TAO_Marshal_String::deep_free (tc2, source, dest, env);
break;
- case tk_sequence:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_sequence:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Sequence::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_array:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_array:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Array::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_alias:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_alias:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Alias::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_except:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_except:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Except::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
- case tk_wstring:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_wstring:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_WString::deep_free (tc2, source, dest, env);
value1 = (char *)value1 + size;
}
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
break;
} // end of switch
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing size
{
- // CORBA_release (tc2);
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ // CORBA::release (tc2);
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("marshaling TAO_Marshal_Sequence::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception computing content type
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("marshaling TAO_Marshal_Sequence::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_free for Array
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Array::deep_free (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Array::deep_free (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
- CORBA_TypeCode_ptr tc2; // typecode of the element
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode_ptr tc2; // typecode of the element
size_t size; // size of element
- CORBA_ULong bounds;
+ CORBA::ULong bounds;
CDR stream; // used only to access the marshal_object factory
// Rely on binary format of sequences -- all are the same
@@ -674,154 +678,154 @@ TAO_Marshal_Array::deep_free (CORBA_TypeCode_ptr tc,
{
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
- case tk_enum:
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ 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_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:
+ case CORBA::tk_enum:
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
// handle all aggregate types here
- case tk_any:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_any:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Any::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_TypeCode:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_TypeCode:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_TypeCode::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_Principal:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_Principal:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Principal::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_objref:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_objref:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_ObjRef::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_struct:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_struct:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Struct::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_union:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_union:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Union::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_string:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_string:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_String::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_sequence:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_sequence:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Sequence::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_array:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_array:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Array::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_alias:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_alias:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Alias::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_except:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_except:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_Except::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
- case tk_wstring:
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ case CORBA::tk_wstring:
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = TAO_Marshal_WString::deep_free (tc2, source, dest, env);
source = (char *)source + size;
}
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
break;
} // end of switch
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // no exception computing size
else
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_STOP;
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else // exception computing content type
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else // exception getting bounds
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_free alias
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Alias::deep_free (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Alias::deep_free (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode_ptr tc2; // typecode of the aliased type
+ CORBA::TypeCode_ptr tc2; // typecode of the aliased type
CDR stream; // to access the marshal object
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // status of encode operation
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
if (tc)
{
@@ -833,99 +837,99 @@ TAO_Marshal_Alias::deep_free (CORBA_TypeCode_ptr tc,
// efficiency
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
- // CORBA_release (tc2);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_any:
+ 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:
+ // CORBA::release (tc2);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_any:
retval = TAO_Marshal_Any::deep_free (tc2, source, dest, env);
break;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
retval = TAO_Marshal_TypeCode::deep_free (tc2, source, dest, env);
break;
- case tk_Principal:
+ case CORBA::tk_Principal:
retval = TAO_Marshal_Principal::deep_free (tc2, source, dest, env);
break;
- case tk_objref:
+ case CORBA::tk_objref:
retval = TAO_Marshal_ObjRef::deep_free (tc2, source, dest, env);
break;
- case tk_struct:
+ case CORBA::tk_struct:
retval = TAO_Marshal_Struct::deep_free (tc2, source, dest, env);
break;
- case tk_union:
+ case CORBA::tk_union:
retval = TAO_Marshal_Union::deep_free (tc2, source, dest, env);
break;
- case tk_string:
+ case CORBA::tk_string:
retval = TAO_Marshal_String::deep_free (tc2, source, dest, env);
break;
- case tk_sequence:
+ case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_free (tc2, source, dest, env);
break;
- case tk_array:
+ case CORBA::tk_array:
retval = TAO_Marshal_Array::deep_free (tc2, source, dest, env);
break;
- case tk_alias:
+ case CORBA::tk_alias:
retval = TAO_Marshal_Alias::deep_free (tc2, source, dest, env);
break;
- case tk_except:
+ case CORBA::tk_except:
retval = TAO_Marshal_Except::deep_free (tc2, source, dest, env);
break;
- case tk_wstring:
+ case CORBA::tk_wstring:
retval = TAO_Marshal_WString::deep_free (tc2, source, dest, env);
break;
default:
// anything else is an error
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Alias::decode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // exception getting content_type
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// deep_free structs
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Except::deep_free (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Except::deep_free (CORBA::TypeCode_ptr tc,
const void *,
const void *,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
#if 0
// temporarily commented out to make compiler happy
- CORBA_Long i,
- member_count; // number of fields in the struct
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_TypeCode_ptr param;
- CORBA_Long size, alignment;
+ CORBA::Long i,
+ member_count; // number of fields in the struct
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode_ptr param;
+ CORBA::Long size, alignment;
CDR stream;
#endif /* 0 */
@@ -950,11 +954,11 @@ TAO_Marshal_Except::deep_free (CORBA_TypeCode_ptr tc,
// and "tc" are equivalent, (c) releasing that typecode found
// within the exception.
//
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else // no typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_MAYBE));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Struct::deep_free detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index 5bff5f3a93d..f2330d7fee3 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -14,7 +14,11 @@
// ============================================================================
#define ACE_BUILD_SVC_DLL
+#if 0
#include "default_client.h"
+#endif /* 0 */
+
+#include "tao/corba.h"
TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void)
{
@@ -61,10 +65,6 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, char *argv[])
return 0;
}
-#if ! defined (__ACE_INLINE__)
-# include "default_client.i"
-#endif /* __ACE_INLINE__ */
-
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
diff --git a/TAO/tao/default_client.h b/TAO/tao/default_client.h
index 7eca1004b96..b498431ce98 100644
--- a/TAO/tao/default_client.h
+++ b/TAO/tao/default_client.h
@@ -17,7 +17,7 @@
#if !defined (TAO_DEFAULT_CLIENT_H)
# define TAO_DEFAULT_CLIENT_H
-
+#if 0
# include "ace/SOCK_Acceptor.h"
# include "ace/SOCK_Connector.h"
# include "ace/Strategies_T.h"
@@ -27,6 +27,7 @@
# include "tao/params.h"
# include "tao/connect.h"
# include "tao/objtable.h"
+#endif /* 0 */
class TAO_Default_Client_Strategy_Factory : public TAO_Client_Strategy_Factory
// = TITLE
diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp
index 6bdf7c7d024..4417194d26a 100644
--- a/TAO/tao/default_server.cpp
+++ b/TAO/tao/default_server.cpp
@@ -10,8 +10,13 @@
// $Id$
// ============================================================================
+#if 0 // XXXASG - commenting out temporarily as it doesn't compile
#define ACE_BUILD_SVC_DLL
+#if 0
#include "default_server.h"
+#endif /* 0 */
+
+#include "tao/corba.h"
TAO_Default_Server_Strategy_Factory::TAO_Default_Server_Strategy_Factory (void)
: thread_flags_ (0),
@@ -139,7 +144,6 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[])
TAO_Linear_ObjTable (this->object_table_size_),
-1);
break;
-#if 0
// Don't do this one right now until we determine how to deal
// with its reliance on a global singleton.
case TAO_USER_DEFINED:
@@ -147,7 +151,6 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[])
// user-defined instance of the object table
this->objtable_ = p->userdef_lookup_strategy ();
break;
-#endif /* 0 */
case TAO_ACTIVE_DEMUX:
ACE_NEW_RETURN (this->objtable_,
TAO_Active_Demux_ObjTable (this->object_table_size_),
@@ -171,3 +174,4 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[])
ACE_SVC_FACTORY_DEFINE (TAO_Default_Server_Strategy_Factory)
+#endif /* 0 */
diff --git a/TAO/tao/default_server.h b/TAO/tao/default_server.h
index e0cf68df11e..a2b9316ac81 100644
--- a/TAO/tao/default_server.h
+++ b/TAO/tao/default_server.h
@@ -18,6 +18,7 @@
#if !defined (TAO_DEFAULT_SERVER_FACTORY_H)
# define TAO_DEFAULT_SERVER_FACTORY_H
+#if 0
# include "ace/SOCK_Acceptor.h"
# include "ace/Svc_Handler.h"
# include "ace/Strategies_T.h"
@@ -27,6 +28,7 @@
# include "tao/connect.h"
# include "tao/objtable.h"
+#endif /* 0 */
# if !defined(SERVER_OBJECT_TABLE_SIZE)
# define SERVER_OBJECT_TABLE_SIZE 64
@@ -88,8 +90,4 @@ private:
ACE_SVC_FACTORY_DECLARE (TAO_Default_Server_Strategy_Factory)
-# if defined(__ACE_INLINE__)
-# include "default_server.i"
-# endif
-
#endif /* TAO_DEFAULT_SERVER_FACTORY_H */
diff --git a/TAO/tao/encode.cpp b/TAO/tao/encode.cpp
index e30e2b24be0..08ccf8e8dc6 100644
--- a/TAO/tao/encode.cpp
+++ b/TAO/tao/encode.cpp
@@ -19,22 +19,26 @@
//
// ============================================================================
+#if 0
#include "tao/orb.h"
#include "tao/cdr.h"
#include "tao/giop.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
#if defined (HAVE_WIDEC_H)
# include <widec.h>
#else
extern "C"
{
- u_int wslen (const CORBA_WChar *);
- CORBA_WChar *wscpy (CORBA_WChar *, const CORBA_WChar *);
+ u_int wslen (const CORBA::WChar *);
+ CORBA::WChar *wscpy (CORBA::WChar *, const CORBA::WChar *);
}
#endif /* HAVE_WIDEC_H */
-extern CORBA_TypeCode TC_opaque;
+extern CORBA::TypeCode TC_opaque;
// Encode instances of arbitrary data types based only on typecode.
// "data" points to the data type; if it's not a primitve data type,
@@ -43,180 +47,180 @@ extern CORBA_TypeCode TC_opaque;
// the data value.
//
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Primitive::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Primitive::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // status of encode operation
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
switch (tc->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_encoding = stream->put_short (*(CORBA_Short *) data);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_encoding = stream->put_short (*(CORBA::Short *) data);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_encoding = stream->put_long (*(CORBA_Long *) data);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_encoding = stream->put_long (*(CORBA::Long *) data);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_encoding = stream->put_longlong (*(CORBA_LongLong *) data);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_encoding = stream->put_longlong (*(CORBA::LongLong *) data);
break;
- case tk_boolean:
- continue_encoding = stream->put_boolean (*(CORBA_Boolean *) data);
+ case CORBA::tk_boolean:
+ continue_encoding = stream->put_boolean (*(CORBA::Boolean *) data);
break;
- case tk_char:
- case tk_octet:
- continue_encoding = stream->put_char (*(CORBA_Char *) data);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_encoding = stream->put_char (*(CORBA::Char *) data);
break;
- case tk_longdouble:
- continue_encoding = stream->put_longdouble (*(CORBA_LongDouble *) data);
+ case CORBA::tk_longdouble:
+ continue_encoding = stream->put_longdouble (*(CORBA::LongDouble *) data);
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
continue_encoding = stream->put_wchar (*(wchar_t *) data);
break;
default:
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
// we are not a primitive type
}
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Primitive::encode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Any::encode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Any::encode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Any *any = (CORBA_Any *) data;
+ CORBA::Any *any = (CORBA::Any *) data;
// Typecode of the element that makes the Any.
- CORBA_TypeCode_ptr elem_tc;
+ CORBA::TypeCode_ptr elem_tc;
// Value maintained by the Any.
void *value;
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
// Context is the CDR stream.
CDR *stream = (CDR *) context;
// Status of encode operation
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
elem_tc = any->type ();
// Encode the typecode description for the element.
- if (stream->encode (_tc_CORBA_TypeCode, &elem_tc, 0, env)
- == CORBA_TypeCode::TRAVERSE_CONTINUE) {
- value = any->value ();
+ if (stream->encode (CORBA::_tc_TypeCode, &elem_tc, 0, env)
+ == CORBA::TypeCode::TRAVERSE_CONTINUE) {
+ value = (void *) any->value ();
// Switch on the data type and handle the cases for primitives
// here for efficiency rather than calling.
switch (elem_tc->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_encoding = stream->put_short (*(CORBA_Short *) value);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_encoding = stream->put_short (*(CORBA::Short *) value);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_encoding = stream->put_long (*(CORBA_Long *) value);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_encoding = stream->put_long (*(CORBA::Long *) value);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_encoding = stream->put_longlong (*(CORBA_LongLong *) value);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_encoding = stream->put_longlong (*(CORBA::LongLong *) value);
break;
- case tk_boolean:
- continue_encoding = stream->put_boolean (*(CORBA_Boolean *) value);
+ case CORBA::tk_boolean:
+ continue_encoding = stream->put_boolean (*(CORBA::Boolean *) value);
break;
- case tk_char:
- case tk_octet:
- continue_encoding = stream->put_char (*(CORBA_Char *) value);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_encoding = stream->put_char (*(CORBA::Char *) value);
break;
- case tk_longdouble:
- continue_encoding = stream->put_longdouble (*(CORBA_LongDouble *) value);
+ case CORBA::tk_longdouble:
+ continue_encoding = stream->put_longdouble (*(CORBA::LongDouble *) value);
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
continue_encoding = stream->put_wchar (*(wchar_t *) value);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->encode (elem_tc, value, 0, env);
break;
default:
// anything else is an error
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
}
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Any::encode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
-CORBA_TypeCode::traverse_status
-TAO_Marshal_TypeCode::encode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_TypeCode::encode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode_ptr tc2; // typecode to be encoded
+ CORBA::TypeCode_ptr tc2; // typecode to be encoded
- tc2 = *(CORBA_TypeCode_ptr *) data; // the data has to be a TypeCode_ptr
+ tc2 = *(CORBA::TypeCode_ptr *) data; // the data has to be a TypeCode_ptr
// encode the "kind" field of the typecode
- continue_encoding = stream->put_ulong ((CORBA_ULong) tc2->_kind);
- if (continue_encoding == CORBA_B_TRUE)
+ continue_encoding = stream->put_ulong ((CORBA::ULong) tc2->_kind);
+ if (continue_encoding == CORBA::B_TRUE)
{
// now encode the parameters, if any
switch (tc2->_kind)
@@ -226,8 +230,8 @@ TAO_Marshal_TypeCode::encode (CORBA_TypeCode_ptr,
break;
// A few have "simple" parameter lists
- case tk_string:
- case tk_wstring:
+ case CORBA::tk_string:
+ case CORBA::tk_wstring:
continue_encoding = stream->put_ulong (tc2->_length);
break;
@@ -235,20 +239,20 @@ TAO_Marshal_TypeCode::encode (CORBA_TypeCode_ptr,
// this, only nested inside others!
case ~0:
dmsg ("indirected typecode at top level!");
- continue_encoding = CORBA_B_FALSE;
+ continue_encoding = CORBA::B_FALSE;
break;
// The rest have "complex" parameter lists that are
// already encoded as bulk octets ... put length, then
// octets.
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_enum:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_enum:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
{
continue_encoding = stream->put_ulong (tc2->_length);
@@ -257,28 +261,28 @@ TAO_Marshal_TypeCode::encode (CORBA_TypeCode_ptr,
}
}
}
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_TypeCode::encode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode Principal
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Principal::encode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Principal::encode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_Principal_ptr p = *(CORBA_Principal_ptr *) data;
+ CORBA::Principal_ptr p = *(CORBA::Principal_ptr *) data;
if (p != 0)
{
@@ -291,25 +295,25 @@ TAO_Marshal_Principal::encode (CORBA_TypeCode_ptr,
}
else
continue_encoding = stream->put_long (0);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Principal::encode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode obj ref
-CORBA_TypeCode::traverse_status
-TAO_Marshal_ObjRef::encode (CORBA_TypeCode_ptr,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_ObjRef::encode (CORBA::TypeCode_ptr,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
// Current version: objref is really an IIOP_Object.
@@ -319,17 +323,17 @@ TAO_Marshal_ObjRef::encode (CORBA_TypeCode_ptr,
//
// XXX this doesn't actually verify that the stuff got written
// OK to the "wire" ...
- CORBA_Object_ptr obj = *(CORBA_Object_ptr *) data;
+ CORBA::Object_ptr obj = *(CORBA::Object_ptr *) data;
// NIL objrefs ... marshal as empty type hint, no elements.
- if (CORBA_is_nil (obj))
+ if (CORBA::is_nil (obj))
{
continue_encoding =
stream->put_ulong (1) // strlen
&& stream->put_char (0) // NUL
&& stream->put_ulong (0); // no profiles
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
{
@@ -347,14 +351,14 @@ TAO_Marshal_ObjRef::encode (CORBA_TypeCode_ptr,
if (obj->QueryInterface (IID_IIOP_Object, (void **) &objdata) != NOERROR)
{
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
obj->Release ();
profile = &objdata->profile;
// STRING, a type ID hint
- stream->encode (_tc_CORBA_String, &objdata->type_id, 0, env);
+ stream->encode (CORBA::_tc_string, &objdata->type_id, 0, env);
// UNSIGNED LONG, value one, count of the sequence of
// encapsulated protocol profiles;
@@ -389,38 +393,38 @@ TAO_Marshal_ObjRef::encode (CORBA_TypeCode_ptr,
stream->put_char (profile->iiop_version.minor);
// STRING hostname from profile
- stream->encode (_tc_CORBA_String, &profile->host, 0, env);
+ stream->encode (CORBA::_tc_string, &profile->host, 0, env);
// UNSIGNED SHORT port number
stream->put_ushort (profile->port);
// OCTET SEQUENCE for object key
stream->encode (&TC_opaque, &profile->object_key, 0, env);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
}
// encode structs
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Struct::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Struct::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
CDR *stream = (CDR *) context;
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
- CORBA_TypeCode_ptr param;
- CORBA_Long size, alignment;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
+ CORBA::TypeCode_ptr param;
+ CORBA::Long size, alignment;
if (env.exception () == 0)
{
int member_count = tc->member_count (env);
for (int i = 0;
- i < member_count && retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA_B_TRUE;
+ i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE;
i++)
{
param = tc->member_type (i, env);
@@ -435,49 +439,49 @@ TAO_Marshal_Struct::encode (CORBA_TypeCode_ptr tc,
data = ptr_align_binary (data, alignment);
switch (param->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_encoding = stream->put_short (*(CORBA_Short *) data);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_encoding = stream->put_short (*(CORBA::Short *) data);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_encoding = stream->put_long (*(CORBA_Long *) data);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_encoding = stream->put_long (*(CORBA::Long *) data);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_encoding = stream->put_longlong (*(CORBA_LongLong *) data);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_encoding = stream->put_longlong (*(CORBA::LongLong *) data);
break;
- case tk_boolean:
- continue_encoding = stream->put_boolean (*(CORBA_Boolean *) data);
+ case CORBA::tk_boolean:
+ continue_encoding = stream->put_boolean (*(CORBA::Boolean *) data);
break;
- case tk_char:
- case tk_octet:
- continue_encoding = stream->put_char (*(CORBA_Char *) data);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_encoding = stream->put_char (*(CORBA::Char *) data);
break;
- case tk_longdouble:
- continue_encoding = stream->put_longdouble (*(CORBA_LongDouble *) data);
+ case CORBA::tk_longdouble:
+ continue_encoding = stream->put_longdouble (*(CORBA::LongDouble *) data);
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
continue_encoding = stream->put_wchar (*(wchar_t *) data);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->encode (param, data, 0, env);
break;
default:
@@ -486,58 +490,58 @@ TAO_Marshal_Struct::encode (CORBA_TypeCode_ptr tc,
data = (char *) data + size;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("marshaling encode_struct detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode unions
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Union::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Union::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *data2,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode_ptr discrim_tc = tc->discriminator_type (env);
+ CORBA::TypeCode_ptr discrim_tc = tc->discriminator_type (env);
// get the discriminator type
if (env.exception () == 0)
{
- CORBA_TypeCode_ptr member_tc;
- CORBA_Any_ptr member_label;
- CORBA_ULong discrim_size_with_pad;
+ CORBA::TypeCode_ptr member_tc;
+ CORBA::Any_ptr member_label;
+ CORBA::ULong discrim_size_with_pad;
const void *discrim_val;
- CORBA_ULong member_count;
- CORBA_Long default_index;
- CORBA_TypeCode_ptr default_tc = 0;
- CORBA_Boolean discrim_matched = CORBA_B_FALSE;
+ CORBA::ULong member_count;
+ CORBA::Long default_index;
+ CORBA::TypeCode_ptr default_tc = 0;
+ CORBA::Boolean discrim_matched = CORBA::B_FALSE;
// encode the discriminator value
- CORBA_TypeCode::traverse_status retval =
+ CORBA::TypeCode::traverse_status retval =
stream->encode (discrim_tc, data, data2, env);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
discrim_size_with_pad = tc->TAO_discrim_pad_size (env);
if (env.exception () == 0)
@@ -568,33 +572,33 @@ TAO_Marshal_Union::encode (CORBA_TypeCode_ptr tc,
// do the matching
switch (member_label->type ()->kind (env))
{
- case tk_short:
- case tk_ushort:
- if (*(CORBA_Short *) member_label->value () == *(CORBA_Short *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ if (*(CORBA::Short *) member_label->value () == *(CORBA::Short *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_enum:
- if (*(CORBA_ULong *) member_label->value () == *(CORBA_ULong *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_enum:
+ if (*(CORBA::ULong *) member_label->value () == *(CORBA::ULong *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_char:
- if (*(CORBA_Char *) member_label->value () == *(CORBA_Char *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_char:
+ if (*(CORBA::Char *) member_label->value () == *(CORBA::Char *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_wchar:
- if (*(CORBA_WChar *) member_label->value () == *(CORBA_WChar *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_wchar:
+ if (*(CORBA::WChar *) member_label->value () == *(CORBA::WChar *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
- case tk_boolean:
- if (*(CORBA_Boolean *) member_label->value () == *(CORBA_Boolean *) discrim_val)
- discrim_matched = CORBA_B_TRUE;
+ case CORBA::tk_boolean:
+ if (*(CORBA::Boolean *) member_label->value () == *(CORBA::Boolean *) discrim_val)
+ discrim_matched = CORBA::B_TRUE;
break;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg ("Union::encode - Bad discriminant type");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}// end of switch
// get the member typecode
@@ -614,17 +618,17 @@ TAO_Marshal_Union::encode (CORBA_TypeCode_ptr tc,
}
else // error getting member type
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg1 ("Union::encode - error getting member type:%d",i);
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // error getting member label
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg1 ("Union::encode - error member label : %d", i);
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of while
// we are here only if there was no match
@@ -632,58 +636,58 @@ TAO_Marshal_Union::encode (CORBA_TypeCode_ptr tc,
return stream->encode (default_tc, data, data2, env);
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("Union::encode - failed. No match and no default case");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // error getting member count
{
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("Union::encode - error getting member count");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // error getting default index
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg ("Union::encode - error getting default used");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // error getting discrim_pad_size
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg ("Union::encode - error getting discrim padded size");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // error encoding discriminant
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("Union::encode - error encoding discriminant");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else // error getting the discriminant
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg ("Union::encode - error getting the discriminant typecode");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode string
-CORBA_TypeCode::traverse_status
-TAO_Marshal_String::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_String::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_String str = *(CORBA_String *) data;
+ CORBA::String str = *(CORBA::String *) data;
// Be nice to programmers: treat nulls as empty strings not
// errors. (OMG-IDL supports languages that don't use the C/C++
@@ -694,12 +698,12 @@ TAO_Marshal_String::encode (CORBA_TypeCode_ptr tc,
// Verify string satisfies bounds requirements. We're not so
// permissive as to send messages violating the interface spec
// by having excessively long strings!
- CORBA_ULong bounds = tc->length (env);
+ CORBA::ULong bounds = tc->length (env);
if (env.exception () == 0)
{
// get the actual length of the string
- CORBA_ULong len = ACE_OS::strlen ((char *) str);
+ CORBA::ULong len = ACE_OS::strlen ((char *) str);
// if it is an unbounded string or if the length is less
// than the bounds for an unbounded string
@@ -712,44 +716,44 @@ TAO_Marshal_String::encode (CORBA_TypeCode_ptr tc,
// 1 for
// the NULL
// character
- continue_encoding != CORBA_B_FALSE && *str;
+ continue_encoding != CORBA::B_FALSE && *str;
continue_encoding = stream->put_char (*str++))
continue;
// put a NULL terminating character
stream->put_char (0);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
{
// empty string
stream->put_ulong (1);
stream->put_char (0);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
}
// encode sequence
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Sequence::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Sequence::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context;
- CORBA_OctetSeq *seq = (CORBA_OctetSeq *) data;
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
- CORBA_TypeCode_ptr tc2; // typecode of the element
+ CORBA::OctetSeq *seq = (CORBA::OctetSeq *) data;
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode_ptr tc2; // typecode of the element
size_t size; // size of element
- CORBA_ULong len = seq ? seq->length : 0;
+ CORBA::ULong len = seq ? seq->length : 0;
char *value;
// First marshal the sequence length, verifying that it's within the
@@ -758,7 +762,7 @@ TAO_Marshal_Sequence::encode (CORBA_TypeCode_ptr tc,
if (len > 0)
{
// retrieve the bounds of the sequence
- CORBA_ULong bounds = tc->length (env);
+ CORBA::ULong bounds = tc->length (env);
if (env.exception () == 0)
{
// encode only if it is an unbounded sequence or if length is
@@ -779,126 +783,126 @@ TAO_Marshal_Sequence::encode (CORBA_TypeCode_ptr tc,
value = (char *) seq->buffer;
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_short (*(CORBA_Short *) value);
+ continue_encoding = stream->put_short (*(CORBA::Short *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_long (*(CORBA_Long *) value);
+ continue_encoding = stream->put_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_longlong (*(CORBA_LongLong *) value);
+ continue_encoding = stream->put_longlong (*(CORBA::LongLong *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_boolean:
+ case CORBA::tk_boolean:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_boolean (*(CORBA_Boolean *) value);
+ continue_encoding = stream->put_boolean (*(CORBA::Boolean *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_char:
- case tk_octet:
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_char (*(CORBA_Char *) value);
+ continue_encoding = stream->put_char (*(CORBA::Char *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_longdouble:
+ case CORBA::tk_longdouble:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_longdouble (*(CORBA_LongDouble *) value);
+ continue_encoding = stream->put_longdouble (*(CORBA::LongDouble *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_wchar (*(CORBA_WChar *) value);
+ continue_encoding = stream->put_wchar (*(CORBA::WChar *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_enum:
+ case CORBA::tk_enum:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_long (*(CORBA_Long *) value);
+ continue_encoding = stream->put_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
// handle all aggregate types here
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
// For those aggregate types whose size is constant, we
// compute it only once
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = stream->encode (tc2, value, 0, env);
value += size;
}
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
default:
break;
@@ -913,30 +917,30 @@ TAO_Marshal_Sequence::encode (CORBA_TypeCode_ptr tc,
{
// length is 0, encode it
continue_encoding = stream->put_ulong (len);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::encode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// encode array
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Array::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Array::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context;
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // return status
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
size_t size; // size of element
- CORBA_ULong bounds;
+ CORBA::ULong bounds;
char *value = (char *) data;
// retrieve the bounds of the array
@@ -944,7 +948,7 @@ TAO_Marshal_Array::encode (CORBA_TypeCode_ptr tc,
if (env.exception () == 0)
{
// get element typecode.
- CORBA_TypeCode_ptr tc2 = tc->content_type (env);
+ CORBA::TypeCode_ptr tc2 = tc->content_type (env);
if (env.exception () == 0)
{
@@ -953,128 +957,128 @@ TAO_Marshal_Array::encode (CORBA_TypeCode_ptr tc,
{
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- case tk_short:
- case tk_ushort:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_short (*(CORBA_Short *) value);
+ continue_encoding = stream->put_short (*(CORBA::Short *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_long (*(CORBA_Long *) value);
+ continue_encoding = stream->put_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_longlong (*(CORBA_LongLong *) value);
+ continue_encoding = stream->put_longlong (*(CORBA::LongLong *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_boolean:
+ case CORBA::tk_boolean:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_boolean (*(CORBA_Boolean *) value);
+ continue_encoding = stream->put_boolean (*(CORBA::Boolean *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_char:
- case tk_octet:
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_char (*(CORBA_Char *) value);
+ continue_encoding = stream->put_char (*(CORBA::Char *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_longdouble:
+ case CORBA::tk_longdouble:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_longdouble (*(CORBA_LongDouble *) value);
+ continue_encoding = stream->put_longdouble (*(CORBA::LongDouble *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
{
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_wchar (*(CORBA_WChar *) value);
+ continue_encoding = stream->put_wchar (*(CORBA::WChar *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
- case tk_enum:
+ case CORBA::tk_enum:
// For primitives, compute the size only once
- while (bounds-- && continue_encoding == CORBA_B_TRUE)
+ while (bounds-- && continue_encoding == CORBA::B_TRUE)
{
- continue_encoding = stream->put_long (*(CORBA_Long *) value);
+ continue_encoding = stream->put_long (*(CORBA::Long *) value);
value += size;
}
- // CORBA_release (tc2);
- if (continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
// handle all aggregate types here
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
// For those aggregate types whose size is constant, we
// compute it only once
- while (bounds-- && retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
+ while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
retval = stream->encode (tc2, value, 0, env);
value += size;
}
- // CORBA_release (tc2);
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ // CORBA::release (tc2);
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
break;
default:
break;
@@ -1083,23 +1087,23 @@ TAO_Marshal_Array::encode (CORBA_TypeCode_ptr tc,
} // no exception computing content type
} // no exception computing bounds
// error exit
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
dmsg ("marshaling TAO_Marshal_Sequence::encode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Alias::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Alias::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode_ptr tc2; // typecode of the aliased type
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::TypeCode_ptr tc2; // typecode of the aliased type
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
- CORBA_TypeCode::traverse_status retval =
- CORBA_TypeCode::TRAVERSE_CONTINUE; // status of encode operation
+ CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
char *value = (char *) data;
tc2 = tc->content_type (env);
@@ -1109,93 +1113,93 @@ TAO_Marshal_Alias::encode (CORBA_TypeCode_ptr tc,
// efficiency rather than calling
switch (tc2->_kind)
{
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_encoding = stream->put_short (*(CORBA_Short *) value);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_encoding = stream->put_short (*(CORBA::Short *) value);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_encoding = stream->put_long (*(CORBA_Long *) value);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_encoding = stream->put_long (*(CORBA::Long *) value);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_encoding = stream->put_longlong (*(CORBA_LongLong *) value);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_encoding = stream->put_longlong (*(CORBA::LongLong *) value);
break;
- case tk_boolean:
- continue_encoding = stream->put_boolean (*(CORBA_Boolean *) value);
+ case CORBA::tk_boolean:
+ continue_encoding = stream->put_boolean (*(CORBA::Boolean *) value);
break;
- case tk_char:
- case tk_octet:
- continue_encoding = stream->put_char (*(CORBA_Char *) value);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_encoding = stream->put_char (*(CORBA::Char *) value);
break;
- case tk_longdouble:
- continue_encoding = stream->put_longdouble (*(CORBA_LongDouble *) value);
+ case CORBA::tk_longdouble:
+ continue_encoding = stream->put_longdouble (*(CORBA::LongDouble *) value);
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
continue_encoding = stream->put_wchar (*(wchar_t *) value);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->encode (tc2, value, 0, env);
break;
default:
// anything else is an error
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
}
// tc2->Release ();
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Alias::encode detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode exception
-CORBA_TypeCode::traverse_status
-TAO_Marshal_Except::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_Except::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_TypeCode::traverse_status retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
if (env.exception () == 0)
{
CDR *stream = (CDR *) context;
- CORBA_TypeCode_ptr param;
- CORBA_Long size, alignment;
+ CORBA::TypeCode_ptr param;
+ CORBA::Long size, alignment;
- data = (char *) data + sizeof (CORBA_Exception);
+ data = (char *) data + sizeof (CORBA::Exception);
int member_count = tc->member_count (env);
for (int i = 0;
- i < member_count && retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA_B_TRUE;
+ i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE;
i++)
{
param = tc->member_type (i, env);
@@ -1209,49 +1213,49 @@ TAO_Marshal_Except::encode (CORBA_TypeCode_ptr tc,
{
data = ptr_align_binary (data, alignment);
switch (param->_kind){
- case tk_null:
- case tk_void:
+ case CORBA::tk_null:
+ case CORBA::tk_void:
break;
- case tk_short:
- case tk_ushort:
- continue_encoding = stream->put_short (*(CORBA_Short *) data);
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ continue_encoding = stream->put_short (*(CORBA::Short *) data);
break;
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- continue_encoding = stream->put_long (*(CORBA_Long *) data);
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_float:
+ case CORBA::tk_enum:
+ continue_encoding = stream->put_long (*(CORBA::Long *) data);
break;
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- continue_encoding = stream->put_longlong (*(CORBA_LongLong *) data);
+ case CORBA::tk_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_ulonglong:
+ continue_encoding = stream->put_longlong (*(CORBA::LongLong *) data);
break;
- case tk_boolean:
- continue_encoding = stream->put_boolean (*(CORBA_Boolean *) data);
+ case CORBA::tk_boolean:
+ continue_encoding = stream->put_boolean (*(CORBA::Boolean *) data);
break;
- case tk_char:
- case tk_octet:
- continue_encoding = stream->put_char (*(CORBA_Char *) data);
+ case CORBA::tk_char:
+ case CORBA::tk_octet:
+ continue_encoding = stream->put_char (*(CORBA::Char *) data);
break;
- case tk_longdouble:
- continue_encoding = stream->put_longdouble (*(CORBA_LongDouble *) data);
+ case CORBA::tk_longdouble:
+ continue_encoding = stream->put_longdouble (*(CORBA::LongDouble *) data);
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
continue_encoding = stream->put_wchar (*(wchar_t *) data);
break;
- case tk_any:
- case tk_TypeCode:
- case tk_Principal:
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_string:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- case tk_wstring:
+ case CORBA::tk_any:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_string:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ case CORBA::tk_wstring:
retval = stream->encode (param, data, 0, env);
break;
default:
@@ -1260,41 +1264,41 @@ TAO_Marshal_Except::encode (CORBA_TypeCode_ptr tc,
data = (char *) data + size;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
- if (retval == CORBA_TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA_B_TRUE)
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE)
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
else
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Except detected error");
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
}
// encode wstring
-CORBA_TypeCode::traverse_status
-TAO_Marshal_WString::encode (CORBA_TypeCode_ptr tc,
+CORBA::TypeCode::traverse_status
+TAO_Marshal_WString::encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean continue_encoding = CORBA_B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
- CORBA_WChar *str = *(CORBA_WChar **) data;
+ CORBA::WChar *str = *(CORBA::WChar **) data;
CDR *stream = (CDR *) context; // context is the CDR stream
// Be nice to programmers: treat nulls as empty strings not
@@ -1306,12 +1310,12 @@ TAO_Marshal_WString::encode (CORBA_TypeCode_ptr tc,
// Verify string satisfies bounds requirements. We're not so
// permissive as to send messages violating the interface spec
// by having excessively long strings!
- CORBA_ULong bounds = tc->length (env);
+ CORBA::ULong bounds = tc->length (env);
if (env.exception () == 0)
{
// get the actual length of the string
- CORBA_ULong len = wslen ((CORBA_WChar *) str);
+ CORBA::ULong len = wslen ((CORBA::WChar *) str);
// if it is an unbounded string or if the length is less than the
// bounds for an unbounded string
@@ -1321,25 +1325,25 @@ TAO_Marshal_WString::encode (CORBA_TypeCode_ptr tc,
// Encode the string, followed by a NUL character.
for (continue_encoding = stream->put_ulong (len + 1);
- continue_encoding != CORBA_B_FALSE && *str;
+ continue_encoding != CORBA::B_FALSE && *str;
continue_encoding = stream->put_wchar (*str++))
continue;
stream->put_wchar (0);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
else
{
// empty string
stream->put_ulong (1);
stream->put_wchar (0);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
}
diff --git a/TAO/tao/except.cpp b/TAO/tao/except.cpp
index 4fee96130fe..127c62e307a 100644
--- a/TAO/tao/except.cpp
+++ b/TAO/tao/except.cpp
@@ -7,6 +7,7 @@
// THREADING NOTE: calling thread handles mutual exclusion policy
// on all of these data structures.
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -15,6 +16,9 @@
#include "tao/orb.h"
#include "tao/cdr.h"
+#endif
+
+#include "tao/corba.h"
#if defined (HAVE_WIDEC_H)
# include <widec.h>
@@ -33,7 +37,7 @@ DEFINE_GUID (IID_CORBA_SystemException,
0x77420084, 0xf276, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
-CORBA_Exception::CORBA_Exception (CORBA_TypeCode_ptr tc)
+CORBA_Exception::CORBA_Exception (CORBA::TypeCode_ptr tc)
: _type (tc),
refcount_ (1)
{
@@ -79,10 +83,10 @@ CORBA_Exception::operator = (const CORBA_Exception &src)
return *this;
}
-TAO_CONST CORBA_String
+TAO_CONST CORBA::String
CORBA_Exception::id (void) const
{
- CORBA_Environment env;
+ CORBA::Environment env;
assert (refcount_ > 0);
if (_type)
@@ -91,7 +95,7 @@ CORBA_Exception::id (void) const
return 0;
}
-TAO_CONST CORBA_TypeCode_ptr
+TAO_CONST CORBA::TypeCode_ptr
CORBA_Exception::type (void) const
{
assert (refcount_ > 0);
@@ -122,9 +126,9 @@ CORBA_Exception::Release (void)
}
- // CORBA_TypeCode_ptr tc = _type->_duplicate ();
+ // CORBA::TypeCode_ptr tc = _type->_duplicate ();
- CORBA_Any free_it_all (_type, this, CORBA_B_TRUE);
+ CORBA::Any free_it_all (_type, this, CORBA::B_TRUE);
// tc->Release ();
@@ -153,7 +157,7 @@ CORBA_Exception::QueryInterface (REFIID riid,
// Avoid zillions of not-quite-inlined copies of utilities.
-CORBA_UserException::CORBA_UserException (CORBA_TypeCode_ptr tc)
+CORBA_UserException::CORBA_UserException (CORBA::TypeCode_ptr tc)
: CORBA_Exception (tc)
{
}
@@ -162,12 +166,12 @@ CORBA_UserException::~CORBA_UserException (void)
{
}
-CORBA_SystemException::CORBA_SystemException (CORBA_TypeCode_ptr tc,
- CORBA_ULong code,
- CORBA_CompletionStatus completed)
+CORBA::SystemException::CORBA_SystemException (CORBA::TypeCode_ptr tc,
+ CORBA::ULong code,
+ CORBA::CompletionStatus completed)
: _minor (code),
_completed (completed),
- CORBA_Exception (tc)
+ CORBA::Exception (tc)
{
}
@@ -178,8 +182,8 @@ CORBA_SystemException::~CORBA_SystemException (void)
#define NUM_SYS_EXCEPTIONS 26 // update correctly!
#define TC_BUFLEN 160 // preallocated tc buffer
-static CORBA_TypeCode_ptr sys_exceptions [NUM_SYS_EXCEPTIONS];
-CORBA_ExceptionList __system_exceptions;
+static CORBA::TypeCode_ptr sys_exceptions [NUM_SYS_EXCEPTIONS];
+CORBA::ExceptionList __system_exceptions;
// Make the TypeCode for a standard exception ... note that "buffer"
// holds the (unscoped) name originally, and is then overwritten.
@@ -188,11 +192,11 @@ CORBA_ExceptionList __system_exceptions;
// exercise in CPU time; it allocates no new memory.
static void
-make_standard_typecode (CORBA_TypeCode_ptr tcp,
+make_standard_typecode (CORBA::TypeCode_ptr tcp,
const char *name,
unsigned char *buffer,
size_t buflen,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
static const char *minor = "minor";
static const char *completion = "completion";
@@ -206,13 +210,13 @@ make_standard_typecode (CORBA_TypeCode_ptr tcp,
0, 0,
0, 0
};
- static CORBA_TypeCode
- tc_completion_status (tk_enum,
+ static CORBA::TypeCode
+ tc_completion_status (CORBA::tk_enum,
sizeof oc_completion_status,
(unsigned char *) &oc_completion_status,
- CORBA_B_FALSE);
+ CORBA::B_FALSE);
- static const CORBA_TypeCode_ptr completion_status = &tc_completion_status;
+ static const CORBA::TypeCode_ptr completion_status = &tc_completion_status;
// Create a CDR stream ... juggle the alignment here a bit, we
// know it's good enough for tye typecode.
@@ -233,27 +237,27 @@ make_standard_typecode (CORBA_TypeCode_ptr tcp,
(void) ACE_OS::sprintf (full_id, "IDL:omg.org/CORBA/%s:1.0", name);
assert (strlen (full_id) <= sizeof full_id);
- if (stream.put_byte (MY_BYTE_SEX) != CORBA_B_TRUE
- || stream.encode (_tc_CORBA_String,
+ if (stream.put_byte (MY_BYTE_SEX) != CORBA::B_TRUE
+ || stream.encode (CORBA::_tc_string,
&strptr, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
- || stream.encode (_tc_CORBA_String,
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
+ || stream.encode (CORBA::_tc_string,
&name, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
- || stream.put_ulong (2L) != CORBA_B_TRUE
- || stream.encode (_tc_CORBA_String,
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
+ || stream.put_ulong (2L) != CORBA::B_TRUE
+ || stream.encode (CORBA::_tc_string,
&minor, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
- || stream.encode (_tc_CORBA_TypeCode,
- &_tc_CORBA_ULong, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
- || stream.encode (_tc_CORBA_String,
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
+ || stream.encode (CORBA::_tc_TypeCode,
+ &CORBA::_tc_ulong, 0,
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
+ || stream.encode (CORBA::_tc_string,
&completion, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
- || stream.encode (_tc_CORBA_TypeCode,
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
+ || stream.encode (CORBA::_tc_TypeCode,
&completion_status, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE) {
- env.exception (new CORBA_INITIALIZE (COMPLETED_NO));
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE) {
+ env.exception (new CORBA_INITIALIZE (CORBA::COMPLETED_NO));
return;
}
@@ -263,9 +267,9 @@ make_standard_typecode (CORBA_TypeCode_ptr tcp,
// always accept as part of any operation response!
sys_exceptions [__system_exceptions.length++]
- = new (tcp) CORBA_TypeCode (tk_except,
+ = new (tcp) CORBA::TypeCode (CORBA::tk_except,
stream.next - stream.buffer,
- stream.buffer, CORBA_B_FALSE);
+ stream.buffer, CORBA::B_FALSE);
assert (tcp->_length <= TC_BUFLEN);
return;
@@ -312,8 +316,8 @@ make_standard_typecode (CORBA_TypeCode_ptr tcp,
#define SYSEX(name) \
static long tc_buf_ ## name [TC_BUFLEN / sizeof (long)]; \
- static CORBA_TypeCode tc_std_ ## name (tk_except); \
- CORBA_TypeCode_ptr _tc_CORBA_ ## name = &tc_std_ ## name;
+ static CORBA::TypeCode tc_std_ ## name (CORBA::tk_except); \
+ CORBA::TypeCode_ptr CORBA::_tc_ ## name = &tc_std_ ## name;
STANDARD_EXCEPTION_LIST
#undef SYSEX
@@ -321,7 +325,7 @@ STANDARD_EXCEPTION_LIST
// from CORBA::ORB::init ().
void
-__TC_init_standard_exceptions (CORBA_Environment &env)
+__TC_init_standard_exceptions (CORBA::Environment &env)
{
// Initialize the list of system exceptions, used when
// unmarshaling.
@@ -345,7 +349,7 @@ __TC_init_standard_exceptions (CORBA_Environment &env)
// Static initialization of the two user-defined exceptions that
// are part of the ORB.
-static CORBA_Octet tc_buf_Bounds [] =
+static CORBA::Octet tc_buf_Bounds [] =
{
0, 0, 0, 0, // big endian, padded
0, 0, 0, 38, // strlen (id) + 1
@@ -362,14 +366,14 @@ static CORBA_Octet tc_buf_Bounds [] =
0, 0, 0, 0 // no members to this typecode
};
-static CORBA_TypeCode tc_std_Bounds (tk_except,
+static CORBA::TypeCode tc_std_Bounds (CORBA::tk_except,
sizeof tc_buf_Bounds,
tc_buf_Bounds,
- CORBA_B_FALSE);
+ CORBA::B_FALSE);
-CORBA_TypeCode_ptr _tc_CORBA_Bounds = &tc_std_Bounds;
+CORBA::TypeCode_ptr CORBA::_tc_Bounds = &tc_std_Bounds;
-static CORBA_Octet tc_buf_BadKind [] =
+static CORBA::Octet tc_buf_BadKind [] =
{
0, 0, 0, 0, // big endian, padded
0, 0, 0, 39, // strlen (id) + 1
@@ -386,22 +390,22 @@ static CORBA_Octet tc_buf_BadKind [] =
0, 0, 0, 0 // no members to this typecode
};
-static CORBA_TypeCode tc_std_BadKind (tk_except,
+static CORBA::TypeCode tc_std_BadKind (CORBA::tk_except,
sizeof tc_buf_BadKind,
tc_buf_BadKind,
- CORBA_B_FALSE);
-CORBA_TypeCode_ptr _tc_CORBA_BadKind = &tc_std_BadKind;
+ CORBA::B_FALSE);
+CORBA::TypeCode_ptr CORBA::_tc_BadKind = &tc_std_BadKind;
// Convenience -- say if the exception is a system exception or not.
-CORBA_ExceptionType
-CORBA_Environment::exception_type (void) const
+CORBA::ExceptionType
+CORBA::Environment::exception_type (void) const
{
static char sysex_prefix [] = "IDL:omg.org/CORBA/";
static char typecode_extra [] = "TypeCode/";
if (!_exception)
- return NO_EXCEPTION;
+ return CORBA::NO_EXCEPTION;
// All exceptions currently (CORBA 2.0) defined in the CORBA
// scope are system exceptions ... except for a couple that
@@ -412,9 +416,9 @@ CORBA_Environment::exception_type (void) const
if (ACE_OS::strncmp (id, sysex_prefix, sizeof sysex_prefix - 1) == 0
&& ACE_OS::strncmp (id + sizeof sysex_prefix - 1,
typecode_extra, sizeof typecode_extra - 1) != 0)
- return SYSTEM_EXCEPTION;
+ return CORBA::SYSTEM_EXCEPTION;
- return USER_EXCEPTION;
+ return CORBA::USER_EXCEPTION;
}
// Diagnostic utility routine: describe the exception onto
@@ -423,11 +427,11 @@ CORBA_Environment::exception_type (void) const
// XXX make this a member function on "Environment"
void ACE_Svc_Export
-print_exception (const CORBA_Exception *x,
+print_exception (const CORBA::Exception *x,
const char *info,
FILE *stream)
{
- CORBA_String id = x->id ();
+ CORBA::String id = x->id ();
ACE_DEBUG ((LM_ERROR, "EXCEPTION, %s\n", info));
@@ -438,7 +442,7 @@ print_exception (const CORBA_Exception *x,
&& ACE_OS::strncmp ((char *) id, "IDL:omg.org/CORBA/TypeCode/", 19) != 0)
{
// XXX this should be a QueryInterface call instead
- CORBA_SystemException *x2 = (CORBA_SystemException *) x;
+ CORBA::SystemException *x2 = (CORBA::SystemException *) x;
// XXX there are a other few "user exceptions" in the CORBA
// scope, they're not all standard/system exceptions ... really
@@ -451,13 +455,13 @@ print_exception (const CORBA_Exception *x,
switch (x2->completion ())
{
- case COMPLETED_YES:
+ case CORBA::COMPLETED_YES:
fputs ("YES", stream);
break;
- case COMPLETED_NO:
+ case CORBA::COMPLETED_NO:
fputs ("NO", stream);
break;
- case COMPLETED_MAYBE:
+ case CORBA::COMPLETED_MAYBE:
fputs ("MAYBE", stream);
break;
default:
diff --git a/TAO/tao/except.h b/TAO/tao/except.h
index 258d1b5a214..1cac744f595 100644
--- a/TAO/tao/except.h
+++ b/TAO/tao/except.h
@@ -19,16 +19,14 @@
#if !defined (TAO_EXCEPT_H)
# define TAO_EXCEPT_H
+#if 0
# include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
# include "ace/Synch.h"
-
# include <objbase.h>
-
-extern "C" const IID IID_CORBA_Exception;
-extern "C" const IID IID_CORBA_UserException;
-extern "C" const IID IID_CORBA_SystemException;
+#endif
class ACE_Svc_Export CORBA_Exception : public IUnknown
+{
// = TITLE
// CORBA2-specified exception hierarchy.
//
@@ -36,7 +34,6 @@ class ACE_Svc_Export CORBA_Exception : public IUnknown
// scoped type ID (in the TypeCode) that generated by any OMG-IDL compiler
// and available through the Interface Repositories. Think of it as a
// "globally scoped" name distinguishing each exception.
-{
public:
CORBA_Exception (const CORBA_Exception &src);
CORBA_Exception &operator = (const CORBA_Exception &src);
@@ -48,8 +45,8 @@ public:
void operator delete (void *p)
{ ::operator delete (p); }
- TAO_CONST CORBA_String id (void) const;
- TAO_CONST CORBA_TypeCode_ptr type (void) const;
+ TAO_CONST CORBA::String id (void) const;
+ TAO_CONST CORBA::TypeCode_ptr type (void) const;
// = Methods required for COM IUnknown support
@@ -58,11 +55,11 @@ public:
HRESULT __stdcall QueryInterface (REFIID riid,
void **ppv);
- CORBA_Exception (CORBA_TypeCode_ptr type);
+ CORBA_Exception (CORBA::TypeCode_ptr type);
virtual ~CORBA_Exception (void);
private:
- CORBA_TypeCode_ptr _type;
+ CORBA::TypeCode_ptr _type;
// Type of the Exception.
u_int refcount_;
@@ -72,52 +69,45 @@ private:
// Serialize access to reference count.
};
-class ACE_Svc_Export CORBA_UserException : public CORBA_Exception
+class ACE_Svc_Export CORBA_UserException : public CORBA::Exception
+{
// = TITLE
// User exceptions are those defined by application developers
// using OMG-IDL.
-{
public:
- CORBA_UserException (CORBA_TypeCode_ptr tc);
+ CORBA_UserException (CORBA::TypeCode_ptr tc);
~CORBA_UserException (void);
protected:
// Copy and assignment operators.
};
-enum CORBA_CompletionStatus
+class ACE_Svc_Export CORBA_SystemException : public CORBA::Exception
{
- COMPLETED_YES, // successful or exceptional completion
- COMPLETED_NO, // didn't change any state; retry is OK
- COMPLETED_MAYBE // can't say what happened; retry unsafe
-};
-
-class ACE_Svc_Export CORBA_SystemException : public CORBA_Exception
// = TITLE
// System exceptions are those defined in the CORBA spec; OMG-IDL
// defines these.
-{
public:
// 94-9-14 also sez: public copy constructor
// and assignment operator.
- CORBA_SystemException (CORBA_TypeCode_ptr tc,
- CORBA_ULong code,
- CORBA_CompletionStatus completed);
+ CORBA_SystemException (CORBA::TypeCode_ptr tc,
+ CORBA::ULong code,
+ CORBA::CompletionStatus completed);
~CORBA_SystemException (void);
- CORBA_ULong minor (void) const { return _minor; }
- void minor (CORBA_ULong m) { _minor = m; }
+ CORBA::ULong minor (void) const { return _minor; }
+ void minor (CORBA::ULong m) { _minor = m; }
- CORBA_CompletionStatus completion (void) const { return _completed; }
+ CORBA::CompletionStatus completion (void) const { return _completed; }
- void completion (CORBA_CompletionStatus c)
+ void completion (CORBA::CompletionStatus c)
{ _completed = c; }
private:
- CORBA_ULong _minor;
- CORBA_CompletionStatus _completed;
+ CORBA::ULong _minor;
+ CORBA::CompletionStatus _completed;
};
// Declarations for all of the CORBA standard exceptions.
@@ -125,13 +115,16 @@ private:
// XXX shouldn't have a default minor code, at least for code that's
// inside the ORB. All minor codes should be symbolically catalogued.
+//extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_ ## name ; \
+// this line was after #define and is commented as this has been moved into
+// class CORBA
+
#define SYSEX(name) \
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_ ## name ; \
-class ACE_Svc_Export CORBA_ ## name : public CORBA_SystemException { \
+class ACE_Svc_Export CORBA_ ## name : public CORBA::SystemException { \
public: \
- CORBA_ ## name (CORBA_CompletionStatus completed, \
- CORBA_ULong code = 0xffff0000L) \
- : CORBA_SystemException (_tc_CORBA_ ## name, code, completed) \
+ CORBA_ ## name (CORBA::CompletionStatus completed, \
+ CORBA::ULong code = 0xffff0000L) \
+ : CORBA::SystemException (CORBA::_tc_ ## name, code, completed) \
{ } \
}
@@ -164,31 +157,24 @@ SYSEX(DATA_CONVERSION);
#undef SYSEX
-enum CORBA_ExceptionType
-{
- NO_EXCEPTION,
- SYSTEM_EXCEPTION,
- USER_EXCEPTION
-};
-
class CORBA_Environment
+{
// = TITLE
// A CORBA_Environment is a way to automagically ensure that
// exception data is freed -- the "var" class for Exceptions. It
// adds just a bit of convenience function support, helping classify
// exceptions as well as reducing memory leakage.
-{
public:
CORBA_Environment (void) : _exception (0) { }
~CORBA_Environment (void) { clear (); }
- CORBA_Exception_ptr exception (void) const { return _exception; }
+ CORBA::Exception_ptr exception (void) const { return _exception; }
- void exception (CORBA_Exception *ex)
+ void exception (CORBA::Exception *ex)
{ clear (); _exception = ex; }
- CORBA_ExceptionType exception_type (void) const;
- TAO_CONST CORBA_String exception_id (void) const;
+ CORBA::ExceptionType exception_type (void) const;
+ TAO_CONST CORBA::String exception_id (void) const;
void clear (void)
{
@@ -200,7 +186,7 @@ public:
}
private:
- CORBA_Exception_ptr _exception;
+ CORBA::Exception_ptr _exception;
// = These are not provided.
CORBA_Environment (const CORBA_Environment &src);
diff --git a/TAO/tao/factories.cpp b/TAO/tao/factories.cpp
index 8322169799d..fe77fd85a95 100644
--- a/TAO/tao/factories.cpp
+++ b/TAO/tao/factories.cpp
@@ -1,8 +1,4 @@
-#include "tao/factories.h"
-
-#if !defined(__ACE_INLINE__)
-# include "factories.i"
-#endif
+#include "tao/corba.h"
// Template specializations which allow the cached connection manager
// to work better.
diff --git a/TAO/tao/factories.h b/TAO/tao/factories.h
new file mode 100644
index 00000000000..496dae62ed2
--- /dev/null
+++ b/TAO/tao/factories.h
@@ -0,0 +1,141 @@
+// This may look like C, but it's really -*- C++ -*-
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// factories.h
+//
+// = AUTHOR
+// Chris Cleeland
+//
+// = VERSION
+// $Id$
+// ============================================================================
+
+#if !defined (TAO_FACTORIES_H)
+# define TAO_FACTORIES_H
+
+#if 0
+# include "ace/SOCK_Acceptor.h"
+# include "ace/SOCK_Connector.h"
+# include "ace/Strategies_T.h"
+# include "ace/Connector.h"
+# include "ace/Synch.h"
+
+# include "tao/params.h"
+# include "tao/connect.h"
+# include "tao/objtable.h"
+#endif
+
+class TAO_Client_Connection_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
+ // = TITLE
+ // <Svc_Handler> used on the client side and returned
+ // by the <TAO_Client_Factory::CONNECTOR>.
+{
+public:
+ TAO_Client_Connection_Handler (ACE_Thread_Manager* = 0);
+ // Do-nothing constructor
+
+ virtual int open (void*);
+ // Initialization hook
+
+ void in_use (CORBA::Boolean);
+ // Set the in-use flag.
+
+ CORBA::Boolean in_use (void);
+ // Return state of the in-use flag.
+
+private:
+ CORBA::Boolean in_use_;
+ // True value indicates that something is using this handler.
+};
+
+class TAO_Client_Factory
+ // = TITLE
+ // Abstract factory used by the client to turn out various
+ // strategies used on the client side.
+{
+public:
+ typedef ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
+ CONNECTOR;
+ typedef ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>
+ NULL_CREATION_STRATEGY;
+ typedef ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler,
+ ACE_SOCK_CONNECTOR,
+ ACE_SYNCH_RW_MUTEX>
+ CACHED_CONNECT_STRATEGY;
+
+#if defined (TAO_HAS_CLIENT_CONCURRENCY)
+ CONCURRENCY_STRATEGY *concurrency_strategy (void);
+#endif
+
+ CONNECTOR *connector (void);
+ // Return a pointer to a connector using appropriate strategies.
+
+ TAO_Client_Factory (void);
+ ~TAO_Client_Factory (void);
+
+private:
+#if defined (TAO_HAS_CLIENT_CONCURRENCY)
+ CONCURRENCY_STRATEGY *concurrency_strategy_;
+#endif
+ CONNECTOR connector_;
+ NULL_CREATION_STRATEGY null_creation_strategy_;
+ CACHED_CONNECT_STRATEGY caching_connect_strategy_;
+};
+
+class TAO_Server_Factory
+ // = TITLE
+ // Abstract factory used by the server side to turn out various
+ // strategies of special utility to it.
+{
+public:
+ // = SERVER-SIDE
+ typedef ACE_Creation_Strategy<TAO_OA_Connection_Handler> CREATION_STRATEGY;
+ typedef ACE_Accept_Strategy<TAO_OA_Connection_Handler, ACE_SOCK_ACCEPTOR> ACCEPT_STRATEGY;
+ typedef ACE_Concurrency_Strategy<TAO_OA_Connection_Handler> CONCURRENCY_STRATEGY;
+ typedef ACE_Scheduling_Strategy<TAO_OA_Connection_Handler> SCHEDULING_STRATEGY;
+
+ CREATION_STRATEGY *creation_strategy (void);
+ // return concrete creation strategy
+
+ ACCEPT_STRATEGY *accept_strategy (void);
+ // return concrete acceptor strategy
+
+ CONCURRENCY_STRATEGY *concurrency_strategy (void);
+ // return the concurrency strategy used
+
+ SCHEDULING_STRATEGY *scheduling_strategy (void);
+ // return the scheduling strategy used
+
+ TAO_Object_Table *object_lookup_strategy (void);
+ // return the concrete object lookup strategy
+
+ TAO_Server_Factory (void);
+ // constructor
+
+private:
+ // = COMMON
+ ACE_Thread_Strategy<TAO_OA_Connection_Handler> threaded_strategy_;
+ // The threaded strategy used for passively establishing connections.
+ ACE_Reactive_Strategy<TAO_OA_Connection_Handler> reactive_strategy_;
+ // A strategy for passively establishing connections which utilizes the Reactor.
+
+ // = SERVER
+ CONCURRENCY_STRATEGY *concurrency_strategy_;
+ // concrete concurrency strategy
+
+ TAO_Object_Table *objtable_;
+ // instance of object table
+#if 0
+ // Someday we'll need these!
+ CREATION_STRATEGY *creation_strategy_;
+ ACCEPT_STRATEGY *accept_strategy_;
+ SCHEDULING_STRATEGY *scheduling_strategy_;
+#endif
+};
+
+#endif /* TAO_FACTORIES_H */
diff --git a/TAO/tao/factories.i b/TAO/tao/factories.i
index 68748aa6d76..6c2cfb06be7 100644
--- a/TAO/tao/factories.i
+++ b/TAO/tao/factories.i
@@ -4,14 +4,14 @@ TAO_Client_Connection_Handler::TAO_Client_Connection_Handler (ACE_Thread_Manager
{
}
-ACE_INLINE CORBA_Boolean
+ACE_INLINE CORBA::Boolean
TAO_Client_Connection_Handler::in_use (void)
{
return in_use_;
}
ACE_INLINE void
-TAO_Client_Connection_Handler::in_use (CORBA_Boolean flag)
+TAO_Client_Connection_Handler::in_use (CORBA::Boolean flag)
{
in_use_ = flag;
}
diff --git a/TAO/tao/giop.cpp b/TAO/tao/giop.cpp
index f77ae6387b4..76d7c08cfab 100644
--- a/TAO/tao/giop.cpp
+++ b/TAO/tao/giop.cpp
@@ -40,9 +40,14 @@
// error is detected when marshaling or unmarshaling, it should be
// reported.
+#include "corba.h"
+
+#if 0
#include "ace/Log_Msg.h"
#include "ace/SOCK_Stream.h"
+#include "tao/corba.h"
+
#include "tao/giop.h"
#include "tao/orb.h"
#include "tao/orbobj.h"
@@ -50,7 +55,7 @@
#include "tao/cdr.h"
#include "tao/debug.h"
#include "tao/sequence.h"
-
+#endif
// defined by GIOP 1.0 protocol
#define TAO_GIOP_HEADER_LEN 12
@@ -59,7 +64,7 @@
// bytes. They're dealt with as such, rather than using CDR routines,
// to speed up the critical paths for message read and write.
-static inline CORBA_Boolean
+static inline CORBA::Boolean
start_message (GIOP::MsgType type,
CDR &msg)
{
@@ -67,7 +72,7 @@ start_message (GIOP::MsgType type,
msg.remaining = msg.length;
if (msg.bytes_remaining () < TAO_GIOP_HEADER_LEN)
- return CORBA_B_FALSE;
+ return CORBA::B_FALSE;
msg.next [0] = 'G';
msg.next [1] = 'I';
@@ -80,7 +85,7 @@ start_message (GIOP::MsgType type,
msg.next [7] = (u_char) type;
msg.skip_bytes (TAO_GIOP_HEADER_LEN);
- return CORBA_B_TRUE;
+ return CORBA::B_TRUE;
}
static const char digits [] = "0123456789ABCD";
@@ -113,7 +118,7 @@ dump_msg (const char *label,
}
}
-CORBA_Boolean
+CORBA::Boolean
GIOP::send_message (CDR &stream,
ACE_SOCK_Stream &peer)
{
@@ -133,8 +138,8 @@ GIOP::send_message (CDR &stream,
// this particular environment and that isn't handled by the
// networking infrastructure (e.g. IPSEC).
- *(CORBA_Long *) (stream.buffer + 8) =
- (CORBA_Long) (buflen - TAO_GIOP_HEADER_LEN);
+ *(CORBA::Long *) (stream.buffer + 8) =
+ (CORBA::Long) (buflen - TAO_GIOP_HEADER_LEN);
// Strictly speaking, should not need to loop here because the
// socket never gets set to a nonblocking mode ... some Linux
@@ -147,7 +152,7 @@ GIOP::send_message (CDR &stream,
{
ACE_DEBUG ((LM_DEBUG, " (%P|%t) ?? writebuf, buflen %u > length %u\n",
buflen, stream.length));
- return CORBA_B_FALSE;
+ return CORBA::B_FALSE;
}
writelen = peer.send ((char _FAR *) buf, buflen);
@@ -177,7 +182,7 @@ GIOP::send_message (CDR &stream,
ACE_DEBUG ((LM_DEBUG,
" (%P|%t) closing conn %d after fault\n", peer.get_handle ()));
peer.close ();
- return CORBA_B_FALSE;
+ return CORBA::B_FALSE;
}
else if (writelen == 0)
{
@@ -185,7 +190,7 @@ GIOP::send_message (CDR &stream,
" (%P|%t) OutgoingMessage::writebuf () ... EOF, closing conn %d\n",
peer.get_handle ()));
peer.close ();
- return CORBA_B_FALSE;
+ return CORBA::B_FALSE;
}
if ((buflen -= writelen) != 0)
buf += writelen;
@@ -199,7 +204,7 @@ GIOP::send_message (CDR &stream,
dmsg_filter (8, "%u more bytes to write...\n", buflen);
#endif /* DEBUG */
}
- return CORBA_B_TRUE;
+ return CORBA::B_TRUE;
}
// Server sends an "I'm shutting down now, any requests you've sent me
@@ -332,10 +337,10 @@ read_buffer (ACE_SOCK_Stream &peer,
GIOP::MsgType
GIOP::read_message (ACE_SOCK_Stream &connection,
CDR &msg,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
GIOP::MsgType retval;
- CORBA_ULong message_size;
+ CORBA::ULong message_size;
// Read the message header off the wire.
//
@@ -375,7 +380,7 @@ GIOP::read_message (ACE_SOCK_Stream &connection,
ACE_DEBUG ((LM_ERROR,
" (%P|%t) GIOP::read_message header failed (short)\n"));
- env.exception (new CORBA_COMM_FAILURE (COMPLETED_MAYBE));
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_MAYBE));
return MessageError;
}
@@ -390,7 +395,7 @@ GIOP::read_message (ACE_SOCK_Stream &connection,
&& msg.buffer [2] == 'O'
&& msg.buffer [3] == 'P'))
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE)); // header
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); // header
ACE_DEBUG ((LM_DEBUG, "bad header, magic word\n"));
return MessageError;
}
@@ -400,7 +405,7 @@ GIOP::read_message (ACE_SOCK_Stream &connection,
if (!(msg.buffer [4] == MY_MAJOR && msg.buffer [5] <= MY_MINOR))
{
- env.exception (new CORBA_MARSHAL (COMPLETED_MAYBE)); // header
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); // header
ACE_DEBUG ((LM_DEBUG, "bad header, version\n"));
return MessageError;
}
@@ -448,7 +453,7 @@ GIOP::read_message (ACE_SOCK_Stream &connection,
" (%P|%t) short read, only %d of %d bytes\n", len, message_size));
// clean up, and ...
- env.exception (new CORBA_COMM_FAILURE (COMPLETED_MAYBE)); // body
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_MAYBE)); // body
ACE_DEBUG ((LM_DEBUG, "couldn't read rest of message\n"));
return MessageError;
}
@@ -475,7 +480,7 @@ GIOP::read_message (ACE_SOCK_Stream &connection,
GIOP::Invocation::Invocation (IIOP_Object *data,
const char *operation,
- CORBA_Boolean is_roundtrip)
+ CORBA::Boolean is_roundtrip)
: data_ (data),
opname (operation),
do_rsvp (is_roundtrip),
@@ -486,7 +491,7 @@ GIOP::Invocation::Invocation (IIOP_Object *data,
// it will compile on multiple platforms through the magic of ACE
// :-/
- //assert (sizeof (CORBA_ULong) == sizeof (ACE_thread_t));
+ //assert (sizeof (CORBA::ULong) == sizeof (ACE_thread_t));
ACE_thread_t me = ACE_OS::thr_self ();
my_request_id = 0;
@@ -497,7 +502,7 @@ GIOP::Invocation::Invocation (IIOP_Object *data,
GIOP::Invocation::~Invocation (void)
{
- handler_->in_use (CORBA_B_FALSE);
+ handler_->in_use (CORBA::B_FALSE);
}
// Octet codes for the parameters of the "Opaque" (sequence of octet)
@@ -509,17 +514,17 @@ GIOP::Invocation::~Invocation (void)
// padding won't work with compilers that optimize unused data out of
// existence.
-static const CORBA_Long _oc_opaque [] =
+static const CORBA::Long _oc_opaque [] =
{ // CDR typecode octets
1, // native endian + padding; "tricky"
10, // ... (sequence of) octets
0 // ... unbounded
};
-CORBA_TypeCode TC_opaque (tk_sequence,
+CORBA::TypeCode TC_opaque (CORBA::tk_sequence,
sizeof _oc_opaque,
(u_char *) &_oc_opaque,
- CORBA_B_FALSE);
+ CORBA::B_FALSE);
// Octet codes for the parameters of the ServiceContextList TypeCode
// ... this is a CDR encapsulation holding two parameters (like all
@@ -532,7 +537,7 @@ CORBA_TypeCode TC_opaque (tk_sequence,
//
// NOTE: this must be longword aligned!
-static const CORBA_Long _oc_svc_ctx_list [] =
+static const CORBA::Long _oc_svc_ctx_list [] =
{
// START bytes of encapsulation 0
1, // native endian + padding; "tricky"
@@ -541,7 +546,7 @@ static const CORBA_Long _oc_svc_ctx_list [] =
// FIRST sequence param: typecode for struct is complex,
// and so uses a nested encapsulation.
//
- tk_struct,
+ CORBA::tk_struct,
72, // length of encapsulation 1
// START bytes of encapsulation 1 (struct params)
@@ -553,24 +558,24 @@ static const CORBA_Long _oc_svc_ctx_list [] =
// First structure element: name, typecode for ULong
//
- // NOTE: to be more strictly correct this could be a tk_alias
+ // NOTE: to be more strictly correct this could be a CORBA::tk_alias
// typecode ...
1, 0, // name omitted: "context_id"
- tk_long,
+ CORBA::tk_long,
// Second structure element: name, typecode for sequence of octet;
// the typecode for sequence of octet is complex, there's a second
// level of nested encapuslation here.
1, 0, // name omitted: "context_data"
- tk_sequence, // sequence typecode
+ CORBA::tk_sequence, // sequence typecode
16, // length of encapsulation 2
// START bytes of encapsulation 2 (sequence params)
1, // native endian + padding; "tricky"
1, 0, // type ID omitted: null string
- tk_octet, // (sequence of) octet
+ CORBA::tk_octet, // (sequence of) octet
0, // ... unbounded length
// END bytes of encapsulation 2 (sequence params)
@@ -581,10 +586,10 @@ static const CORBA_Long _oc_svc_ctx_list [] =
// END bytes of encapsulation 0 (sequence params)
};
-static CORBA_TypeCode TC_ServiceContextList (tk_sequence,
+static CORBA::TypeCode TC_ServiceContextList (CORBA::tk_sequence,
sizeof _oc_svc_ctx_list,
- (u_char *) &_oc_svc_ctx_list,
- CORBA_B_FALSE);
+ (u_char *) &_oc_svc_ctx_list,
+ CORBA::B_FALSE);
// The public API involves creating an invocation, starting it, filling
// in request parameters, actually performing the invocation, getting
@@ -592,7 +597,7 @@ static CORBA_TypeCode TC_ServiceContextList (tk_sequence,
// restarted (e.g. request forwarding). This is the start/restart entry.
void
-GIOP::Invocation::start (CORBA_Environment &env)
+GIOP::Invocation::start (CORBA::Environment &env)
{
const opaque *key;
@@ -613,16 +618,17 @@ GIOP::Invocation::start (CORBA_Environment &env)
ACE_MT (ACE_GUARD (ACE_Thread_Mutex, guard, lock_));
- // Get a CORBA_Object_ptr from _data using QueryInterface ()
- CORBA_Object_ptr obj = 0;
+ // Get a CORBA::Object_ptr from _data using QueryInterface ()
+ CORBA::Object_ptr obj = 0;
(void) data_->QueryInterface (IID_CORBA_Object, (void **)&obj);
// Get a pointer to the orb from the object
- CORBA_ORB_ptr orb = obj->orb ();
+ CORBA::ORB_ptr orb = obj->orb ();
// Get a reference to the client connector
- TAO_Client_Factory::CONNECTOR* con = 0;
+ // TAO_Client_Factory::CONNECTOR* con = 0;
+ TAO_Client_Strategy_Factory::CONNECTOR* con = 0;
con = (orb->client_factory ()).connector ();
// Determine the object key and the address to which we'll need a connection
@@ -643,7 +649,7 @@ GIOP::Invocation::start (CORBA_Environment &env)
if (con->connect (handler_, server_addr) == -1)
// @@ Need to figure out which exception to set...this one is
// pretty vague.
- env.exception (new CORBA_COMM_FAILURE (COMPLETED_NO));
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_NO));
// Use the ACE_SOCK_Stream from the Client_Connection_Handler for
// communication inplace of the endpoint used below.
@@ -668,11 +674,11 @@ GIOP::Invocation::start (CORBA_Environment &env)
// Build the outgoing message, starting with generic GIOP header.
- CORBA_Boolean bt = start_message (Request, stream);
+ CORBA::Boolean bt = start_message (Request, stream);
- if (bt != CORBA_B_TRUE)
+ if (bt != CORBA::B_TRUE)
{
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
return;
}
@@ -690,42 +696,42 @@ GIOP::Invocation::start (CORBA_Environment &env)
// service context entry is set up to hold a digital signature for
// this message, then patched shortly before it's sent).
//
- static CORBA_Principal_ptr anybody = 0;
+ static CORBA::Principal_ptr anybody = 0;
static ServiceContextList svc_ctx; // all zeroes
if (stream.encode (&TC_ServiceContextList, 0, &svc_ctx, env)
- != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ != CORBA::TypeCode::TRAVERSE_CONTINUE)
return;
if (!stream.put_ulong (my_request_id)
|| !stream.put_boolean (do_rsvp))
{
- env.exception (new CORBA_MARSHAL (COMPLETED_NO));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
return;
}
if (stream.encode (&TC_opaque,
key, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
- || stream.encode (_tc_CORBA_String,
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
+ || stream.encode (CORBA::_tc_string,
&opname, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
- || stream.encode (_tc_CORBA_Principal,
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
+ || stream.encode (CORBA::_tc_Principal,
&anybody, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE)
return; // right after fault
else
return; // no fault reported
}
-extern CORBA_ExceptionList __system_exceptions;
+extern CORBA::ExceptionList __system_exceptions;
// Send request, block until any reply comes back, and unmarshal reply
// parameters as appropriate.
GIOP::ReplyStatusType
-GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
- CORBA_Environment &env)
+GIOP::Invocation::invoke (CORBA::ExceptionList &exceptions,
+ CORBA::Environment &env)
{
// Send Request, return on error or if we're done
@@ -746,7 +752,7 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
// happen.
//
handler_ = 0;
- env.exception (new CORBA_COMM_FAILURE (COMPLETED_MAYBE));
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_MAYBE));
return SYSTEM_EXCEPTION;
}
if (!do_rsvp)
@@ -811,7 +817,7 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
data_->fwd_profile = 0;
handler_->peer ().close ();
- handler_->in_use (CORBA_B_FALSE);
+ handler_->in_use (CORBA::B_FALSE);
handler_ = 0;
return LOCATION_FORWARD;
}
@@ -826,7 +832,7 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
// server bugs; maybe the request was acted on, maybe not, we
// can't tell.
ACE_DEBUG ((LM_DEBUG, " (%P|%t) illegal message in response to my Request!\n"));
- env.exception (new CORBA_COMM_FAILURE (COMPLETED_MAYBE));
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_MAYBE));
// FALLTHROUGH ...
case MessageError:
@@ -862,11 +868,11 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
// here.
ServiceContextList reply_ctx;
- CORBA_ULong request_id;
- CORBA_ULong reply_status; // GIOP::ReplyStatusType
+ CORBA::ULong request_id;
+ CORBA::ULong reply_status; // GIOP::ReplyStatusType
if (stream.decode (&TC_ServiceContextList, &reply_ctx, 0, env)
- != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ != CORBA::TypeCode::TRAVERSE_CONTINUE)
{
send_error (handler_->peer ());
return SYSTEM_EXCEPTION;
@@ -880,7 +886,7 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
|| reply_status > LOCATION_FORWARD)
{
send_error (handler_->peer ());
- env.exception (new CORBA_COMM_FAILURE (COMPLETED_MAYBE));
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_MAYBE));
ACE_DEBUG ((LM_DEBUG, " (%P|%t) bad Response header\n"));
return SYSTEM_EXCEPTION;
}
@@ -909,30 +915,30 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
case USER_EXCEPTION:
case SYSTEM_EXCEPTION:
{
- CORBA_String exception_id;
+ CORBA::String exception_id;
// Pull the exception ID out of the marshaling buffer.
{
- CORBA_ULong len;
+ CORBA::ULong len;
//
// Read "length" field of string, so "next" points
// right at the null-terminated ID. Then get the ID.
//
- if (stream.get_ulong (len) != CORBA_B_TRUE
+ if (stream.get_ulong (len) != CORBA::B_TRUE
|| len > stream.remaining)
{
send_error (handler_->peer ());
- env.exception (new CORBA_MARSHAL (COMPLETED_YES));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_YES));
return SYSTEM_EXCEPTION;
}
- exception_id = (CORBA_String) stream.next;
+ exception_id = (CORBA::String) stream.next;
stream.skip_bytes (len);
}
// User and system exceptions differ only in what table of
// exception typecodes is searched.
- CORBA_ExceptionList *xlist;
+ CORBA::ExceptionList *xlist;
if (reply_status == USER_EXCEPTION)
xlist = &exceptions;
@@ -944,13 +950,13 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
// that exception is not allowed by this operation, fail (next).
u_int i;
- CORBA_TypeCode_ptr *tcp;
+ CORBA::TypeCode_ptr *tcp;
for (i = 0, tcp = xlist->buffer;
i < xlist->length;
i++, tcp++)
{
- CORBA_String xid;
+ CORBA::String xid;
xid = (*tcp)->id (env);
if (env.exception () != 0)
@@ -963,7 +969,7 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
if (ACE_OS::strcmp ((char *)exception_id, (char *)xid) == 0)
{
size_t size;
- CORBA_Exception *exception;
+ CORBA::Exception *exception;
size = (*tcp)->size (env);
if (env.exception () != 0)
@@ -978,10 +984,10 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
// to clean them all up together, in case of errors
// unmarshaling.
- exception = new (new char [size]) CORBA_Exception (*tcp);
+ exception = new (new char [size]) CORBA::Exception (*tcp);
if (stream.decode (*tcp, exception, 0, env)
- != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ != CORBA::TypeCode::TRAVERSE_CONTINUE)
{
delete exception;
ACE_DEBUG ((LM_ERROR, " (%P|%t) invoke, unmarshal %s exception %s\n",
@@ -1006,25 +1012,25 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
// don't exist, not bugs in/near the implementation code.
if (reply_status == USER_EXCEPTION)
- env.exception (new CORBA_OBJ_ADAPTER (COMPLETED_YES));
+ env.exception (new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_YES));
else
- env.exception (new CORBA_INTERNAL (COMPLETED_MAYBE));
+ env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_MAYBE));
return SYSTEM_EXCEPTION;
}
// NOTREACHED
case LOCATION_FORWARD:
{
- CORBA_Object_ptr obj;
+ CORBA::Object_ptr obj;
IIOP_Object *obj2;
// Unmarshal the object we _should_ be calling. We know that
// one of the facets of this object will be an IIOP invocation
// profile.
- if (stream.decode (_tc_CORBA_Object,
+ if (stream.decode (CORBA::_tc_Object,
&obj, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
|| obj->QueryInterface (IID_IIOP_Object,
(void **)&obj2) != NOERROR)
{
@@ -1032,7 +1038,7 @@ GIOP::Invocation::invoke (CORBA_ExceptionList &exceptions,
send_error (handler_->peer ());
return SYSTEM_EXCEPTION;
}
- CORBA_release (obj);
+ CORBA::release (obj);
// Make a copy of the IIOP profile in the forwarded objref,
// reusing memory where practical. Then delete the forwarded
@@ -1079,20 +1085,20 @@ int GIOP::incoming_message (ACE_SOCK_Stream &peer,
ForwardFunc check_forward,
RequestHandler handle_request,
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
/*
int
GIOP::incoming_message (ACE_SOCK_Stream &peer,
LocateStatusType check_forward (opaque &key,
- CORBA_Object_ptr &objref,
+ CORBA::Object_ptr &objref,
void *context),
void handle_request (RequestHeader &req,
CDR &req_body,
CDR *reply,
void *context,
- CORBA_Environment &env),
+ CORBA::Environment &env),
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
*/
{
int retval = 1; // 1==success, 0==eof, -1==error
@@ -1110,7 +1116,7 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
case CloseConnection:
default: // Unknown message
ACE_DEBUG ((LM_DEBUG, " (%P|%t) Illegal message received by server\n"));
- env.exception (new CORBA_COMM_FAILURE (COMPLETED_NO));
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_NO));
// FALLTHROUGH
// read_message () has already set some error in the environment
@@ -1132,7 +1138,7 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
case Request:
{
RequestHeader req;
- CORBA_Boolean hdr_status;
+ CORBA::Boolean hdr_status;
// Tear out the service context ... we currently ignore it,
// but it should probably be passed to each ORB service as
@@ -1156,11 +1162,11 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
&req.object_key,
0,
env);
- hdr_status = hdr_status && msg.decode (_tc_CORBA_String,
+ hdr_status = hdr_status && msg.decode (CORBA::_tc_string,
&req.operation,
0,
env);
- hdr_status = hdr_status && msg.decode (_tc_CORBA_Principal,
+ hdr_status = hdr_status && msg.decode (CORBA::_tc_Principal,
&req.requesting_principal,
0,
env);
@@ -1200,7 +1206,7 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
if (check_forward != 0)
{
LocateStatusType status;
- CORBA_Object_ptr fwd_ref = 0;
+ CORBA::Object_ptr fwd_ref = 0;
status = check_forward (req.object_key, fwd_ref, context);
@@ -1223,7 +1229,7 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
if (!req.response_expected)
{
if (status == OBJECT_FORWARD)
- CORBA_release (fwd_ref);
+ CORBA::release (fwd_ref);
//
// Else either forward the request ...
@@ -1233,31 +1239,31 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
{
ACE_DEBUG ((LM_DEBUG, " (%P|%t) forwarding Request message\n"));
response.put_ulong (LOCATION_FORWARD);
- response.encode (_tc_CORBA_Object,
+ response.encode (CORBA::_tc_Object,
&fwd_ref,
0,
env);
- CORBA_release (fwd_ref);
- (void) send_message (response, peer);
+ CORBA::release (fwd_ref);
+ (void) send_message (response, peer);
// ... or report exception that the object doesn't exist.
}
else
{
- CORBA_OBJECT_NOT_EXIST exc (COMPLETED_YES);
+ CORBA::OBJECT_NOT_EXIST exc (CORBA::COMPLETED_YES);
response.put_ulong (SYSTEM_EXCEPTION);
- (void) response.encode (_tc_CORBA_OBJECT_NOT_EXIST,
+ (void) response.encode (CORBA::_tc_OBJECT_NOT_EXIST,
&exc,
0,
env);
- (void) send_message (response, peer);
+ (void) send_message (response, peer);
}
delete [] req.object_key.buffer;
- CORBA_string_free (req.operation);
+ CORBA::string_free (req.operation);
return retval;
}
}
@@ -1284,13 +1290,13 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
// "handle_request" routine puts ReplyStatusType then
// parameters.
- (void) send_message (response, peer);
+ (void) send_message (response, peer);
}
else
handle_request (req, msg, 0, context, env);
delete [] req.object_key.buffer;
- CORBA_string_free (req.operation);
+ CORBA::string_free (req.operation);
}
break;
@@ -1298,7 +1304,7 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
// support forwarding, we default to doing no forwarding.
case LocateRequest:
{
- CORBA_ULong request_id;
+ CORBA::ULong request_id;
opaque key;
msg.get_ulong (request_id);
@@ -1308,7 +1314,7 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
u_char resp [CDR::DEFAULT_BUFSIZE];
CDR response (resp, sizeof resp);
- CORBA_Object_ptr fwd_ref = 0;
+ CORBA::Object_ptr fwd_ref = 0;
start_message (LocateReply, response);
response.put_ulong (request_id);
@@ -1323,12 +1329,12 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
LocateStatusType status;
status = check_forward (key, fwd_ref, context);
- response.put_ulong ((CORBA_ULong) status);
+ response.put_ulong ((CORBA::ULong) status);
if (status == OBJECT_FORWARD)
{
ACE_DEBUG ((LM_DEBUG, "LocateRequest response: forward requests\n"));
- response.encode (_tc_CORBA_Object, &fwd_ref, 0, env);
+ response.encode (CORBA::_tc_Object, &fwd_ref, 0, env);
}
else if (status == OBJECT_HERE)
ACE_DEBUG ((LM_DEBUG, "LocateRequest response: object is here!\n"));
@@ -1352,7 +1358,7 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
case CancelRequest:
{
- CORBA_ULong request_id;
+ CORBA::ULong request_id;
msg.get_ulong (request_id);
}
@@ -1366,10 +1372,10 @@ GIOP::incoming_message (ACE_SOCK_Stream &peer,
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class CORBA_SEQUENCE<GIOP::ServiceContext>;
-template class CORBA_SEQUENCE<CORBA_Octet>;
-template class CORBA_SEQUENCE<CORBA_TypeCode*>;
+template class CORBA_SEQUENCE<CORBA::Octet>;
+template class CORBA_SEQUENCE<CORBA::TypeCode*>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate CORBA_SEQUENCE<GIOP::ServiceContext>
-#pragma instantiate CORBA_SEQUENCE<CORBA_Octet>
-#pragma instantiate CORBA_SEQUENCE<CORBA_TypeCode*>
+#pragma instantiate CORBA_SEQUENCE<CORBA::Octet>
+#pragma instantiate CORBA_SEQUENCE<CORBA::TypeCode*>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/giop.h b/TAO/tao/giop.h
index 2ec0a99f25d..c05075cb44b 100644
--- a/TAO/tao/giop.h
+++ b/TAO/tao/giop.h
@@ -19,6 +19,7 @@
#if !defined (TAO_GIOP_H)
# define TAO_GIOP_H
+#if 0
# include "ace/OS.h"
# include "ace/SOCK_Stream.h"
@@ -27,9 +28,11 @@
# include "tao/iiopobj.h" // XXX -- not generic!
# include "tao/factories.h"
+#endif
// XXX this same typedef is used in other places, e.g. iiopobj.hh
-typedef CORBA_SEQUENCE <CORBA_Octet> opaque;
+//typedef CORBA_SEQUENCE <CORBA_Octet> opaque;
+typedef CORBA::OctetSeq opaque;
class IOP
{ // namespace
@@ -40,7 +43,7 @@ public:
//
// Email to tag-request@omg.org to allocate tags.
- typedef CORBA_ULong ProfileId;
+ typedef CORBA::ULong ProfileId;
enum
{
@@ -76,7 +79,7 @@ public:
//
// Email to tag-request@omg.org to allocate tags.
- typedef CORBA_ULong ComponentId;
+ typedef CORBA::ULong ComponentId;
enum
{
@@ -120,7 +123,7 @@ class GIOP // namespace
// invocations safely, since the GIOP code is reentrant.
{
public:
- struct Version { CORBA_Octet major, minor; };
+ struct Version { CORBA::Octet major, minor; };
// GIOP protocol version information
@@ -142,16 +145,16 @@ public:
struct MessageHeader
{
- CORBA_Char magic [4]; // "GIOP"
+ CORBA::Char magic [4]; // "GIOP"
Version giop_version;
- CORBA_Octet byte_order; // 0 = big, 1 = little
- CORBA_Octet message_type; // MsgType above
- CORBA_ULong message_size; // in byte_order!
+ CORBA::Octet byte_order; // 0 = big, 1 = little
+ CORBA::Octet message_type; // MsgType above
+ CORBA::ULong message_size; // in byte_order!
};
// Support for Implicit ORB Service Context
- typedef CORBA_ULong ServiceID;
+ typedef CORBA::ULong ServiceID;
enum
{
@@ -174,11 +177,11 @@ public:
struct RequestHeader
{
ServiceContextList service_info; // @@ More info needed
- CORBA_ULong request_id; // Unique identifier for a request
- CORBA_Boolean response_expected; // true if this request requires a response
+ CORBA::ULong request_id; // Unique identifier for a request
+ CORBA::Boolean response_expected; // true if this request requires a response
opaque object_key; // @@ the object key of the destination object (is this right?)
- CORBA_String operation; // Name of the operation being performed
- CORBA_Principal_ptr requesting_principal; // Identifies the requester
+ CORBA::String operation; // Name of the operation being performed
+ CORBA::Principal_ptr requesting_principal; // Identifies the requester
};
enum ReplyStatusType
@@ -192,7 +195,7 @@ public:
struct ReplyHeader
{
ServiceContextList service_info; // @@ More info
- CORBA_ULong request_id; // Unique identifier of the request for which this is a reply
+ CORBA::ULong request_id; // Unique identifier of the request for which this is a reply
ReplyStatusType reply_status; // Status of the reply (see above enum)
};
@@ -200,14 +203,14 @@ public:
struct CancelRequestHeader
{
- CORBA_ULong request_id; // Unique identifier of the request being cancelled
+ CORBA::ULong request_id; // Unique identifier of the request being cancelled
};
// = Location service support
struct LocateRequestHeader
{
- CORBA_ULong request_id;
+ CORBA::ULong request_id;
opaque object_key;
};
@@ -220,7 +223,7 @@ public:
struct LocateReplyHeader
{
- CORBA_ULong request_id;
+ CORBA::ULong request_id;
LocateStatusType locate_status;
};
@@ -232,32 +235,32 @@ public:
public:
Invocation (IIOP_Object *data,
const char *operation,
- CORBA_Boolean is_roundtrip);
+ CORBA::Boolean is_roundtrip);
~Invocation (void);
- void start (CORBA_Environment &env);
+ void start (CORBA::Environment &env);
// <start> goes beyond initialising data structures, and makes
// calls that may fail -- and thus throw exceptions.
- void put_param (CORBA_TypeCode_ptr tc,
+ void put_param (CORBA::TypeCode_ptr tc,
void *value,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
(void) stream.encode(tc, value, 0, env);
}
- ReplyStatusType invoke (CORBA_ExceptionList &exceptions,
- CORBA_Environment &env);
+ ReplyStatusType invoke (CORBA::ExceptionList &exceptions,
+ CORBA::Environment &env);
- void get_value (CORBA_TypeCode_ptr tc,
+ void get_value (CORBA::TypeCode_ptr tc,
void *value,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
(void) stream.decode (tc, value, 0, env);
}
- // No CORBA_Context support (deprecated).
+ // No CORBA::Context support (deprecated).
private:
// @@ Please add comments.
@@ -265,9 +268,9 @@ public:
const char *opname;
- CORBA_Boolean do_rsvp;
+ CORBA::Boolean do_rsvp;
- CORBA_ULong my_request_id;
+ CORBA::ULong my_request_id;
ACE_Thread_Mutex lock_;
@@ -306,29 +309,29 @@ public:
// Return: 1==success,0==EOF,-1==error
typedef LocateStatusType (*ForwardFunc) (opaque &,
- CORBA_Object_ptr &,
+ CORBA::Object_ptr &,
void *);
typedef void (*RequestHandler) (RequestHeader &,
CDR &,
CDR *,
void *,
- CORBA_Environment &);
+ CORBA::Environment &);
static int incoming_message (ACE_SOCK_Stream &peer,
ForwardFunc check_forward,
RequestHandler handle_request,
void *context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
- static CORBA_Boolean send_message (CDR &stream,
+ static CORBA::Boolean send_message (CDR &stream,
ACE_SOCK_Stream &peer);
// = Reads message, returns message type from header.
static MsgType read_message (ACE_SOCK_Stream &peer,
CDR &msg,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
#endif /* TAO_GIOP_H */
diff --git a/TAO/tao/iiopobj.cpp b/TAO/tao/iiopobj.cpp
index 867a8e48c8c..497a3a96b63 100644
--- a/TAO/tao/iiopobj.cpp
+++ b/TAO/tao/iiopobj.cpp
@@ -8,6 +8,7 @@
// based implementation, and can neither be used by other kinds of
// objref nor have a default implementation.
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -19,6 +20,9 @@
#if !defined (__ACE_INLINE__)
# include "iiopobj.i"
#endif /* __ACE_INLINE__ */
+#endif /* 0 */
+
+#include "tao/corba.h"
IIOP::ProfileBody::ProfileBody (const IIOP::ProfileBody &src)
: iiop_version (src.iiop_version),
@@ -31,8 +35,8 @@ IIOP::ProfileBody::ProfileBody (const IIOP::ProfileBody &src)
object_key.length = object_key.maximum = src.object_key.length;
- // object_key.buffer = (CORBA_Octet *) ACE_OS::malloc (object_key.maximum);
- object_key.buffer = new CORBA_Octet [object_key.maximum];
+ // object_key.buffer = (CORBA::Octet *) ACE_OS::malloc (object_key.maximum);
+ object_key.buffer = new CORBA::Octet [object_key.maximum];
(void) ACE_OS::memcpy (object_key.buffer,
src.object_key.buffer,
@@ -40,8 +44,8 @@ IIOP::ProfileBody::ProfileBody (const IIOP::ProfileBody &src)
}
IIOP::ProfileBody::ProfileBody (const IIOP::Version &v,
- const CORBA_String &h,
- const CORBA_UShort &p,
+ const CORBA::String &h,
+ const CORBA::UShort &p,
const opaque &key)
: iiop_version (v),
port (p)
@@ -50,8 +54,8 @@ IIOP::ProfileBody::ProfileBody (const IIOP::Version &v,
object_key.length = object_key.maximum = key.length;
- // object_key.buffer = (CORBA_Octet *) ACE_OS::malloc (object_key.maximum);
- object_key.buffer = new CORBA_Octet [object_key.maximum];
+ // object_key.buffer = (CORBA::Octet *) ACE_OS::malloc (object_key.maximum);
+ object_key.buffer = new CORBA::Octet [object_key.maximum];
(void) ACE_OS::memcpy (object_key.buffer, key.buffer,
object_key.length);
@@ -61,11 +65,11 @@ IIOP::ProfileBody::ProfileBody (const IIOP::Version &v,
//
// NOTE that this must NOT go across the network!
-CORBA_ULong
-IIOP_Object::hash (CORBA_ULong max,
- CORBA_Environment &env)
+CORBA::ULong
+IIOP_Object::hash (CORBA::ULong max,
+ CORBA::Environment &env)
{
- CORBA_ULong hashval;
+ CORBA::ULong hashval;
env.clear ();
@@ -92,20 +96,20 @@ IIOP_Object::hash (CORBA_ULong max,
//
// NOTE that this must NOT go across the network!
-CORBA_Boolean
-IIOP_Object::is_equivalent (CORBA_Object_ptr other_obj,
- CORBA_Environment &env)
+CORBA::Boolean
+IIOP_Object::is_equivalent (CORBA::Object_ptr other_obj,
+ CORBA::Environment &env)
{
IIOP::ProfileBody *body, *body2;
IIOP_Object *other_iiop_obj;
env.clear ();
- if (CORBA_is_nil (other_obj) == CORBA_B_TRUE
+ if (CORBA::is_nil (other_obj) == CORBA::B_TRUE
|| other_obj->QueryInterface (IID_IIOP_Object,
(void **) &other_iiop_obj) != NOERROR)
- return CORBA_B_FALSE;
- CORBA_release (other_obj);
+ return CORBA::B_FALSE;
+ CORBA::release (other_obj);
// Compare all the bytes of the object address -- must be the same
@@ -132,7 +136,7 @@ DEFINE_GUID (IID_IIOP_Object,
#if 0
// Added by BRM: 2/21/97
-// IID_STUB_Object and IID_CORBA_Object were not being defined.
+// IID_STUB_Object and IID_CORBA::Object were not being defined.
// Need a central place for all of these macros.
#if 0 //defined(WIN32)
@@ -144,10 +148,10 @@ DEFINE_GUID(IID_STUB_Object,
#endif /* 0 */
// {A201E4C2-F258-11ce-9598-0000C07CA898}
-DEFINE_GUID (IID_CORBA_Object,
+DEFINE_GUID (IID_CORBA::Object,
0xa201e4c2, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
-// End - Added by BRM: 2/21/97 IID_STUB_Object and IID_CORBA_Object
+// End - Added by BRM: 2/21/97 IID_STUB_Object and IID_CORBA::Object
// were not being defined. Need a central place for all of these
// macros.
#endif /* 0 */
@@ -183,7 +187,7 @@ IIOP_Object::Release (void)
// STUB_OBJECT ... inherited by this one
// IIOP_OBJECT ... this one
//
-// CORBA_Object ... contained within this; it delegates back
+// CORBA::Object ... contained within this; it delegates back
// to this one as its "parent"
HRESULT __stdcall
@@ -207,7 +211,7 @@ IIOP_Object::QueryInterface (REFIID riid,
}
//TAO extensions
-CORBA_String IIOP_Object::_get_name (CORBA_Environment &)
+CORBA::String IIOP_Object::_get_name (CORBA::Environment &)
{
- return (CORBA_String) this->profile.object_key.buffer;
+ return (CORBA::String) this->profile.object_key.buffer;
}
diff --git a/TAO/tao/iiopobj.h b/TAO/tao/iiopobj.h
index d451581b973..253ddd6105b 100644
--- a/TAO/tao/iiopobj.h
+++ b/TAO/tao/iiopobj.h
@@ -23,19 +23,21 @@
#if !defined (TAO_IIOPOBJ_H)
# define TAO_IIOPOBJ_H
+#if 0
# include "ace/OS.h"
# include "tao/corbacom.h"
# include "tao/sequence.h"
# include "tao/object.h"
# include "tao/stub.h"
+#endif
// @@ Can we use the ACE_SYNCH_MUTEX here rather than these typedefs?
# if !defined (ACE_HAS_THREADS)
typedef ACE_Null_Mutex ACE_Thread_Mutex;
# endif /* ACE_HAS_THREADS */
-typedef CORBA_SEQUENCE <CORBA_Octet> opaque;
+typedef CORBA::OctetSeq opaque;
class ACE_Svc_Export IIOP // namespace
{
@@ -46,10 +48,10 @@ public:
struct Version
{
- CORBA_Octet major;
- CORBA_Octet minor;
+ CORBA::Octet major;
+ CORBA::Octet minor;
- Version (CORBA_Octet maj = MY_MAJOR, CORBA_Octet min = MY_MINOR);
+ Version (CORBA::Octet maj = MY_MAJOR, CORBA::Octet min = MY_MINOR);
};
// IOR support ... ProfileBody is encapsulated in an IIOP
@@ -58,16 +60,16 @@ public:
struct ProfileBody
{
Version iiop_version;
- CORBA_String host;
- CORBA_UShort port;
+ CORBA::String host;
+ CORBA::UShort port;
opaque object_key;
ProfileBody (void);
ProfileBody (const ProfileBody &src);
ProfileBody (const Version &v,
- const CORBA_String &h,
- const CORBA_UShort &p,
+ const CORBA::String &h,
+ const CORBA::UShort &p,
const opaque &object_key);
~ProfileBody (void);
@@ -88,31 +90,29 @@ public:
// that it is visible to DCOM, which is a C linkage, I believe. This
// is all holdover from the original DB code, and the COM integration
// is the least understood fo any of it.
-extern "C" const IID IID_IIOP_Object;
-
class ACE_Svc_Export IIOP_Object : public STUB_Object
{
public:
- void do_call (CORBA_Environment &env,
+ void do_call (CORBA::Environment &env,
const TAO_Call_Data *info,
...);
// Stub-based invocation.
void do_dynamic_call (const char *opname,
- CORBA_Boolean is_roundtrip,
- CORBA_NVList_ptr args,
- CORBA_NamedValue_ptr result,
- CORBA_Flags flags,
- CORBA_ExceptionList &exceptions,
- CORBA_Environment &env);
+ CORBA::Boolean is_roundtrip,
+ CORBA::NVList_ptr args,
+ CORBA::NamedValue_ptr result,
+ CORBA::Flags flags,
+ CORBA::ExceptionList &exceptions,
+ CORBA::Environment &env);
// DII based invocation.
// = Support for tables keyed by objrefs.
- CORBA_ULong hash (CORBA_ULong maximum,
- CORBA_Environment &env);
- CORBA_Boolean is_equivalent (CORBA_Object_ptr other_obj,
- CORBA_Environment &env);
+ CORBA::ULong hash (CORBA::ULong maximum,
+ CORBA::Environment &env);
+ CORBA::Boolean is_equivalent (CORBA::Object_ptr other_obj,
+ CORBA::Environment &env);
// XXX All objref representations should know how to marshal
// themselves. That will involve ensuring that the IOR that gets
@@ -138,10 +138,10 @@ public:
HRESULT __stdcall QueryInterface (REFIID type_id,
void **ppv);
- virtual CORBA_String _get_name (CORBA_Environment &env);
+ virtual CORBA::String _get_name (CORBA::Environment &env);
private:
- CORBA_Object base;
+ CORBA::Object base;
ACE_Thread_Mutex lock_;
u_int refcount_;
@@ -160,8 +160,4 @@ private:
#endif /* __GNUG__ */
};
-# if defined (__ACE_INLINE__)
-# include "iiopobj.i"
-# endif /* __ACE_INLINE__ */
-
#endif /* TAO_IIOPOBJ_H */
diff --git a/TAO/tao/iiopobj.i b/TAO/tao/iiopobj.i
index 4f119772433..253735fb01e 100644
--- a/TAO/tao/iiopobj.i
+++ b/TAO/tao/iiopobj.i
@@ -1,5 +1,5 @@
ACE_INLINE
-IIOP::Version::Version (CORBA_Octet maj, CORBA_Octet min)
+IIOP::Version::Version (CORBA::Octet maj, CORBA::Octet min)
: major (maj),
minor (min)
{}
diff --git a/TAO/tao/iioporb.cpp b/TAO/tao/iioporb.cpp
index 0fc7ecdc105..faabda8ac9d 100644
--- a/TAO/tao/iioporb.cpp
+++ b/TAO/tao/iioporb.cpp
@@ -7,6 +7,7 @@
// This includes objref stringification/destringification for IIOP
// object references.
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -16,6 +17,9 @@
#include "tao/cdr.h"
#include "tao/iioporb.h"
#include "tao/iiopobj.h"
+#endif
+
+#include "tao/corba.h"
static const char ior_prefix [] = "IOR:";
static const char iiop_prefix [] = "iiop:";
@@ -47,9 +51,9 @@ hex2byte (char c)
// Objref stringification
-CORBA_String
-IIOP_ORB::object_to_string (CORBA_Object_ptr obj,
- CORBA_Environment &env)
+CORBA::String
+IIOP_ORB::object_to_string (CORBA::Object_ptr obj,
+ CORBA::Environment &env)
{
env.clear ();
@@ -73,22 +77,22 @@ IIOP_ORB::object_to_string (CORBA_Object_ptr obj,
// Marshal the objref into an encapsulation bytestream.
(void) cdr.put_char (MY_BYTE_SEX);
- if (cdr.encode (_tc_CORBA_Object,
+ if (cdr.encode (CORBA::_tc_Object,
&obj, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE)
return 0;
// Now hexify the encapsulated CDR data into a string, and
// return that string.
- CORBA_String cp;
+ CORBA::String cp;
size_t len = cdr.length - cdr.remaining;
- CORBA_String string = CORBA_string_alloc (sizeof ior_prefix + 2 * len);
+ CORBA::String string = CORBA::string_alloc (sizeof ior_prefix + 2 * len);
ACE_OS::strcpy ((char *) string, ior_prefix);
- for (cp = (CORBA_String) ACE_OS::strchr ((char *) string, ':') + 1, bytes = cdr.buffer;
+ for (cp = (CORBA::String) ACE_OS::strchr ((char *) string, ':') + 1, bytes = cdr.buffer;
len--;
bytes++)
{
@@ -120,12 +124,12 @@ IIOP_ORB::object_to_string (CORBA_Object_ptr obj,
if (obj->QueryInterface (IID_IIOP_Object,
(void **) &obj2) != NOERROR)
{
- env.exception (new CORBA_DATA_CONVERSION (COMPLETED_NO));
+ env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO));
return 0;
}
if (!obj2) // null?
- return CORBA_string_copy ((CORBA_String) iiop_prefix);
+ return CORBA::string_copy ((CORBA::String) iiop_prefix);
char buf [BUFSIZ + 2];
@@ -158,11 +162,11 @@ IIOP_ORB::object_to_string (CORBA_Object_ptr obj,
}
if (cp >= &buf [BUFSIZ])
{
- env.exception (new CORBA_IMP_LIMIT (COMPLETED_NO));
+ env.exception (new CORBA_IMP_LIMIT (CORBA::COMPLETED_NO));
return 0;
}
*cp = 0;
- return CORBA_string_copy ((CORBA_String) &buf[0]);
+ return CORBA::string_copy ((CORBA::String) &buf[0]);
}
}
@@ -171,9 +175,9 @@ IIOP_ORB::object_to_string (CORBA_Object_ptr obj,
// XXX there should be a simple way to reuse this code in other ORB
// implementations ...
-static CORBA_Object_ptr
-ior_string_to_object (CORBA_String str,
- CORBA_Environment &env)
+static CORBA::Object_ptr
+ior_string_to_object (CORBA::String str,
+ CORBA::Environment &env)
{
// Unhex the bytes, and make a CDR deencapsulation stream from the
// resulting data.
@@ -199,7 +203,7 @@ ior_string_to_object (CORBA_String str,
if (tmp [0] && !isspace (tmp [0]))
{
delete [] buffer;
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
@@ -207,12 +211,12 @@ ior_string_to_object (CORBA_String str,
// stream.
CDR stream;
- CORBA_Object_ptr objref;
+ CORBA::Object_ptr objref;
stream.setup_encapsulation (buffer, len);
- if (stream.decode (_tc_CORBA_Object,
+ if (stream.decode (CORBA::_tc_Object,
&objref, 0,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE)
objref = 0;
delete [] buffer;
@@ -221,9 +225,9 @@ ior_string_to_object (CORBA_String str,
// Destringify URL style IIOP objref.
-static CORBA_Object_ptr
-iiop_string_to_object (CORBA_String string,
- CORBA_Environment &env)
+static CORBA::Object_ptr
+iiop_string_to_object (CORBA::String string,
+ CORBA::Environment &env)
{
// NIL objref encodes as just "iiop:" ... which has already been
// removed, so we see it as an empty string.
@@ -249,7 +253,7 @@ iiop_string_to_object (CORBA_String string,
}
else
{
- env.exception (new CORBA_DATA_CONVERSION (COMPLETED_NO));
+ env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO));
data->Release ();
return 0;
}
@@ -257,7 +261,7 @@ iiop_string_to_object (CORBA_String string,
if (data->profile.iiop_version.major != IIOP::MY_MAJOR
|| data->profile.iiop_version.minor > IIOP::MY_MINOR)
{
- env.exception (new CORBA_DATA_CONVERSION (COMPLETED_NO));
+ env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO));
data->Release ();
return 0;
}
@@ -268,12 +272,12 @@ iiop_string_to_object (CORBA_String string,
if (cp == 0)
{
- env.exception (new CORBA_DATA_CONVERSION (COMPLETED_NO));
+ env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO));
data->Release ();
return 0;
}
- data->profile.host = CORBA_string_alloc (1 + cp - string);
+ data->profile.host = CORBA::string_alloc (1 + cp - string);
for (cp = data->profile.host;
*string != ':';
@@ -287,8 +291,8 @@ iiop_string_to_object (CORBA_String string,
if (cp == 0)
{
- env.exception (new CORBA_DATA_CONVERSION (COMPLETED_NO));
- CORBA_string_free (data->profile.host);
+ env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO));
+ CORBA::string_free (data->profile.host);
data->Release ();
return 0;
}
@@ -300,7 +304,7 @@ iiop_string_to_object (CORBA_String string,
// nonprintable. This assumes that printable ASCII is the common
// case ... but since stringification is uncommon, no big deal.
- data->profile.object_key.buffer = (u_char *) CORBA_string_copy (string);
+ data->profile.object_key.buffer = (u_char *) CORBA::string_copy (string);
// Strip out whitespace and adjust length accordingly.
@@ -323,8 +327,8 @@ iiop_string_to_object (CORBA_String string,
while ((cp = ACE_OS::strchr ((char *)data->profile.object_key.buffer, '\\')) != 0)
{
- *cp = (CORBA_Char) (hex2byte ((char) cp [1]) << 4);
- *cp |= (CORBA_Char) hex2byte ((char) cp [2]);
+ *cp = (CORBA::Char) (hex2byte ((char) cp [1]) << 4);
+ *cp |= (CORBA::Char) hex2byte ((char) cp [2]);
cp++;
size_t len = ACE_OS::strlen (cp);
@@ -334,7 +338,7 @@ iiop_string_to_object (CORBA_String string,
}
// Return the objref.
- CORBA_Object_ptr obj;
+ CORBA::Object_ptr obj;
(void) data->QueryInterface (IID_CORBA_Object, (void **)&obj);
data->Release ();
@@ -343,13 +347,13 @@ iiop_string_to_object (CORBA_String string,
// Destringify arbitrary objrefs.
-CORBA_Object_ptr
-IIOP_ORB::string_to_object (CORBA_String str,
- CORBA_Environment &env)
+CORBA::Object_ptr
+IIOP_ORB::string_to_object (CORBA::String str,
+ CORBA::Environment &env)
{
env.clear ();
- CORBA_Object_ptr obj = 0;
+ CORBA::Object_ptr obj = 0;
// Use the prefix code to choose which destringify algorithm to use.
if (ACE_OS::strncmp ((char *)str, iiop_prefix, sizeof iiop_prefix - 1) == 0)
@@ -362,7 +366,7 @@ IIOP_ORB::string_to_object (CORBA_String str,
if (obj != 0)
obj->orb (this);
else
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
// Return the object
return obj;
diff --git a/TAO/tao/iioporb.h b/TAO/tao/iioporb.h
index e4ea48acad6..f0cd5a3ac66 100644
--- a/TAO/tao/iioporb.h
+++ b/TAO/tao/iioporb.h
@@ -16,17 +16,17 @@
#if !defined (TAO_IIOPORB_H)
# define TAO_IIOPORB_H
+#if 0
# include "ace/OS.h"
# include "ace/Singleton.h"
# include "orbobj.h"
+#endif
typedef class IIOP_ORB *IIOP_ORB_ptr;
-extern "C" const IID IID_IIOP_ORB;
-
// ORB pseudo-objref
-class ACE_Svc_Export IIOP_ORB : public CORBA_ORB
+class ACE_Svc_Export IIOP_ORB : public CORBA::ORB
// = TITLE
// Bridge implementation of IIOP_ORB
//
@@ -41,12 +41,12 @@ public:
~IIOP_ORB (void);
// destructor
- CORBA_Object_ptr string_to_object (CORBA_String str,
- CORBA_Environment &env);
+ CORBA::Object_ptr string_to_object (CORBA::String str,
+ CORBA::Environment &env);
// Get an object reference from the IOR string
- CORBA_String object_to_string (CORBA_Object_ptr obj,
- CORBA_Environment &env);
+ CORBA::String object_to_string (CORBA::Object_ptr obj,
+ CORBA::Environment &env);
// Convert an object reference to an IOR stringified form
HRESULT __stdcall QueryInterface (REFIID riid,
@@ -54,13 +54,13 @@ public:
// COM stuff - get the underlying IUnknown object based on the riid
// = ACCESSORS
- void use_omg_ior_format (CORBA_Boolean ior);
+ void use_omg_ior_format (CORBA::Boolean ior);
// Set the IOR flag.
- CORBA_Boolean use_omg_ior_format (void);
+ CORBA::Boolean use_omg_ior_format (void);
// Get the IOR flag.
private:
- CORBA_Boolean use_omg_ior_format_;
+ CORBA::Boolean use_omg_ior_format_;
// decides whether to use the URL notation or to use IOR notation
// These are not provided.
@@ -74,8 +74,4 @@ typedef IIOP_ORB *IIOP_ORB_ptr;
typedef ACE_Singleton<IIOP_ORB, ACE_SYNCH_MUTEX>
TAO_ORB;
-# if defined(__ACE_INLINE__)
-# include "iioporb.i"
-# endif
-
#endif /* TAO_IIOPORB_H */
diff --git a/TAO/tao/iioporb.i b/TAO/tao/iioporb.i
index 16bed67867e..587f75805fa 100644
--- a/TAO/tao/iioporb.i
+++ b/TAO/tao/iioporb.i
@@ -2,7 +2,7 @@
ACE_INLINE
IIOP_ORB::IIOP_ORB(void)
- : use_omg_ior_format_(CORBA_B_FALSE)
+ : use_omg_ior_format_(CORBA::B_FALSE)
{}
ACE_INLINE
@@ -11,12 +11,12 @@ IIOP_ORB::~IIOP_ORB(void)
ACE_INLINE void
-IIOP_ORB::use_omg_ior_format (CORBA_Boolean ior)
+IIOP_ORB::use_omg_ior_format (CORBA::Boolean ior)
{
use_omg_ior_format_ = ior;
}
-ACE_INLINE CORBA_Boolean
+ACE_INLINE CORBA::Boolean
IIOP_ORB::use_omg_ior_format (void)
{
return use_omg_ior_format_;
diff --git a/TAO/tao/interp.cpp b/TAO/tao/interp.cpp
index 6dad3f5bd24..dbf08ef94d6 100644
--- a/TAO/tao/interp.cpp
+++ b/TAO/tao/interp.cpp
@@ -66,8 +66,12 @@
// only the data being fed to the interpreter must be protected
// against concurrency.
+#if 0
#include "tao/orb.h"
#include "tao/cdr.h"
+#endif
+
+#include "tao/corba.h"
// Utility routines are used to manipulate CDR-encapsulated TypeCode
// parameter lists, calculating the size and alignment of the data
@@ -76,7 +80,7 @@
typedef size_t attribute_calculator (CDR *stream,
size_t &alignment,
- CORBA_Environment &env);
+ CORBA::Environment &env);
static attribute_calculator calc_struct_attributes;
static attribute_calculator calc_exception_attributes;
@@ -87,18 +91,18 @@ static attribute_calculator calc_array_attributes;
// Other utility routines are used to skip the parameter lists when
// they're not needed.
-typedef CORBA_Boolean param_skip_rtn (CDR *);
+typedef CORBA::Boolean param_skip_rtn (CDR *);
-static CORBA_Boolean
+static CORBA::Boolean
skip_encapsulation (CDR *stream)
{
return stream->skip_string ();
}
-static CORBA_Boolean
+static CORBA::Boolean
skip_long (CDR *stream)
{
- CORBA_ULong scratch;
+ CORBA::ULong scratch;
return stream->get_ulong (scratch);
}
@@ -131,41 +135,41 @@ struct table_element
param_skip_rtn *skipper;
};
-static table_element table [TC_KIND_COUNT] =
+static table_element table [CORBA::TC_KIND_COUNT] =
{
- { 0, 1, 0 }, // tk_null
- { 0, 1, 0 }, // tk_void
+ { 0, 1, 0 }, // CORBA::tk_null
+ { 0, 1, 0 }, // CORBA::tk_void
- { 0, 1, 0, 0 }, // tk_short
- { 0, 1, 0, 0 }, // tk_long
- { 0, 1, 0, 0 }, // tk_ushort
- { 0, 1, 0, 0 }, // tk_ulong
+ { 0, 1, 0, 0 }, // CORBA::tk_short
+ { 0, 1, 0, 0 }, // CORBA::tk_long
+ { 0, 1, 0, 0 }, // CORBA::tk_ushort
+ { 0, 1, 0, 0 }, // CORBA::tk_ulong
- { 0, 1, 0, 0 }, // tk_float
- { 0, 1, 0, 0 }, // tk_double
+ { 0, 1, 0, 0 }, // CORBA::tk_float
+ { 0, 1, 0, 0 }, // CORBA::tk_double
- { 0, 1, 0, 0 }, // tk_boolean
- { 0, 1, 0, 0 }, // tk_char
- { 0, 1, 0, 0 }, // tk_octet
- { 0, 1, 0, 0 }, // tk_any
+ { 0, 1, 0, 0 }, // CORBA::tk_boolean
+ { 0, 1, 0, 0 }, // CORBA::tk_char
+ { 0, 1, 0, 0 }, // CORBA::tk_octet
+ { 0, 1, 0, 0 }, // CORBA::tk_any
- { 0, 1, 0, 0 }, // tk_TypeCode
- { 0, 1, 0, 0 }, // tk_Principal
- { 0, 1, 0, skip_encapsulation }, // tk_objref
+ { 0, 1, 0, 0 }, // CORBA::tk_TypeCode
+ { 0, 1, 0, 0 }, // CORBA::tk_Principal
+ { 0, 1, 0, skip_encapsulation }, // CORBA::tk_objref
- { 0, 1, calc_struct_attributes, 0 }, // tk_struct
- { 0, 1, calc_union_attributes, 0 }, // tk_union
+ { 0, 1, calc_struct_attributes, 0 }, // CORBA::tk_struct
+ { 0, 1, calc_union_attributes, 0 }, // CORBA::tk_union
- { 0, 1, 0, skip_encapsulation }, // tk_enum
- { 0, 1, 0, skip_long }, // tk_string
- { 0, 1, 0, skip_encapsulation }, // tk_sequence
- { 0, 1, calc_array_attributes, 0 }, // tk_array
+ { 0, 1, 0, skip_encapsulation }, // CORBA::tk_enum
+ { 0, 1, 0, skip_long }, // CORBA::tk_string
+ { 0, 1, 0, skip_encapsulation }, // CORBA::tk_sequence
+ { 0, 1, calc_array_attributes, 0 }, // CORBA::tk_array
//
// Two TCKind values added in 94-11-7
//
- { 0, 1, calc_alias_attributes, 0 }, // tk_alias
- { 0, 1, calc_exception_attributes, 0 }, // tk_except
+ { 0, 1, calc_alias_attributes, 0 }, // CORBA::tk_alias
+ { 0, 1, calc_exception_attributes, 0 }, // CORBA::tk_except
//
// Five extended IDL data types, defined in Appendix A of 94-9-32
@@ -173,11 +177,11 @@ static table_element table [TC_KIND_COUNT] =
// represent extensions to CORBA (specifically, to IDL) which are
// not yet standardized.
//
- { 0, 1, 0, 0 }, // tk_longlong
- { 0, 1, 0, 0 }, // tk_ulonglong
- { 0, 1, 0, 0 }, // tk_longdouble
- { 0, 1, 0, 0 }, // tk_wchar
- { 0, 1, 0, skip_long } // tk_wstring
+ { 0, 1, 0, 0 }, // CORBA::tk_longlong
+ { 0, 1, 0, 0 }, // CORBA::tk_ulonglong
+ { 0, 1, 0, 0 }, // CORBA::tk_longdouble
+ { 0, 1, 0, 0 }, // CORBA::tk_wchar
+ { 0, 1, 0, skip_long } // CORBA::tk_wstring
};
// Runtime initialization of the table above; note that this compiles
@@ -204,6 +208,46 @@ static table_element table [TC_KIND_COUNT] =
// make sure that alignment of IDL-defined data types is consistent
// (one byte).
+ enum TCKIND
+ {
+ tk_null = 0,
+ tk_void = 1,
+ tk_short = 2,
+ tk_long = 3,
+ tk_ushort = 4,
+ tk_ulong = 5,
+ tk_float = 6,
+ tk_double = 7,
+ tk_boolean = 8,
+ tk_char = 9,
+ tk_octet = 10,
+ tk_any = 11,
+ tk_TypeCode = 12,
+ tk_Principal = 13,
+ tk_objref = 14,
+ tk_struct = 15,
+ tk_union = 16,
+ tk_enum = 17,
+ tk_string = 18,
+ tk_sequence = 19,
+ tk_array = 20,
+ tk_alias = 21, // 94-11-7
+ tk_except = 22, // 94-11-7
+
+ // these five are OMG-IDL data type extensions
+ tk_longlong = 23, // 94-9-32 Appendix A (+ 2)
+ tk_ulonglong = 24, // 94-9-32 Appendix A (+ 2)
+ tk_longdouble = 25, // 94-9-32 Appendix A (+ 2)
+ tk_wchar = 26, // 94-9-32 Appendix A (+ 2)
+ tk_wstring = 27, // 94-9-32 Appendix A (+ 2)
+
+ // This symbol is not defined by CORBA 2.0. It's used to speed up
+ // dispatch based on TCKind values, and lets many important ones
+ // just be table lookups. It must always be the last enum value!!
+
+ TC_KIND_COUNT
+ };
+
#if defined (unix) || defined (VXWORKS)
// @@ Chris, can you please put this magic number macro in a more
// prominent place (e.g., in a header file somewhere?
@@ -236,38 +280,38 @@ static table_element table [TC_KIND_COUNT] =
void
__TC_init_table (void)
{
- setup_entry (CORBA_Short, tk_short);
- setup_entry (CORBA_Long, tk_long);
- setup_entry (CORBA_UShort, tk_ushort);
- setup_entry (CORBA_ULong, tk_ulong);
+ setup_entry (CORBA::Short, tk_short);
+ setup_entry (CORBA::Long, tk_long);
+ setup_entry (CORBA::UShort, tk_ushort);
+ setup_entry (CORBA::ULong, tk_ulong);
- setup_entry (CORBA_Float, tk_float);
- setup_entry (CORBA_Double, tk_double);
+ setup_entry (CORBA::Float, tk_float);
+ setup_entry (CORBA::Double, tk_double);
- setup_entry (CORBA_Boolean, tk_boolean);
- setup_entry (CORBA_Char, tk_char);
- setup_entry (CORBA_Octet, tk_octet);
- setup_entry (CORBA_Any, tk_any);
+ setup_entry (CORBA::Boolean, tk_boolean);
+ setup_entry (CORBA::Char, tk_char);
+ setup_entry (CORBA::Octet, tk_octet);
+ setup_entry (CORBA::Any, tk_any);
- setup_entry (CORBA_TypeCode_ptr, tk_TypeCode);
- setup_entry (CORBA_Principal_ptr, tk_Principal);
- setup_entry (CORBA_Object_ptr, tk_objref);
+ setup_entry (CORBA::TypeCode_ptr, tk_TypeCode);
+ setup_entry (CORBA::Principal_ptr, tk_Principal);
+ setup_entry (CORBA::Object_ptr, tk_objref);
enum generic_enum {a, b, c, d};
// XXX workaround for G++ 2.6.3 bug
- // setup_entry (generic_enum, tk_enum);
- table [tk_enum].size = sizeof (generic_enum);
- table [tk_enum].alignment = sizeof (generic_enum);
-
- setup_entry (CORBA_String, tk_string);
- setup_entry (CORBA_OctetSeq, tk_sequence);
-
- setup_entry (CORBA_LongLong, tk_longlong);
- setup_entry (CORBA_ULongLong, tk_ulonglong);
- setup_entry (CORBA_LongDouble, tk_longdouble);
- setup_entry (CORBA_WChar, tk_wchar);
- setup_entry (CORBA_WString, tk_wstring);
+ // setup_entry (generic_enum, CORBA::tk_enum);
+ table [CORBA::tk_enum].size = sizeof (generic_enum);
+ table [CORBA::tk_enum].alignment = sizeof (generic_enum);
+
+ setup_entry (CORBA::String, tk_string);
+ setup_entry (CORBA::OctetSeq, tk_sequence);
+
+ setup_entry (CORBA::LongLong, tk_longlong);
+ setup_entry (CORBA::ULongLong, tk_ulonglong);
+ setup_entry (CORBA::LongDouble, tk_longdouble);
+ setup_entry (CORBA::WChar, tk_wchar);
+ setup_entry (CORBA::WString, tk_wstring);
}
#undef setup
@@ -292,24 +336,24 @@ __TC_init_table (void)
// traversal.
static size_t
-calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
+calc_nested_size_and_alignment (CORBA::TypeCode_ptr tc,
CDR *original_stream,
size_t &alignment,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
// Get the "kind" ... if this is an indirection, this is a guess
// which will soon be updated.
- CORBA_ULong temp;
- CORBA_TCKind kind;
+ CORBA::ULong temp;
+ CORBA::TCKind kind;
- if (original_stream->get_ulong (temp) == CORBA_B_FALSE)
+ if (original_stream->get_ulong (temp) == CORBA::B_FALSE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
env.clear ();
- kind = (CORBA_TCKind) temp;
+ kind = (CORBA::TCKind) temp;
// Check for indirection, setting up the right CDR stream to use
// when getting the rest of the parameters. (We rely on the fact
@@ -319,7 +363,7 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
if (kind == ~0)
{
- CORBA_Long offset;
+ CORBA::Long offset;
// Get indirection, sanity check it, set up new stream pointing
// there.
@@ -332,7 +376,7 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
|| offset >= -8
|| ((-offset) & 0x03) != 0)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
// offset -= 4; // correct for get_long update
@@ -350,10 +394,10 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
if (!indirected_stream.get_ulong (temp))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
- kind = (CORBA_TCKind) temp;
+ kind = (CORBA::TCKind) temp;
}
else
@@ -364,10 +408,10 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
// exist freestanding!)
if (kind >= TC_KIND_COUNT
- || kind <= tk_void
- || kind == tk_except)
+ || kind <= CORBA::tk_void
+ || kind == CORBA::tk_except)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -381,9 +425,9 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
assert (table [kind].size == 0);
// Pull encapsulation length out of the stream.
- if (stream->get_ulong (temp) == CORBA_B_FALSE)
+ if (stream->get_ulong (temp) == CORBA::B_FALSE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -413,7 +457,7 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
stream->skip_bytes ((unsigned) temp);
if (stream->next != sub_encapsulation.next)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
return size;
@@ -423,12 +467,12 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
// Reinitialize the TypeCode if requested; this consumes any
// TypeCode parameters in the stream. They only exist for TCKind
// values that have parameters, but which represent fixed-size data
- // types in the binary representation: tk_string, tk_wstring,
- // tk_objref, tk_enum, and tk_sequence.
+ // types in the binary representation: CORBA::tk_string, CORBA::tk_wstring,
+ // CORBA::tk_objref, CORBA::tk_enum, and CORBA::tk_sequence.
if (tc)
{
- CORBA_ULong len;
+ CORBA::ULong len;
tc->_kind = kind;
switch (kind)
@@ -437,22 +481,22 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
assert (table [kind].skipper == 0);
break;
- case tk_string:
- case tk_wstring:
- if (stream->get_ulong (len) == CORBA_B_FALSE)
+ case CORBA::tk_string:
+ case CORBA::tk_wstring:
+ if (stream->get_ulong (len) == CORBA::B_FALSE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
tc->_length = len;
break;
- case tk_enum:
- case tk_objref:
- case tk_sequence:
- if (stream->get_ulong (len) == CORBA_B_FALSE)
+ case CORBA::tk_enum:
+ case CORBA::tk_objref:
+ case CORBA::tk_sequence:
+ if (stream->get_ulong (len) == CORBA::B_FALSE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
tc->_length = len;
@@ -467,9 +511,9 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
// a temporary TypeCode.
}
else if (table [kind].skipper != 0
- && table [kind].skipper (stream) == CORBA_B_FALSE)
+ && table [kind].skipper (stream) == CORBA::B_FALSE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -480,7 +524,7 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
// Given typecode bytes for a structure (or exception), figure out its
// alignment and size; return size, alignment is an 'out' parameter.
-// Only "tk_struct" (or "tk_except") has been taken out of the stream
+// Only "CORBA::tk_struct" (or "CORBA::tk_except") has been taken out of the stream
// parameter holding the bytes.
//
// We use a one-pass algorithm, calculating size and inter-element
@@ -496,10 +540,10 @@ calc_nested_size_and_alignment (CORBA_TypeCode_ptr tc,
static size_t
calc_struct_and_except_attributes (CDR *stream,
size_t &alignment,
- CORBA_Boolean is_exception,
- CORBA_Environment &env)
+ CORBA::Boolean is_exception,
+ CORBA::Environment &env)
{
- CORBA_ULong members;
+ CORBA::ULong members;
size_t size;
// Exceptions are like structs, with key additions (all of which
@@ -514,8 +558,8 @@ calc_struct_and_except_attributes (CDR *stream,
if (is_exception)
{
- size = sizeof (CORBA_Exception);
- alignment = table [tk_TypeCode].alignment;
+ size = sizeof (CORBA::Exception);
+ alignment = table [CORBA::tk_TypeCode].alignment;
}
else
{
@@ -530,7 +574,7 @@ calc_struct_and_except_attributes (CDR *stream,
|| !stream->skip_string ()
|| !stream->get_ulong (members))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -544,7 +588,7 @@ calc_struct_and_except_attributes (CDR *stream,
// Skip name of the member.
if (!stream->skip_string ())
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -582,11 +626,11 @@ calc_struct_and_except_attributes (CDR *stream,
static size_t
calc_struct_attributes (CDR *stream,
size_t &alignment,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
return calc_struct_and_except_attributes (stream,
alignment,
- CORBA_B_FALSE,
+ CORBA::B_FALSE,
env);
}
@@ -595,11 +639,11 @@ calc_struct_attributes (CDR *stream,
static size_t
calc_exception_attributes (CDR *stream,
size_t &alignment,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
return calc_struct_and_except_attributes (stream,
alignment,
- CORBA_B_TRUE,
+ CORBA::B_TRUE,
env);
}
@@ -614,10 +658,10 @@ size_t
calc_key_union_attributes (CDR *stream,
size_t &overall_alignment,
size_t &discrim_size_with_pad,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_ULong members;
- CORBA_ULong temp;
+ CORBA::ULong members;
+ CORBA::ULong temp;
size_t discrim_size;
size_t value_alignment;
size_t value_size;
@@ -630,7 +674,7 @@ calc_key_union_attributes (CDR *stream,
if (!stream->skip_string () // type ID
|| !stream->skip_string ())
{ // typedef name
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -638,7 +682,7 @@ calc_key_union_attributes (CDR *stream,
// of the "struct" representing the union. We detect illegal
// discriminant kinds a bit later.
- CORBA_TypeCode discrim_tc (tk_void);
+ CORBA::TypeCode discrim_tc (CORBA::tk_void);
discrim_size = calc_nested_size_and_alignment (&discrim_tc,
stream,
@@ -652,7 +696,7 @@ calc_key_union_attributes (CDR *stream,
if (!stream->get_ulong (temp) // default used
|| !stream->get_ulong (members))
{ // member count
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -672,49 +716,49 @@ calc_key_union_attributes (CDR *stream,
switch (discrim_tc._kind)
{
- case tk_short:
- case tk_ushort:
- case tk_wchar:
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
+ case CORBA::tk_wchar:
{
- CORBA_Short s;
+ CORBA::Short s;
if (!stream->get_short (s))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
break;
- case tk_long:
- case tk_ulong:
- case tk_enum:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
+ case CORBA::tk_enum:
{
- CORBA_Long l;
+ CORBA::Long l;
if (!stream->get_long (l))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
break;
- case tk_boolean:
- case tk_char:
+ case CORBA::tk_boolean:
+ case CORBA::tk_char:
{
char c;
if (!stream->get_byte (c))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
break;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -722,7 +766,7 @@ calc_key_union_attributes (CDR *stream,
if (!stream->skip_string ())
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -773,7 +817,7 @@ calc_key_union_attributes (CDR *stream,
static size_t
calc_union_attributes (CDR *stream,
size_t &alignment,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
size_t scratch;
@@ -785,14 +829,14 @@ calc_union_attributes (CDR *stream,
static size_t
calc_alias_attributes (CDR *stream,
size_t &alignment,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
// Skip type ID and name in the parameter stream
if (!stream->skip_string () // type ID
|| !stream->skip_string ()) // typedef name
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -808,10 +852,10 @@ calc_alias_attributes (CDR *stream,
static size_t
calc_array_attributes (CDR *stream,
size_t &alignment,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
size_t member_size;
- CORBA_ULong member_count;
+ CORBA::ULong member_count;
// get size and alignment of the array member
@@ -821,10 +865,10 @@ calc_array_attributes (CDR *stream,
// Get and check count of members.
- if (stream->get_ulong (member_count) == CORBA_B_FALSE
+ if (stream->get_ulong (member_count) == CORBA::B_FALSE
|| member_count > UINT_MAX)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -834,29 +878,29 @@ calc_array_attributes (CDR *stream,
// Visit each of the elements of a structure.
-static CORBA_TypeCode::traverse_status
+static CORBA::TypeCode::traverse_status
struct_traverse (CDR *stream,
const void *value1,
const void *value2,
- CORBA_TypeCode::traverse_status (_FAR *visit)
- (CORBA_TypeCode_ptr tc,
+ CORBA::TypeCode::traverse_status (_FAR *visit)
+ (CORBA::TypeCode_ptr tc,
const void *value1,
const void *value2,
void *context,
- CORBA_Environment &env),
+ CORBA::Environment &env),
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
// Skip over the type ID and type name in the parameters, then get
// the number of members.
- CORBA_ULong members;
+ CORBA::ULong members;
if (!stream->skip_string () // type ID
|| !stream->skip_string () // type name
|| !stream->get_ulong (members))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// Visit each member of the structure/exception. The initial
@@ -868,13 +912,13 @@ struct_traverse (CDR *stream,
// subject to compiler's tail call optimization and thus save a
// stack frame.
- CORBA_TypeCode::traverse_status retval;
+ CORBA::TypeCode::traverse_status retval;
- for (retval = CORBA_TypeCode::TRAVERSE_CONTINUE;
- members != 0 && retval == CORBA_TypeCode::TRAVERSE_CONTINUE;
+ for (retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
+ members != 0 && retval == CORBA::TypeCode::TRAVERSE_CONTINUE;
members--)
{
- CORBA_TypeCode member_tc (tk_null);
+ CORBA::TypeCode member_tc (CORBA::tk_null);
size_t size;
size_t alignment;
@@ -882,8 +926,8 @@ struct_traverse (CDR *stream,
if (!stream->skip_string ())
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// Get the member's size, alignment, and a temporary TypeCode,
@@ -898,7 +942,7 @@ struct_traverse (CDR *stream,
alignment,
env);
if (env.exception () != 0)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
// Pad the value pointers to account for the alignment
// requirements of this member, then visit.
@@ -914,7 +958,7 @@ struct_traverse (CDR *stream,
value2 = size + (char *)value2;
if (env.exception () != 0)
- retval = CORBA_TypeCode::TRAVERSE_STOP;
+ retval = CORBA::TypeCode::TRAVERSE_STOP;
}
return retval;
@@ -922,86 +966,86 @@ struct_traverse (CDR *stream,
// cast the discriminant values to the right type and compare them.
-static CORBA_Boolean
-match_value (CORBA_TCKind kind,
+static CORBA::Boolean
+match_value (CORBA::TCKind kind,
CDR *tc_stream,
const void *value,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
- CORBA_Boolean retval = CORBA_B_FALSE;
+ CORBA::Boolean retval = CORBA::B_FALSE;
switch (kind)
{
- case tk_short:
- case tk_ushort:
+ case CORBA::tk_short:
+ case CORBA::tk_ushort:
{
- CORBA_UShort discrim;
+ CORBA::UShort discrim;
- if (tc_stream->get_ushort (discrim) != CORBA_B_FALSE)
- retval = (discrim == *(CORBA_UShort *)value);
+ if (tc_stream->get_ushort (discrim) != CORBA::B_FALSE)
+ retval = (discrim == *(CORBA::UShort *)value);
else
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
}
break;
- case tk_long:
- case tk_ulong:
+ case CORBA::tk_long:
+ case CORBA::tk_ulong:
{
- CORBA_ULong discrim;
+ CORBA::ULong discrim;
- if (tc_stream->get_ulong (discrim) != CORBA_B_FALSE)
- retval = (discrim == *(CORBA_ULong *)value);
+ if (tc_stream->get_ulong (discrim) != CORBA::B_FALSE)
+ retval = (discrim == *(CORBA::ULong *)value);
else
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
}
break;
- case tk_enum:
+ case CORBA::tk_enum:
{
- CORBA_ULong discrim;
+ CORBA::ULong discrim;
- if (tc_stream->get_ulong (discrim) != CORBA_B_FALSE)
+ if (tc_stream->get_ulong (discrim) != CORBA::B_FALSE)
retval = (discrim == *(unsigned *)value);
else
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
}
break;
- case tk_boolean:
+ case CORBA::tk_boolean:
{
- CORBA_Boolean discrim;
+ CORBA::Boolean discrim;
- if (tc_stream->get_boolean (discrim) != CORBA_B_FALSE)
- retval = (discrim == *(CORBA_Boolean *)value);
+ if (tc_stream->get_boolean (discrim) != CORBA::B_FALSE)
+ retval = (discrim == *(CORBA::Boolean *)value);
else
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
}
break;
- case tk_char:
+ case CORBA::tk_char:
{
- CORBA_Char discrim;
+ CORBA::Char discrim;
- if (tc_stream->get_char (discrim) != CORBA_B_FALSE)
- retval = (discrim == *(CORBA_Char *)value);
+ if (tc_stream->get_char (discrim) != CORBA::B_FALSE)
+ retval = (discrim == *(CORBA::Char *)value);
else
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
}
break;
- case tk_wchar:
+ case CORBA::tk_wchar:
{
- CORBA_WChar discrim;
+ CORBA::WChar discrim;
- if (tc_stream->get_wchar (discrim) != CORBA_B_FALSE)
- retval = (discrim == *(CORBA_WChar *)value);
+ if (tc_stream->get_wchar (discrim) != CORBA::B_FALSE)
+ retval = (discrim == *(CORBA::WChar *)value);
else
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
}
break;
default:
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
}
return retval;
@@ -1010,18 +1054,18 @@ match_value (CORBA_TCKind kind,
// Visit the two elements of the union: the discrminant, and then any
// specific value as indicated by the discriminant of value1.
-static CORBA_TypeCode::traverse_status
+static CORBA::TypeCode::traverse_status
union_traverse (CDR *stream,
const void *value1,
const void *value2,
- CORBA_TypeCode::traverse_status (_FAR *visit)
- (CORBA_TypeCode_ptr tc,
+ CORBA::TypeCode::traverse_status (_FAR *visit)
+ (CORBA::TypeCode_ptr tc,
const void *value1,
const void *value2,
void *context,
- CORBA_Environment &env),
+ CORBA::Environment &env),
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
size_t discrim_size_with_pad;
@@ -1044,14 +1088,14 @@ union_traverse (CDR *stream,
env);
}
if (env.exception() != 0)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
// Skip the optional type ID and type name.
if (!stream->skip_string () // type ID, hidden
|| !stream->skip_string ())
{ // typedef name
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// Get and skip the discriminant's TypeCode. This allow for
@@ -1061,7 +1105,7 @@ union_traverse (CDR *stream,
// We know the kind is legal and the TypeCode is valid because this
// repeats work we did earlier -- so checks are omitted.
- CORBA_TypeCode discrim_tc (tk_null);
+ CORBA::TypeCode discrim_tc (CORBA::tk_null);
{
size_t scratch;
@@ -1076,8 +1120,8 @@ union_traverse (CDR *stream,
value1,
value2,
context,
- env) == CORBA_TypeCode::TRAVERSE_STOP)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env) == CORBA::TypeCode::TRAVERSE_STOP)
+ return CORBA::TypeCode::TRAVERSE_STOP;
// Adjust the pointers to point to the other member of the union;
// this ensures alignment for any of the values. Save the pointer
@@ -1092,20 +1136,20 @@ union_traverse (CDR *stream,
// Get the flag that tells if there's a "default" arm in this union,
// then the number of members in the union.
- CORBA_Long default_used = 0;
- CORBA_ULong member_count;
+ CORBA::Long default_used = 0;
+ CORBA::ULong member_count;
if (!stream->get_long (default_used))
{
// default used
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
if (!stream->get_ulong (member_count))
{ // member count
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// Scan to find the tuple whose value matches the discriminator.
@@ -1123,21 +1167,21 @@ union_traverse (CDR *stream,
// TypeCode; this skips the the discriminant value in this CDR
// stream.
- CORBA_Boolean discrim_matched;
+ CORBA::Boolean discrim_matched;
discrim_matched = match_value (discrim_tc._kind,
stream,
discrim_ptr,
env);
if (env.exception () != 0)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
// Skip the name of the member; we never care about it.
if (!stream->skip_string ())
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return CORBA_TypeCode::TRAVERSE_STOP;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return CORBA::TypeCode::TRAVERSE_STOP;
}
// If this is the default member, remember where its typecode
@@ -1154,12 +1198,12 @@ union_traverse (CDR *stream,
// XXX we really don't care about size and alignment this time,
// only that we initialize the TypeCode.
- CORBA_TypeCode tc (tk_null);
+ CORBA::TypeCode tc (CORBA::tk_null);
size_t scratch;
(void) calc_nested_size_and_alignment (&tc, stream, scratch, env);
if (env.exception () != 0)
- return CORBA_TypeCode::TRAVERSE_STOP;
+ return CORBA::TypeCode::TRAVERSE_STOP;
// If we matched, visit the member and return.
if (discrim_matched)
@@ -1173,7 +1217,7 @@ union_traverse (CDR *stream,
{
CDR temp_str;
size_t scratch;
- CORBA_TypeCode tc (tk_null);
+ CORBA::TypeCode tc (CORBA::tk_null);
temp_str.next = default_tc_ptr;
temp_str.remaining = default_tc_len;
@@ -1187,7 +1231,7 @@ union_traverse (CDR *stream,
(void) calc_nested_size_and_alignment (&tc, &temp_str, scratch, env);
return visit (&tc, value1, value2, context, env);
}
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// For each node in "data", visit it. For singleton nodes that's all
@@ -1199,17 +1243,17 @@ union_traverse (CDR *stream,
// that just traversing a data value allocates any memory, that's a
// bug to fix!
-CORBA_TypeCode::traverse_status
-CORBA_TypeCode::traverse (const void *value1,
+CORBA::TypeCode::traverse_status
+CORBA::TypeCode::traverse (const void *value1,
const void *value2,
- CORBA_TypeCode::traverse_status (_FAR *visit)
- (CORBA_TypeCode_ptr tc,
+ CORBA::TypeCode::traverse_status (_FAR *visit)
+ (CORBA::TypeCode_ptr tc,
const void *value1,
const void *value2,
void *context,
- CORBA_Environment &env),
+ CORBA::Environment &env),
void *context,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
env.clear ();
@@ -1225,8 +1269,8 @@ CORBA_TypeCode::traverse (const void *value1,
// again. Luckily, changing protocol constants is quite rare; they
// normally just get added to (at the end).
//
- if (_kind <= tk_objref
- || (tk_longlong <= _kind && _kind <= tk_wstring))
+ if (_kind <= CORBA::tk_objref
+ || (CORBA::tk_longlong <= _kind && _kind <= CORBA::tk_wstring))
return visit (this, value1, value2, context, env);
// Handle the cases that aren't in convenient numeric ranges.
@@ -1235,17 +1279,17 @@ CORBA_TypeCode::traverse (const void *value1,
switch (_kind)
{
- case tk_string:
- case tk_enum:
+ case CORBA::tk_string:
+ case CORBA::tk_enum:
return visit (this, value1, value2, context, env);
// Typedefs just add a delay, while we skip the typedef ID
// and name ...
- case tk_alias:
+ case CORBA::tk_alias:
{
- CORBA_TypeCode_ptr tcp;
- CORBA_Environment env2;
+ CORBA::TypeCode_ptr tcp;
+ CORBA::Environment env2;
// XXX rework for efficiency, this doesn't need to allocate
// memory during the traversal!
@@ -1274,12 +1318,12 @@ CORBA_TypeCode::traverse (const void *value1,
// standards to exist for C++ exceptions yet. Compiler-specific
// code will need to handle examining, unmarshaling, and throwing
// of CORBA exceptions (in C++ environments) for some time.
- case tk_except:
- value1 = sizeof (CORBA_Exception) + (char *) value1;
- value2 = sizeof (CORBA_Exception) + (char *) value2;
+ case CORBA::tk_except:
+ value1 = sizeof (CORBA::Exception) + (char *) value1;
+ value2 = sizeof (CORBA::Exception) + (char *) value2;
// FALLTHROUGH
- case tk_struct:
+ case CORBA::tk_struct:
// XXX for OLE Automation, we'll probably need BOTH exceptions
// and structs to inherit IUnknown, hence we'll need to be
// skipping the vtable pointer ...
@@ -1295,7 +1339,7 @@ CORBA_TypeCode::traverse (const void *value1,
visit, context, env);
}
- case tk_union:
+ case CORBA::tk_union:
{
// visit the discriminant, then search the typecode for the
// relevant union member and then visit that member.
@@ -1312,28 +1356,28 @@ CORBA_TypeCode::traverse (const void *value1,
// C-style: the leftmost dimension in the IDL definition is
// "outermost", etc.
{
- CORBA_TypeCode_ptr tc2;
+ CORBA::TypeCode_ptr tc2;
size_t size;
- CORBA_ULong bounds;
- CORBA_OctetSeq *seq;
+ CORBA::ULong bounds;
+ CORBA::OctetSeq *seq;
- case tk_sequence:
+ case CORBA::tk_sequence:
// Find out how many elements there are, and adjust the data
// pointers to point to those elements rather than to the
// sequence itself.
- seq = (CORBA_OctetSeq *)value1;
+ seq = (CORBA::OctetSeq *)value1;
bounds = seq->length;
value1 = seq->buffer;
if (value2)
{
- seq = (CORBA_OctetSeq *)value2;
+ seq = (CORBA::OctetSeq *)value2;
value2 = seq->buffer;
}
goto shared_seq_array_code;
- case tk_array:
+ case CORBA::tk_array:
// Array bounds are in the typecode itself.
bounds = ulong_param (1, env);
if (env.exception () != 0)
@@ -1362,7 +1406,7 @@ CORBA_TypeCode::traverse (const void *value1,
value1 = size + (char *) value1;
value2 = size + (char *) value2;
}
- CORBA_release (tc2);
+ CORBA::release (tc2);
env.clear ();
}
return TRAVERSE_CONTINUE;
@@ -1372,7 +1416,7 @@ CORBA_TypeCode::traverse (const void *value1,
break;
} // end switch on typecode "kind"
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return TRAVERSE_STOP;
}
@@ -1380,18 +1424,18 @@ CORBA_TypeCode::traverse (const void *value1,
// this typecode ... typically used to allocate memory.
size_t
-CORBA_TypeCode::private_size (CORBA_Environment &env)
+CORBA::TypeCode::private_size (CORBA::Environment &env)
{
if (_kind >= TC_KIND_COUNT)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
env.clear ();
if (table [_kind].calc == 0)
{
- _private_state->tc_size_known_ = CORBA_B_TRUE;
+ _private_state->tc_size_known_ = CORBA::B_TRUE;
_private_state->tc_size_ = table [_kind].size;
return _private_state->tc_size_;
}
@@ -1401,7 +1445,7 @@ CORBA_TypeCode::private_size (CORBA_Environment &env)
stream.setup_encapsulation (_buffer, (size_t) _length);
- _private_state->tc_size_known_ = CORBA_B_TRUE;
+ _private_state->tc_size_known_ = CORBA::B_TRUE;
_private_state->tc_size_ = table [_kind].calc (&stream, alignment, env);
return _private_state->tc_size_;
}
@@ -1411,18 +1455,18 @@ CORBA_TypeCode::private_size (CORBA_Environment &env)
// completeness.
size_t
-CORBA_TypeCode::private_alignment (CORBA_Environment &env)
+CORBA::TypeCode::private_alignment (CORBA::Environment &env)
{
if (_kind >= TC_KIND_COUNT)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
env.clear ();
if (table [_kind].calc == 0)
{
- _private_state->tc_alignment_known_ = CORBA_B_TRUE;
+ _private_state->tc_alignment_known_ = CORBA::B_TRUE;
_private_state->tc_alignment_ = table [_kind].alignment;
return _private_state->tc_alignment_;
}
@@ -1433,7 +1477,7 @@ CORBA_TypeCode::private_alignment (CORBA_Environment &env)
stream.setup_encapsulation (_buffer, (size_t) _length);
(void) table [_kind].calc (&stream, alignment, env);
- _private_state->tc_alignment_known_ = CORBA_B_TRUE;
+ _private_state->tc_alignment_known_ = CORBA::B_TRUE;
_private_state->tc_alignment_ = alignment;
return alignment;
}
diff --git a/TAO/tao/invoke.cpp b/TAO/tao/invoke.cpp
index 7806dfface9..6510e3a7dfa 100644
--- a/TAO/tao/invoke.cpp
+++ b/TAO/tao/invoke.cpp
@@ -28,11 +28,15 @@
// generate better code, which in some cases may be very hard to
// unwind.
+#if 0
#include "tao/orb.h"
#include "tao/cdr.h"
#include "tao/giop.h"
#include "tao/nvlist.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
class ACE_Synchronous_Cancellation_Required
// = TITLE
@@ -79,7 +83,7 @@ private:
// patent application is pending.
void
-IIOP_Object::do_call (CORBA_Environment &env, // exception reporting
+IIOP_Object::do_call (CORBA::Environment &env, // exception reporting
const TAO_Call_Data *info, // call description
...) // ... any parameters
@@ -159,10 +163,10 @@ IIOP_Object::do_call (CORBA_Environment &env, // exception reporting
// ones.
GIOP::ReplyStatusType status;
- CORBA_ExceptionList exceptions;
+ CORBA::ExceptionList exceptions;
exceptions.length = exceptions.maximum = info->except_count;
- exceptions.buffer = (CORBA_TypeCode_ptr *) info->excepts;
+ exceptions.buffer = (CORBA::TypeCode_ptr *) info->excepts;
status = call.invoke (exceptions, env);
@@ -208,7 +212,7 @@ IIOP_Object::do_call (CORBA_Environment &env, // exception reporting
else
{
// assert (value_size == tc->size());
- *(void **)ptr = new CORBA_Octet [pdp->value_size];
+ *(void **)ptr = new CORBA::Octet [pdp->value_size];
call.get_value (pdp->tc, *(void **)ptr, env);
}
@@ -236,12 +240,12 @@ IIOP_Object::do_call (CORBA_Environment &env, // exception reporting
void
IIOP_Object::do_dynamic_call (const char *opname, // operation name
- CORBA_Boolean is_roundtrip, // results required?
- CORBA_NVList_ptr args, // parameters
- CORBA_NamedValue_ptr result, // result
- CORBA_Flags flags, // per-call flag (one!)
- CORBA_ExceptionList &exceptions, // possible user exceptions
- CORBA_Environment &env) // exception reporting
+ CORBA::Boolean is_roundtrip, // results required?
+ CORBA::NVList_ptr args, // parameters
+ CORBA::NamedValue_ptr result, // result
+ CORBA::Flags flags, // per-call flag (one!)
+ CORBA::ExceptionList &exceptions, // possible user exceptions
+ CORBA::Environment &env) // exception reporting
{
ACE_Synchronous_Cancellation_Required NOT_USED;
@@ -268,13 +272,13 @@ IIOP_Object::do_dynamic_call (const char *opname, // operation name
for (i = 0; i < args->count (); i++)
{
- CORBA_NamedValue_ptr value = args->item (i);
+ CORBA::NamedValue_ptr value = args->item (i);
- if (value->flags () == CORBA_ARG_IN
- || value->flags () == CORBA_ARG_INOUT)
+ if (value->flags () == CORBA::ARG_IN
+ || value->flags () == CORBA::ARG_INOUT)
{
call.put_param (value->value ()->type (),
- value->value ()->value (), env);
+ (void *) value->value ()->value (), env);
if (env.exception ())
{
dexc (env, "do_dynamic_call, put request parameter");
@@ -311,9 +315,9 @@ IIOP_Object::do_dynamic_call (const char *opname, // operation name
// If caller didn't set OUT_LIST_MEMORY flag, allocate
// memory for return value ...
- if (!(flags & CORBA_OUT_LIST_MEMORY))
+ if (!(flags & CORBA::OUT_LIST_MEMORY))
{
- CORBA_TypeCode_ptr tcp;
+ CORBA::TypeCode_ptr tcp;
size_t size;
tcp = result->value ()->type ();
@@ -322,31 +326,31 @@ IIOP_Object::do_dynamic_call (const char *opname, // operation name
if (size != 0)
{
- void *ptr = new CORBA_Octet [size];
+ void *ptr = new CORBA::Octet [size];
tcp->AddRef ();
result->value ()->replace (tcp, ptr,
- CORBA_B_TRUE, env);
+ CORBA::B_TRUE, env);
dexc (env, "do_dynamic_call, set result mem");
}
}
call.get_value (result->value ()->type (),
- result->value ()->value (), env);
+ (void *) result->value ()->value (), env);
}
for (i = 0; i < args->count (); i++)
{
- CORBA_NamedValue_ptr value = args->item (i);
+ CORBA::NamedValue_ptr value = args->item (i);
- if (value->flags () == CORBA_ARG_OUT
- || value->flags () == CORBA_ARG_INOUT)
+ if (value->flags () == CORBA::ARG_OUT
+ || value->flags () == CORBA::ARG_INOUT)
{
// If caller didn't set OUT_LIST_MEMORY flag, allocate
// memory for this parameter ...
- if (!(flags & CORBA_OUT_LIST_MEMORY))
+ if (!(flags & CORBA::OUT_LIST_MEMORY))
{
- CORBA_TypeCode_ptr tcp;
+ CORBA::TypeCode_ptr tcp;
size_t size;
tcp = value->value ()->type ();
@@ -355,17 +359,17 @@ IIOP_Object::do_dynamic_call (const char *opname, // operation name
if (size != 0)
{
- void *ptr = new CORBA_Octet [size];
+ void *ptr = new CORBA::Octet [size];
tcp->AddRef ();
value->value ()->replace (tcp, ptr,
- CORBA_B_TRUE, env);
+ CORBA::B_TRUE, env);
dexc (env, "do_dynamic_call, set result mem");
}
}
call.get_value (value->value ()->type (),
- value->value ()->value (), env);
+ (void *) value->value ()->value (), env);
if (env.exception ())
{
dexc (env, "do_dynamic_call, get response parameter");
diff --git a/TAO/tao/marshal.cpp b/TAO/tao/marshal.cpp
index f07aba281f6..01a04ba6823 100644
--- a/TAO/tao/marshal.cpp
+++ b/TAO/tao/marshal.cpp
@@ -19,17 +19,21 @@
//
// ============================================================================
+#if 0
#include "tao/orb.h"
#include "tao/align.h"
#include "tao/cdr.h"
+#endif
+
+#include "tao/corba.h"
#if defined (HAVE_WIDEC_H)
# include <widec.h>
#else
extern "C"
{
- u_int wslen (const CORBA_WChar *);
- CORBA_WChar *wscpy (CORBA_WChar *, const CORBA_WChar *);
+ u_int wslen (const CORBA::WChar *);
+ CORBA::WChar *wscpy (CORBA::WChar *, const CORBA::WChar *);
}
#endif /* HAVE_WIDEC_H */
@@ -60,34 +64,34 @@ TAO_Marshal_Factory::TAO_Marshal_Factory (void)
#endif /* 0 */
{
// initialize the mobj table
- mobj_table_[tk_null].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_void].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_short].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_long].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_ushort].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_ulong].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_float].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_double].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_boolean].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_char].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_octet].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_any].obj_ = TAO_MARSHAL_ANY::instance ();
- mobj_table_[tk_TypeCode].obj_ = TAO_MARSHAL_TYPECODE::instance ();
- mobj_table_[tk_Principal].obj_ = TAO_MARSHAL_PRINCIPAL::instance ();
- mobj_table_[tk_objref].obj_ = TAO_MARSHAL_OBJREF::instance ();
- mobj_table_[tk_struct].obj_ = TAO_MARSHAL_STRUCT::instance ();
- mobj_table_[tk_union].obj_ = TAO_MARSHAL_UNION::instance ();
- mobj_table_[tk_enum].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_string].obj_ = TAO_MARSHAL_STRING::instance ();
- mobj_table_[tk_sequence].obj_ = TAO_MARSHAL_SEQUENCE::instance ();
- mobj_table_[tk_array].obj_ = TAO_MARSHAL_ARRAY::instance ();
- mobj_table_[tk_alias].obj_ = TAO_MARSHAL_ALIAS::instance ();
- mobj_table_[tk_except].obj_ = TAO_MARSHAL_EXCEPT::instance ();
- mobj_table_[tk_longlong].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_ulonglong].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_longdouble].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_wchar].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
- mobj_table_[tk_wstring].obj_ = TAO_MARSHAL_WSTRING::instance ();
+ mobj_table_[CORBA::tk_null].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_void].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_short].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_long].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_ushort].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_ulong].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_float].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_double].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_boolean].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_char].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_octet].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_any].obj_ = TAO_MARSHAL_ANY::instance ();
+ mobj_table_[CORBA::tk_TypeCode].obj_ = TAO_MARSHAL_TYPECODE::instance ();
+ mobj_table_[CORBA::tk_Principal].obj_ = TAO_MARSHAL_PRINCIPAL::instance ();
+ mobj_table_[CORBA::tk_objref].obj_ = TAO_MARSHAL_OBJREF::instance ();
+ mobj_table_[CORBA::tk_struct].obj_ = TAO_MARSHAL_STRUCT::instance ();
+ mobj_table_[CORBA::tk_union].obj_ = TAO_MARSHAL_UNION::instance ();
+ mobj_table_[CORBA::tk_enum].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_string].obj_ = TAO_MARSHAL_STRING::instance ();
+ mobj_table_[CORBA::tk_sequence].obj_ = TAO_MARSHAL_SEQUENCE::instance ();
+ mobj_table_[CORBA::tk_array].obj_ = TAO_MARSHAL_ARRAY::instance ();
+ mobj_table_[CORBA::tk_alias].obj_ = TAO_MARSHAL_ALIAS::instance ();
+ mobj_table_[CORBA::tk_except].obj_ = TAO_MARSHAL_EXCEPT::instance ();
+ mobj_table_[CORBA::tk_longlong].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_ulonglong].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_longdouble].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_wchar].obj_ = TAO_MARSHAL_PRIMITIVE::instance ();
+ mobj_table_[CORBA::tk_wstring].obj_ = TAO_MARSHAL_WSTRING::instance ();
}
TAO_Marshal_Factory::~TAO_Marshal_Factory (void)
@@ -98,64 +102,64 @@ TAO_Marshal_Factory::~TAO_Marshal_Factory (void)
// factory method
//
// 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)
+TAO_Marshal_Object* TAO_Marshal_Factory::make_marshal_object (CORBA::TypeCode_ptr tc,
+ CORBA::Environment &env)
{
env.clear ();
if (tc)
{
switch (tc->_kind)
{
- case tk_null:
- case tk_void:
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_enum:
- case tk_double:
- case tk_longlong:
- case tk_ulonglong:
- case tk_boolean:
- case tk_char:
- case tk_octet:
- case tk_longdouble:
- case tk_wchar:
+ 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 tk_any:
+ case CORBA::tk_any:
return m_any_;
- case tk_TypeCode:
+ case CORBA::tk_TypeCode:
return m_typecode_;
- case tk_Principal:
+ case CORBA::tk_Principal:
return m_principal_;
- case tk_objref:
+ case CORBA::tk_objref:
return m_objref_;
- case tk_struct:
+ case CORBA::tk_struct:
return m_struct_;
- case tk_union:
+ case CORBA::tk_union:
return m_union_;
- case tk_string:
+ case CORBA::tk_string:
return m_string_;
- case tk_sequence:
+ case CORBA::tk_sequence:
return m_sequence_;
- case tk_array:
+ case CORBA::tk_array:
return m_array_;
- case tk_alias:
+ case CORBA::tk_alias:
return m_alias_;
- case tk_except:
+ case CORBA::tk_except:
return m_except_;
- case tk_wstring:
+ case CORBA::tk_wstring:
return m_wstring_;
default:
// anything else is an error
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return (TAO_Marshal_Object *)0;
}
}
else
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return (TAO_Marshal_Object *)0;
}
}
diff --git a/TAO/tao/marshal.h b/TAO/tao/marshal.h
index 045019bc6f8..8dc68962a6d 100644
--- a/TAO/tao/marshal.h
+++ b/TAO/tao/marshal.h
@@ -19,25 +19,27 @@
#if !defined (TAO_MARSHAL_H)
#define TAO_MARSHAL_H
+#if 0
#include "ace/OS.h"
#include "ace/Synch.h"
#include "ace/Singleton.h"
#include "tao/typecode.h"
-#include "tao/object.h" // CORBA_Object::_duplicate() needed by inline method
+#include "tao/object.h" // CORBA::Object::_duplicate() needed by inline method
#include "tao/principa.h"
+#endif /* 0 */
-CORBA_TypeCode::traverse_status
-DEEP_COPY (CORBA_TypeCode_ptr param,
+CORBA::TypeCode::traverse_status
+DEEP_COPY (CORBA::TypeCode_ptr param,
const void *source,
const void *dest,
- CORBA_Environment &env);
+ CORBA::Environment &env);
-CORBA_TypeCode::traverse_status
-DEEP_FREE (CORBA_TypeCode_ptr param,
+CORBA::TypeCode::traverse_status
+DEEP_FREE (CORBA::TypeCode_ptr param,
const void *source,
const void *dest,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// = Forward declarations.
class TAO_Marshal_Object;
@@ -68,8 +70,8 @@ public:
virtual ~TAO_Marshal_Factory (void);
// destructor
- virtual TAO_Marshal_Object *make_marshal_object (CORBA_TypeCode_ptr tc,
- CORBA_Environment &env);
+ virtual TAO_Marshal_Object *make_marshal_object (CORBA::TypeCode_ptr tc,
+ CORBA::Environment &env);
// Factory method that returns the appropriate marshal object.
private:
@@ -78,9 +80,8 @@ private:
TAO_Marshal_Object *obj_;
};
- TAO_Marshal_Object_Entry mobj_table_[TC_KIND_COUNT];
- // A table of specialized marshal objects indexed by the _kind
- // field.
+ TAO_Marshal_Object_Entry mobj_table_[CORBA::TC_KIND_COUNT];
+ // A table of specialized marshal objects indexed by the _kind field
#if 0
// define data members that are instances of various Marshal_Object classes
@@ -125,21 +126,19 @@ class TAO_Marshal_Object
// Provides a set of virtual methods for encoding, decoding,
// deep_copying, and deep_freeing.
public:
- // = Encoding and decoding operations.
-
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env) = 0;
- // Encoding operation.
+ CORBA::Environment &env) = 0;
+ // encoding operation
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env) = 0;
- // Decoding operation.
+ CORBA::Environment &env) = 0;
+ // decoding operation
TAO_Marshal_Object (void);
// constructor
@@ -158,24 +157,24 @@ public:
virtual ~TAO_Marshal_Primitive (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -191,24 +190,24 @@ public:
virtual ~TAO_Marshal_Any (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *source,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -224,24 +223,24 @@ public:
virtual ~TAO_Marshal_TypeCode (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -257,24 +256,24 @@ public:
virtual ~TAO_Marshal_Principal (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -290,24 +289,24 @@ public:
virtual ~TAO_Marshal_ObjRef (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -323,24 +322,24 @@ public:
virtual ~TAO_Marshal_Struct (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -356,24 +355,24 @@ public:
virtual ~TAO_Marshal_Union (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -389,24 +388,24 @@ public:
virtual ~TAO_Marshal_String (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -422,24 +421,24 @@ public:
virtual ~TAO_Marshal_Sequence (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -455,24 +454,24 @@ public:
virtual ~TAO_Marshal_Array (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -488,24 +487,24 @@ public:
virtual ~TAO_Marshal_Alias (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -520,24 +519,24 @@ public:
TAO_Marshal_Except (void);
~TAO_Marshal_Except (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -552,24 +551,24 @@ public:
TAO_Marshal_WString (void);
~TAO_Marshal_WString (void);
- virtual CORBA_TypeCode::traverse_status encode (CORBA_TypeCode_ptr tc,
+ virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
void *context,
- CORBA_Environment &env);
- virtual CORBA_TypeCode::traverse_status decode (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ virtual CORBA::TypeCode::traverse_status decode (CORBA::TypeCode_ptr tc,
const void *data,
const void *parent_typecode,
void *context,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc,
const void *source,
const void *dest,
- CORBA_Environment &env);
- static CORBA_TypeCode::traverse_status deep_free (CORBA_TypeCode_ptr tc,
+ CORBA::Environment &env);
+ static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc,
const void *data,
const void *,
- CORBA_Environment &env);
+ CORBA::Environment &env);
};
// Create a type for the singleton
@@ -589,7 +588,7 @@ typedef ACE_Singleton<TAO_Marshal_WString, ACE_SYNCH_MUTEX>
# define ACE_INLINE inline
# define do_undef_on_ACE_INLINE
# endif /* __ACE_INLINE__ */
-# include "marshal.i"
+//# include "marshal.i"
# if defined (do_undef_on_ACE_INLINE)
# undef do_undef_on_ACE_INLINE
# undef ACE_INLINE
diff --git a/TAO/tao/marshal.i b/TAO/tao/marshal.i
index 6f9c60dab05..869240891a7 100644
--- a/TAO/tao/marshal.i
+++ b/TAO/tao/marshal.i
@@ -142,14 +142,14 @@ TAO_Marshal_WString::~TAO_Marshal_WString (void)
//
// Based on the kind of the typecode, return the appropriate marshal object
ACE_INLINE TAO_Marshal_Object *
-TAO_Marshal_Factory::make_marshal_object (CORBA_TypeCode_ptr tc,
- CORBA_Environment &env)
+TAO_Marshal_Factory::make_marshal_object (CORBA::TypeCode_ptr tc,
+ CORBA::Environment &env)
{
- if (tc && tc->_kind >= 0 && tc->_kind < TC_KIND_COUNT)
+ if (tc && tc->_kind >= 0 && tc->_kind < CORBA::TC_KIND_COUNT)
return this->mobj_table_[tc->_kind].obj_;
else
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
@@ -157,132 +157,132 @@ TAO_Marshal_Factory::make_marshal_object (CORBA_TypeCode_ptr tc,
// the deep_copy methods
// deep_copy for any
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_Any::deep_copy (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_Any::deep_copy (CORBA::TypeCode_ptr,
const void *source,
const void *dest,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- (void) new (dest) CORBA_Any (*(CORBA_Any *) source);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ (void) new (dest) CORBA::Any (*(CORBA::Any *) source);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for TypeCode
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_TypeCode::deep_copy (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_TypeCode::deep_copy (CORBA::TypeCode_ptr,
const void *source,
const void *dest,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- if ((*(CORBA_TypeCode_ptr *) source) != 0)
+ if ((*(CORBA::TypeCode_ptr *) source) != 0)
dest = source;
else
- dest = _tc_CORBA_Null;
+ dest = CORBA::_tc_null;
- ((CORBA_TypeCode_ptr) dest)->AddRef ();
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ ((CORBA::TypeCode_ptr) dest)->AddRef ();
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for ObjRef
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_ObjRef::deep_copy (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_ObjRef::deep_copy (CORBA::TypeCode_ptr,
const void *source,
const void *dest,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- *(CORBA_Object_ptr *) dest = CORBA_Object::_duplicate (*(CORBA_Object_ptr *)
+ *(CORBA::Object_ptr *) dest = CORBA::Object::_duplicate (*(CORBA::Object_ptr *)
source);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for string
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_String::deep_copy (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_String::deep_copy (CORBA::TypeCode_ptr,
const void *source,
const void *dest,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- *(CORBA_String *) dest = CORBA_string_copy (*(CORBA_String *) source);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ *(CORBA::String *) dest = CORBA::string_copy (*(CORBA::String *) source);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for wstring
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_WString::deep_copy (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_WString::deep_copy (CORBA::TypeCode_ptr,
const void *source,
const void *dest,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- *(CORBA_WString *) dest = CORBA_wstring_copy (*(CORBA_WString *) source);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ *(CORBA::WString *) dest = CORBA::wstring_copy (*(CORBA::WString *) source);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// *************** deep_free methods ******************
// deep_free for Any
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_Any::deep_free (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_Any::deep_free (CORBA::TypeCode_ptr,
const void *source,
const void *,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- ((CORBA_Any *) source)->~CORBA_Any ();
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ ((CORBA::Any *) source)->~CORBA_Any ();
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for TypeCode
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_TypeCode::deep_free (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_TypeCode::deep_free (CORBA::TypeCode_ptr,
const void *source,
const void *,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- if ((*(CORBA_TypeCode_ptr *) source) != 0)
- (*(CORBA_TypeCode_ptr *) source)->Release ();
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ if ((*(CORBA::TypeCode_ptr *) source) != 0)
+ (*(CORBA::TypeCode_ptr *) source)->Release ();
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for Principal
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_Principal::deep_free (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_Principal::deep_free (CORBA::TypeCode_ptr,
const void *value,
const void *,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- CORBA_release (*(CORBA_Principal_ptr *) value);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::release (*(CORBA::Principal_ptr *) value);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for ObjRef
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_ObjRef::deep_free (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_ObjRef::deep_free (CORBA::TypeCode_ptr,
const void *source,
const void *,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- CORBA_release (*(CORBA_Object_ptr *) source);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::release (*(CORBA::Object_ptr *) source);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for string
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_String::deep_free (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_String::deep_free (CORBA::TypeCode_ptr,
const void *source,
const void *,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- CORBA_string_free (*(CORBA_String *) source);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::string_free (*(CORBA::String *) source);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for wstring
-ACE_INLINE CORBA_TypeCode::traverse_status
-TAO_Marshal_WString::deep_free (CORBA_TypeCode_ptr,
+ACE_INLINE CORBA::TypeCode::traverse_status
+TAO_Marshal_WString::deep_free (CORBA::TypeCode_ptr,
const void *source,
const void *,
- CORBA_Environment &)
+ CORBA::Environment &)
{
- CORBA_wstring_free (*(CORBA_WString *) source);
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
+ CORBA::wstring_free (*(CORBA::WString *) source);
+ return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
diff --git a/TAO/tao/nvlist.cpp b/TAO/tao/nvlist.cpp
index 7c93672a022..99d279fdf87 100644
--- a/TAO/tao/nvlist.cpp
+++ b/TAO/tao/nvlist.cpp
@@ -6,6 +6,7 @@
//
// Implementation of Named Value List
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -16,6 +17,9 @@
#include "tao/any.h"
#include "tao/except.h"
#include "tao/nvlist.h"
+#endif
+
+#include "tao/corba.h"
// COM's IUnknown support
@@ -66,22 +70,22 @@ CORBA_NamedValue::QueryInterface (REFIID riid,
// Reference counting for DII Request object
void
-CORBA_release (CORBA_NamedValue_ptr nv)
+CORBA::release (CORBA::NamedValue_ptr nv)
{
if (nv)
nv->Release ();
}
-CORBA_Boolean
-CORBA_is_nil (CORBA_NamedValue_ptr nv)
+CORBA::Boolean
+CORBA::is_nil (CORBA::NamedValue_ptr nv)
{
- return (CORBA_Boolean) nv == 0;
+ return (CORBA::Boolean) nv == 0;
}
CORBA_NamedValue::~CORBA_NamedValue (void)
{
if (_name)
- CORBA_string_free ((CORBA_String) _name);
+ CORBA::string_free ((CORBA::String) _name);
}
// COM's IUnknown support
@@ -133,16 +137,16 @@ CORBA_NVList::QueryInterface (REFIID riid,
// Reference counting for DII Request object
void
-CORBA_release (CORBA_NVList_ptr nvl)
+CORBA::release (CORBA::NVList_ptr nvl)
{
if (nvl)
nvl->Release ();
}
-CORBA_Boolean
-CORBA_is_nil (CORBA_NVList_ptr nvl)
+CORBA::Boolean
+CORBA::is_nil (CORBA::NVList_ptr nvl)
{
- return (CORBA_Boolean) nvl == 0;
+ return (CORBA::Boolean) nvl == 0;
}
CORBA_NVList::~CORBA_NVList (void)
@@ -156,17 +160,17 @@ CORBA_NVList::~CORBA_NVList (void)
_len = _max = 0;
}
-CORBA_NamedValue_ptr
-CORBA_NVList::add_value (const CORBA_Char *name,
- const CORBA_Any &value,
- CORBA_Flags flags,
- CORBA_Environment &env)
+CORBA::NamedValue_ptr
+CORBA_NVList::add_value (const CORBA::Char *name,
+ const CORBA::Any &value,
+ CORBA::Flags flags,
+ CORBA::Environment &env)
{
env.clear ();
- if (ACE_BIT_DISABLED (flags, CORBA_ARG_IN | CORBA_ARG_OUT | CORBA_ARG_INOUT))
+ if (ACE_BIT_DISABLED (flags, CORBA::ARG_IN | CORBA::ARG_OUT | CORBA::ARG_INOUT))
{
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
@@ -182,14 +186,14 @@ CORBA_NVList::add_value (const CORBA_Char *name,
if (_values == 0)
{
- _values = (CORBA_NamedValue_ptr)
- calloc (_len, sizeof (CORBA_NamedValue));
+ _values = (CORBA::NamedValue_ptr)
+ calloc (_len, sizeof (CORBA::NamedValue));
_max = _len;
}
else if (len >= _max)
{
- _values = (CORBA_NamedValue_ptr) ACE_OS::realloc ((char *)_values,
- sizeof (CORBA_NamedValue) * _len);
+ _values = (CORBA::NamedValue_ptr) ACE_OS::realloc ((char *)_values,
+ sizeof (CORBA::NamedValue) * _len);
(void) ACE_OS::memset (&_values[_max], 0,
sizeof (_values[_max]) * (_len - _max));
_max = _len;
@@ -197,16 +201,16 @@ CORBA_NVList::add_value (const CORBA_Char *name,
assert (_values != 0);
_values[len]._flags = flags;
- _values[len]._name = CORBA_string_copy (name);
+ _values[len]._name = CORBA::string_copy (name);
- if (ACE_BIT_ENABLED (flags, CORBA_IN_COPY_VALUE))
+ if (ACE_BIT_ENABLED (flags, CORBA::IN_COPY_VALUE))
// IN_COPY_VALUE means that the parameter is not "borrowed" by
// the ORB, but rather that the ORB copies its value.
//
// Initialize the newly allocated memory using a copy
// constructor that places the new "Any" value at just the right
// place, and makes a "deep copy" of the data.
- (void) new (&_values[len]._any) CORBA_Any (value);
+ (void) new (&_values[len]._any) CORBA::Any (value);
else
// The normal behaviour for parameters is that the ORB "borrows"
// their memory for the duration of calls.
@@ -220,8 +224,8 @@ CORBA_NVList::add_value (const CORBA_Char *name,
// application-allocated memory. It needs at least a "send the
// response now" call.
//
- (void) new (&_values[len]._any) CORBA_Any (value.type (),
- value.value (), CORBA_B_FALSE);
+ (void) new (&_values[len]._any) CORBA::Any (value.type (),
+ (void *)value.value (), CORBA::B_FALSE);
return &_values[len];
}
diff --git a/TAO/tao/nvlist.h b/TAO/tao/nvlist.h
index d6dad646812..0823410930e 100644
--- a/TAO/tao/nvlist.h
+++ b/TAO/tao/nvlist.h
@@ -16,47 +16,29 @@
#if !defined (TAO_NVLIST_H)
# define TAO_NVLIST_H
-# include "ace/OS.h"
-
-# include "tao/any.h"
-
// @@ IS it necessary to use ACE_Svc_Export on a forward decl? I
// simply did a global replace of _EXPCLASS with ACE_Svc_Export. I'm
// not familiar enough with crazy MSVC nuances to know if this is
// necessary, what it means, etc. Perhaps Brian can shed some light
// on the subject? --cjc
-class ACE_Svc_Export CORBA_NamedValue;
-
-void CORBA_release (CORBA_NamedValue_ptr x);
-CORBA_Boolean CORBA_is_nil (CORBA_NamedValue_ptr x);
-
-// No IID required
-enum
-{
- CORBA_ARG_IN = 0x01,
- CORBA_ARG_OUT = 0x02,
- CORBA_ARG_INOUT = 0x04,
- CORBA_IN_COPY_VALUE = 0x08,
- CORBA_OUT_LIST_MEMORY = 0x10
-};
class ACE_Svc_Export CORBA_NamedValue
-// = TITLE
-// NamedValue ... these occur only in "NVList" (named value list) data
-// structures. The binary form of the data structure is frozen and
-// visible to programs using it (e.g. from C). The C++ class supports
-// some programming discipline, e.g. to avoid memory leaks.
-//
-// They just represent parameters to calls. The name is optional, and
-// the value is packaged as an Any. The flags indicate parameter
-// mode, and some ownership rules for "top level" memory.
{
+ // = TITLE
+ // NamedValue ... these occur only in "NVList" (named value list) data
+ // structures. The binary form of the data structure is frozen and
+ // visible to programs using it (e.g. from C). The C++ class supports
+ // some programming discipline, e.g. to avoid memory leaks.
+ //
+ // They just represent parameters to calls. The name is optional, and
+ // the value is packaged as an Any. The flags indicate parameter
+ // mode, and some ownership rules for "top level" memory.
public:
- TAO_CONST CORBA_String _FAR name (void)
- { return (const CORBA_String) _name; }
+ TAO_CONST CORBA::String _FAR name (void)
+ { return (const CORBA::String) _name; }
- CORBA_Any_ptr _FAR value (void) { return &_any; }
- CORBA_Flags flags (void) const { return _flags; }
+ CORBA::Any_ptr _FAR value (void) { return &_any; }
+ CORBA::Flags flags (void) const { return _flags; }
~CORBA_NamedValue (void);
@@ -71,9 +53,9 @@ private:
u_int refcount_;
ACE_SYNCH_MUTEX lock_;
- CORBA_Any _any;
- CORBA_Flags _flags;
- const CORBA_Char *_FAR _name;
+ CORBA::Any _any;
+ CORBA::Flags _flags;
+ const CORBA::Char *_FAR _name;
CORBA_NamedValue (void) : _flags (0), _name (0) { }
@@ -81,16 +63,8 @@ private:
friend class CORBA_Request;
};
-class ACE_Svc_Export CORBA_NVList;
-
-void CORBA_release (CORBA_NVList_ptr x);
-CORBA_Boolean CORBA_is_nil (CORBA_NVList_ptr x);
-
-// @@ Why is this extern "C"?
-// See prior comments...
-extern "C" const IID IID_CORBA_NVList;
-
class ACE_Svc_Export CORBA_NVList
+{
// = TITLE
// NVList ... this is used in the (client side) DII (Dynamic
// Invocation Interface) to hold parameters, except for the return
@@ -102,17 +76,16 @@ class ACE_Svc_Export CORBA_NVList
// Request or ServerRequest pseudo-object. The ORB copies data
// to/from the IPC messages (e.g. IIOP::Request, IIOP::Response) as
// appropriate.
-{
public:
- CORBA_ULong count (void) const
+ CORBA::ULong count (void) const
{ return _len; }
- CORBA_NamedValue_ptr add_value (const CORBA_Char *_FAR ,
- const CORBA_Any _FAR &,
- CORBA_Flags,
- CORBA_Environment _FAR &);
+ CORBA::NamedValue_ptr add_value (const CORBA::Char *_FAR ,
+ const CORBA::Any _FAR &,
+ CORBA::Flags,
+ CORBA::Environment _FAR &);
- CORBA_NamedValue_ptr item (CORBA_Long n) const
+ CORBA::NamedValue_ptr item (CORBA::Long n) const
{ return &_values [(u_int) n]; }
~CORBA_NVList (void);
@@ -126,7 +99,7 @@ public:
private:
// @@ Do we really need to keep these _FAR macros?
- CORBA_NamedValue *_FAR _values;
+ CORBA::NamedValue *_FAR _values;
u_int _max;
u_int _len;
ACE_SYNCH_MUTEX lock_;
diff --git a/TAO/tao/objtable.cpp b/TAO/tao/objtable.cpp
index 06d5357eff3..70e28ce5dca 100644
--- a/TAO/tao/objtable.cpp
+++ b/TAO/tao/objtable.cpp
@@ -1,8 +1,13 @@
-#include "tao/objtable.h"
+#include "tao/corba.h"
+
+// destructor
+TAO_Object_Table::~TAO_Object_Table (void)
+{
+}
// Template Specialization for char*. Needed for the dynamic hash lookup
int
-ACE_Hash_Map_Manager<const char *, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX>::equal (const char *const &id1,
+ACE_Hash_Map_Manager<const char *, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX>::equal (const char *const &id1,
const char *const &id2)
{
// do a string compare
@@ -11,13 +16,13 @@ ACE_Hash_Map_Manager<const char *, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX>::equal
// Template Specialization for char *
u_long
-ACE_Hash_Map_Manager<const char *, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX>::hash (const char *const &ext_id)
+ACE_Hash_Map_Manager<const char *, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX>::hash (const char *const &ext_id)
{
// Use the hash_pjw hash function available in the ACE library
return ACE::hash_pjw (ext_id);
}
-TAO_Dynamic_Hash_ObjTable::TAO_Dynamic_Hash_ObjTable (CORBA_ULong size)
+TAO_Dynamic_Hash_ObjTable::TAO_Dynamic_Hash_ObjTable (CORBA::ULong size)
{
if (size > 0)
this->hash_.open (size);
@@ -33,8 +38,8 @@ TAO_Dynamic_Hash_ObjTable::~TAO_Dynamic_Hash_ObjTable (void)
iterator.next (entry) != 0;
iterator.advance ())
{
- CORBA_string_free ((char *)entry->ext_id_); // we had allocated memory and stored
- // the string. So we free the memory
+ CORBA::string_free ((char *)entry->ext_id_); // we had allocated memory and stored
+ // the string. So we free the memory
entry->int_id_ = 0; // we do not own this. So we just set it to 0
}
@@ -42,19 +47,19 @@ TAO_Dynamic_Hash_ObjTable::~TAO_Dynamic_Hash_ObjTable (void)
}
int
-TAO_Dynamic_Hash_ObjTable::bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj)
+TAO_Dynamic_Hash_ObjTable::bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj)
{
// the key is an octet sequence. Hence, we cannot simply cast the buffer to a
// char* as it may result in an arbitrary name. Hence we must first convert
// it to a string and then save a copy of the string in the table.
ACE_CString objkey ((char *)key.buffer, key.length);
- return this->hash_.bind (CORBA_string_dup (objkey.rep ()), obj);
+ return this->hash_.bind (CORBA::string_dup (objkey.rep ()), obj);
}
int
-TAO_Dynamic_Hash_ObjTable::find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj)
+TAO_Dynamic_Hash_ObjTable::find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj)
{
// the key is an octet sequence. Hence, we cannot simply cast the buffer to a
// char* as it may result in an arbitrary name due to absence of a NULL
@@ -65,7 +70,7 @@ TAO_Dynamic_Hash_ObjTable::find (const CORBA_OctetSeq &key,
}
// Linear search strategy
-TAO_Linear_ObjTable::TAO_Linear_ObjTable (CORBA_ULong size)
+TAO_Linear_ObjTable::TAO_Linear_ObjTable (CORBA::ULong size)
: next_ (0),
tablesize_ (size),
tbl_ (new TAO_Linear_ObjTable_Entry[size])
@@ -78,16 +83,16 @@ TAO_Linear_ObjTable::~TAO_Linear_ObjTable (void)
}
int
-TAO_Linear_ObjTable::bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj)
+TAO_Linear_ObjTable::bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj)
{
- CORBA_ULong i = this->next_;
+ CORBA::ULong i = this->next_;
if (i < this->tablesize_)
{
// store the string and the corresponding object pointer
- this->tbl_[i].opname_ = CORBA_string_alloc (key.length); // allocates one
- // more
+ this->tbl_[i].opname_ = CORBA::string_alloc (key.length); // allocates one
+ // more
ACE_OS::memset (this->tbl_[i].opname_, '\0', key.length+1);
ACE_OS::strncpy (this->tbl_[i].opname_, (char *)key.buffer, key.length);
this->tbl_[i].obj_ = obj;
@@ -100,12 +105,13 @@ TAO_Linear_ObjTable::bind (const CORBA_OctetSeq &key,
// find if the key exists
int
-TAO_Linear_ObjTable::find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj)
+TAO_Linear_ObjTable::find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj)
{
ACE_ASSERT (this->next_ <= this->tablesize_);
- for (CORBA_ULong i = 0; i < this->next_; i++)
+ // ACE_CString objkey ((char *)key.buffer, key.length);
+ for (CORBA::ULong i = 0; i < this->next_; i++)
{
// linearly search thru the table
if (!ACE_OS::strncmp (this->tbl_[i].opname_, (char *)key.buffer, key.length))
@@ -127,13 +133,13 @@ TAO_Linear_ObjTable_Entry::TAO_Linear_ObjTable_Entry (void)
TAO_Linear_ObjTable_Entry::~TAO_Linear_ObjTable_Entry (void)
{
- CORBA_string_free (this->opname_); // reclaim space consumed by the string
+ CORBA::string_free (this->opname_); // reclaim space consumed by the string
this->obj_ = 0; // cannot delete this as we do not own it
}
// Active Demux search strategy
// constructor
-TAO_Active_Demux_ObjTable::TAO_Active_Demux_ObjTable (CORBA_ULong size)
+TAO_Active_Demux_ObjTable::TAO_Active_Demux_ObjTable (CORBA::ULong size)
: next_ (0),
tablesize_ (size),
tbl_ (new TAO_Active_Demux_ObjTable_Entry[size])
@@ -149,12 +155,13 @@ TAO_Active_Demux_ObjTable::~TAO_Active_Demux_ObjTable ()
// bind the object based on the key
int
-TAO_Active_Demux_ObjTable::bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj)
+TAO_Active_Demux_ObjTable::bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj)
{
// The active demux strategy works on the assumption that the key is a
// stringified form of an index into the table
- CORBA_ULong i = ACE_OS::atoi ((char *)key.buffer);
+ ACE_CString objkey ((char *)key.buffer, key.length);
+ CORBA::ULong i = ACE_OS::atoi (objkey.rep ());
if (i < this->tablesize_)
{
@@ -173,10 +180,11 @@ TAO_Active_Demux_ObjTable::bind (const CORBA_OctetSeq &key,
}
int
-TAO_Active_Demux_ObjTable::find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr& obj)
+TAO_Active_Demux_ObjTable::find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr& obj)
{
- CORBA_ULong i = ACE_OS::atoi ((char *)key.buffer);
+ ACE_CString objkey ((char *)key.buffer, key.length);
+ CORBA::ULong i = ACE_OS::atoi (objkey.rep ());
ACE_ASSERT (i < this->tablesize_); // cannot be equal to
obj = this->tbl_[i].obj_;
@@ -194,14 +202,17 @@ TAO_Active_Demux_ObjTable_Entry::~TAO_Active_Demux_ObjTable_Entry (void)
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Hash_Map_Iterator<char const*, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Hash_Map_Manager<char const*, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Hash_Map_Entry<char const*, CORBA_Object_ptr>;
+template class ACE_Hash_Map_Iterator<char const*, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Manager<char const*, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Entry<char const*, CORBA::Object_ptr>;
template class ACE_Guard<ACE_SYNCH_RW_MUTEX>;
template class ACE_Read_Guard<ACE_SYNCH_RW_MUTEX>;
template class ACE_Write_Guard<ACE_SYNCH_RW_MUTEX>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Hash_Map_Iterator<char const*, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Hash_Map_Manager<char const*, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Hash_Map_Entry<char const*, CORBA_Object_ptr>
+#pragma instantiate ACE_Hash_Map_Iterator<char const*, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager<char const*, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Entry<char const*, CORBA::Object_ptr>
+#pragma instantiate ACE_Guard<ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Read_Guard<ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Write_Guard<ACE_SYNCH_RW_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/objtable.h b/TAO/tao/objtable.h
index cf7ec5a9099..cc636b854af 100644
--- a/TAO/tao/objtable.h
+++ b/TAO/tao/objtable.h
@@ -16,6 +16,7 @@
#if !defined (TAO_OBJTABLE_H)
# define TAO_OBJTABLE_H
+#if 0
# include "ace/ACE.h"
# include "ace/Synch.h"
# include "ace/Hash_Map_Manager.h"
@@ -23,21 +24,22 @@
# include "tao/orb.h"
# include "tao/sequence.h"
+#endif
class TAO_Object_Table
+{
// = TITLE
// Abstract class for maintaining a mapping of CORBA object keys
// to pointers to CORBA objects.
-{
public:
- virtual int find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj) = 0;
+ virtual int find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj) = 0;
// Find object associated with <{key}>, setting <{obj}> to the
// pointer and returning a non-negative integer. If not found,
// <{obj}> is unchanged and the value <-1> is returned.
- virtual int bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj) = 0;
+ virtual int bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj) = 0;
// Associated <{key}> with <{obj}>, returning 0 if object is
// registered successfully, 1 if it's already registered, and -1 if
// a failure occurs during registration.
@@ -47,7 +49,7 @@ public:
};
// Dynamic Hashing scheme using template specialization for char*
-typedef ACE_Hash_Map_Manager<const char*, CORBA_Object_ptr, ACE_SYNCH_RW_MUTEX> OBJ_MAP_MANAGER;
+typedef ACE_Hash_Map_Manager<const char*, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX> OBJ_MAP_MANAGER;
class TAO_Dynamic_Hash_ObjTable : public TAO_Object_Table
{
@@ -55,20 +57,20 @@ class TAO_Dynamic_Hash_ObjTable : public TAO_Object_Table
// Lookup strategy based on dynamic hashing. This works on the assumption
// that the object keys are essentially strings
public:
- TAO_Dynamic_Hash_ObjTable (CORBA_ULong size = 0);
+ TAO_Dynamic_Hash_ObjTable (CORBA::ULong size = 0);
// constructor. If size is 0, some default is used.
~TAO_Dynamic_Hash_ObjTable (void);
// destructor
- virtual int bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj);
- // Registers a CORBA_Object into the object table and associates the
+ virtual int bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj);
+ // Registers a CORBA::Object into the object table and associates the
// key with it. Returns -1 on failure, 0 on success, 1 on
// duplicate.
- virtual int find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj);
+ virtual int find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj);
// Looks up an object in the object table using <{key}>. Returns
// non-negative integer on success, or -1 on failure.
@@ -83,11 +85,11 @@ struct TAO_Linear_ObjTable_Entry
// Linear strategy table entry. This assumes that the object keys will be
// strings encoded as an octet sequence
- CORBA_String opname_;
+ CORBA::String opname_;
// stores the object key
- CORBA_Object_ptr obj_;
- // holds the CORBA_Object pointer corresponding to the object key
+ CORBA::Object_ptr obj_;
+ // holds the CORBA::Object pointer corresponding to the object key
TAO_Linear_ObjTable_Entry (void);
// constructor
@@ -99,24 +101,24 @@ struct TAO_Linear_ObjTable_Entry
class TAO_Linear_ObjTable: public TAO_Object_Table
{
public:
- TAO_Linear_ObjTable (CORBA_ULong size);
+ TAO_Linear_ObjTable (CORBA::ULong size);
~TAO_Linear_ObjTable (void);
- virtual int bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj);
- // Registers a CORBA_Object into the object table and associates the
+ virtual int bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj);
+ // Registers a CORBA::Object into the object table and associates the
// key with it. Returns -1 on failure, 0 on success, 1 on
// duplicate.
- virtual int find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj);
+ virtual int find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj);
// Looks up an object in the object table using <{key}>. Returns
// non-negative integer on success, or -1 on failure.
private:
- CORBA_ULong next_;
- CORBA_ULong tablesize_;
+ CORBA::ULong next_;
+ CORBA::ULong tablesize_;
TAO_Linear_ObjTable_Entry *tbl_;
};
@@ -125,8 +127,8 @@ struct TAO_Active_Demux_ObjTable_Entry
// =TITLE
// Active Demux lookup table entry
- CORBA_Object_ptr obj_;
- // CORBA_Object pointer corresponding to the key
+ CORBA::Object_ptr obj_;
+ // CORBA::Object pointer corresponding to the key
TAO_Active_Demux_ObjTable_Entry (void);
// constructor
@@ -138,24 +140,24 @@ struct TAO_Active_Demux_ObjTable_Entry
class TAO_Active_Demux_ObjTable : public TAO_Object_Table
{
public:
- TAO_Active_Demux_ObjTable (CORBA_ULong size);
+ TAO_Active_Demux_ObjTable (CORBA::ULong size);
~TAO_Active_Demux_ObjTable (void);
- virtual int bind (const CORBA_OctetSeq &key,
- CORBA_Object_ptr obj);
- // Registers a CORBA_Object into the object table and associates the
+ virtual int bind (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr obj);
+ // Registers a CORBA::Object into the object table and associates the
// key with it. Returns -1 on failure, 0 on success, 1 on
// duplicate.
- virtual int find (const CORBA_OctetSeq &key,
- CORBA_Object_ptr &obj);
+ virtual int find (const CORBA::OctetSeq &key,
+ CORBA::Object_ptr &obj);
// Looks up an object in the object table using <{key}>. Returns
// non-negative integer on success, or -1 on failure.
private:
- CORBA_ULong next_;
- CORBA_ULong tablesize_;
+ CORBA::ULong next_;
+ CORBA::ULong tablesize_;
TAO_Active_Demux_ObjTable_Entry *tbl_;
};
diff --git a/TAO/tao/optable.cpp b/TAO/tao/optable.cpp
index 3ce20dff317..9fae886a7d3 100644
--- a/TAO/tao/optable.cpp
+++ b/TAO/tao/optable.cpp
@@ -1,4 +1,4 @@
-#include "tao/optable.h"
+#include "tao/corba.h"
// destructor
TAO_Operation_Table::~TAO_Operation_Table (void)
@@ -22,8 +22,8 @@ ACE_Hash_Map_Manager<const char *, TAO_Skeleton, ACE_SYNCH_RW_MUTEX>::hash (cons
// constructor
TAO_Dynamic_Hash_OpTable::TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry *db,
- CORBA_ULong dbsize,
- CORBA_ULong hashtblsize)
+ CORBA::ULong dbsize,
+ CORBA::ULong hashtblsize)
{
if (hashtblsize > 0)
this->hash_.open (hashtblsize);
@@ -31,7 +31,7 @@ TAO_Dynamic_Hash_OpTable::TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry
// the job of the constructor is to go thru each entry of the database and
// bind the operation name to its corresponding skeleton
- for (CORBA_ULong i=0; i < dbsize; i++)
+ for (CORBA::ULong i=0; i < dbsize; i++)
{
// XXXASG: what happens if bind fails ???
(void)this->bind (db[i].opname_, db[i].skel_ptr_);
@@ -48,7 +48,7 @@ TAO_Dynamic_Hash_OpTable::~TAO_Dynamic_Hash_OpTable (void)
iterator.next (entry) != 0;
iterator.advance ())
{
- CORBA_string_free ((char *)entry->ext_id_); // we had allocated memory and stored
+ CORBA::string_free ((char *)entry->ext_id_); // we had allocated memory and stored
// the string. So we free the memory
entry->int_id_ = 0; // we do not own this. So we just set it to 0
}
@@ -57,28 +57,28 @@ TAO_Dynamic_Hash_OpTable::~TAO_Dynamic_Hash_OpTable (void)
}
int
-TAO_Dynamic_Hash_OpTable::bind (const CORBA_String &opname,
+TAO_Dynamic_Hash_OpTable::bind (const CORBA::String &opname,
const TAO_Skeleton skel_ptr)
{
- return this->hash_.bind (CORBA_string_dup (opname), skel_ptr);
+ return this->hash_.bind (CORBA::string_dup (opname), skel_ptr);
}
int
-TAO_Dynamic_Hash_OpTable::find (const CORBA_String &opname,
+TAO_Dynamic_Hash_OpTable::find (const CORBA::String &opname,
TAO_Skeleton& skel_ptr)
{
return this->hash_.find ((const char *)opname, skel_ptr);
}
// Linear search strategy
-TAO_Linear_OpTable::TAO_Linear_OpTable (const TAO_operation_db_entry *db, CORBA_ULong dbsize)
+TAO_Linear_OpTable::TAO_Linear_OpTable (const TAO_operation_db_entry *db, CORBA::ULong dbsize)
: next_ (0),
tablesize_ (dbsize),
tbl_ (new TAO_Linear_OpTable_Entry[dbsize])
{
// the job of the constructor is to go thru each entry of the database and
// bind the operation name to its corresponding skeleton
- for (CORBA_ULong i=0; i < dbsize; i++)
+ for (CORBA::ULong i=0; i < dbsize; i++)
{
// XXXASG: what happens if bind fails ???
(void)this->bind (db[i].opname_, db[i].skel_ptr_);
@@ -91,14 +91,14 @@ TAO_Linear_OpTable::~TAO_Linear_OpTable (void)
}
int
-TAO_Linear_OpTable::bind (const CORBA_String &opname,
+TAO_Linear_OpTable::bind (const CORBA::String &opname,
const TAO_Skeleton skel_ptr)
{
- CORBA_ULong i = this->next_;
+ CORBA::ULong i = this->next_;
if (i < this->tablesize_)
{
- this->tbl_[i].opname_ = CORBA_string_dup (opname);
+ this->tbl_[i].opname_ = CORBA::string_dup (opname);
this->tbl_[i].skel_ptr_ = skel_ptr;
this->next_++;
return 0; // success
@@ -107,12 +107,12 @@ TAO_Linear_OpTable::bind (const CORBA_String &opname,
}
int
-TAO_Linear_OpTable::find (const CORBA_String &opname,
+TAO_Linear_OpTable::find (const CORBA::String &opname,
TAO_Skeleton& skel_ptr)
{
ACE_ASSERT (this->next_ <= this->tablesize_);
- for (CORBA_ULong i = 0; i < this->next_; i++)
+ for (CORBA::ULong i = 0; i < this->next_; i++)
if (!ACE_OS::strncmp (this->tbl_[i].opname_, opname, ACE_OS::strlen (opname)))
{
skel_ptr = this->tbl_[i].skel_ptr_;
@@ -131,21 +131,21 @@ TAO_Linear_OpTable_Entry::TAO_Linear_OpTable_Entry (void)
// destructor
TAO_Linear_OpTable_Entry::~TAO_Linear_OpTable_Entry (void)
{
- CORBA_string_free (opname_);
+ CORBA::string_free (opname_);
this->skel_ptr_ = 0; // cannot delete this as we do not own it
}
// Active Demux search strategy
TAO_Active_Demux_OpTable::TAO_Active_Demux_OpTable (const
TAO_operation_db_entry *db,
- CORBA_ULong dbsize)
+ CORBA::ULong dbsize)
: next_ (0),
tablesize_ (dbsize),
tbl_ (new TAO_Active_Demux_OpTable_Entry[dbsize])
{
// the job of the constructor is to go thru each entry of the database and
// bind the operation name to its corresponding skeleton
- for (CORBA_ULong i=0; i < dbsize; i++)
+ for (CORBA::ULong i=0; i < dbsize; i++)
{
// XXXASG: what happens if bind fails ???
(void)this->bind (db[i].opname_, db[i].skel_ptr_);
@@ -158,10 +158,10 @@ TAO_Active_Demux_OpTable::~TAO_Active_Demux_OpTable (void)
}
int
-TAO_Active_Demux_OpTable::bind (const CORBA_String &opname,
+TAO_Active_Demux_OpTable::bind (const CORBA::String &opname,
const TAO_Skeleton skel_ptr)
{
- CORBA_ULong i = ACE_OS::atoi (opname);
+ CORBA::ULong i = ACE_OS::atoi (opname);
if (i < this->tablesize_)
{
@@ -180,10 +180,10 @@ TAO_Active_Demux_OpTable::bind (const CORBA_String &opname,
}
int
-TAO_Active_Demux_OpTable::find (const CORBA_String &opname,
+TAO_Active_Demux_OpTable::find (const CORBA::String &opname,
TAO_Skeleton& skel_ptr)
{
- CORBA_ULong i = ACE_OS::atoi (opname);
+ CORBA::ULong i = ACE_OS::atoi (opname);
ACE_ASSERT (i < this->tablesize_);
skel_ptr = this->tbl_[i].skel_ptr_;
diff --git a/TAO/tao/optable.h b/TAO/tao/optable.h
index 1c5d960a60e..84287dae99c 100644
--- a/TAO/tao/optable.h
+++ b/TAO/tao/optable.h
@@ -16,12 +16,14 @@
#if !defined (TAO_OPTABLE_H)
#define TAO_OPTABLE_H
+#if 0
#include "ace/ACE.h"
#include "ace/Synch.h"
#include "ace/Hash_Map_Manager.h"
#include "ace/SString.h"
#include "ace/Singleton.h"
#include "tao/orb.h"
+#endif
struct TAO_operation_db_entry
{
@@ -29,7 +31,7 @@ struct TAO_operation_db_entry
// Define a table entry that holds an operation name and its corresponding skeleton.
// A table of such entries is used to initialize the different lookup strategies.
- CORBA_String opname_;
+ CORBA::String opname_;
// operation name
TAO_Skeleton skel_ptr_;
// skeleton pointer
@@ -41,13 +43,13 @@ class ACE_Svc_Export TAO_Operation_Table
// operation names.
{
public:
- virtual int find (const CORBA_String &opname,
+ virtual int find (const CORBA::String &opname,
TAO_Skeleton &skelfunc) = 0;
// Uses <{opname}> to look up the skeleton function and pass it back
// in <{skelfunc}>. Returns non-negative integer on success, or -1
// on failure.
- virtual int bind (const CORBA_String &opname,
+ virtual int bind (const CORBA::String &opname,
const TAO_Skeleton skel_ptr) = 0;
// Associate the skeleton <{skel_ptr}> with an operation named
// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate.
@@ -66,8 +68,8 @@ class ACE_Svc_Export TAO_Dynamic_Hash_OpTable : public TAO_Operation_Table
// = TITLE
// Dynamic Hashing scheme for CORBA IDL operation name lookup
public:
- TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry *db, CORBA_ULong
- dbsize, CORBA_ULong hashtblsize = 0);
+ TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry *db, CORBA::ULong
+ dbsize, CORBA::ULong hashtblsize = 0);
// Constructor.
// Initialize the dynamic hash operation table with a database of operation
// names. The hash table size may be different from the size of the
@@ -77,12 +79,12 @@ public:
~TAO_Dynamic_Hash_OpTable (void);
// destructor
- virtual int bind (const CORBA_String &opname,
+ virtual int bind (const CORBA::String &opname,
const TAO_Skeleton skel_ptr);
// Associate the skeleton <{skel_ptr}> with an operation named
// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate.
- virtual int find (const CORBA_String &opname,
+ virtual int find (const CORBA::String &opname,
TAO_Skeleton &skelfunc);
// Uses <{opname}> to look up the skeleton function and pass it back
// in <{skelfunc}>. Returns non-negative integer on success, or -1
@@ -97,7 +99,7 @@ struct ACE_Svc_Export TAO_Linear_OpTable_Entry
{
// = TITLE
// Table entry for linear search lookup strategy
- CORBA_String opname_;
+ CORBA::String opname_;
// holds the operation name
TAO_Skeleton skel_ptr_;
@@ -113,7 +115,7 @@ struct ACE_Svc_Export TAO_Linear_OpTable_Entry
class ACE_Svc_Export TAO_Linear_OpTable : public TAO_Operation_Table
{
public:
- TAO_Linear_OpTable (const TAO_operation_db_entry *db, CORBA_ULong dbsize);
+ TAO_Linear_OpTable (const TAO_operation_db_entry *db, CORBA::ULong dbsize);
// constructor.
// Initialize the linear search operation table with a database of operation
// names
@@ -121,22 +123,22 @@ public:
~TAO_Linear_OpTable (void);
// destructor
- virtual int find (const CORBA_String &opname,
+ virtual int find (const CORBA::String &opname,
TAO_Skeleton &skel_ptr);
// Uses <{opname}> to look up the skeleton function and pass it back
// in <{skelfunc}>. Returns non-negative integer on success, or -1
// on failure.
- virtual int bind (const CORBA_String &opname,
+ virtual int bind (const CORBA::String &opname,
const TAO_Skeleton skelptr);
// Associate the skeleton <{skel_ptr}> with an operation named
// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate.
private:
- CORBA_ULong next_;
+ CORBA::ULong next_;
// keeps track of the next available slot to be filled.
- CORBA_ULong tablesize_;
+ CORBA::ULong tablesize_;
// size of the internal table
TAO_Linear_OpTable_Entry *tbl_;
@@ -163,29 +165,29 @@ class ACE_Svc_Export TAO_Active_Demux_OpTable : public TAO_Operation_Table
// Implements the active demultiplexed lookup strategy. The key is assumed to
// provide an index directly into the internal table
public:
- TAO_Active_Demux_OpTable (const TAO_operation_db_entry *db, CORBA_ULong dbsize);
+ TAO_Active_Demux_OpTable (const TAO_operation_db_entry *db, CORBA::ULong dbsize);
// Constructor
// Initializes the internal table with the database of operations
~TAO_Active_Demux_OpTable (void);
// destructor
- virtual int find (const CORBA_String &opname,
+ virtual int find (const CORBA::String &opname,
TAO_Skeleton &skel_ptr);
// Uses <{opname}> to look up the skeleton function and pass it back
// in <{skelfunc}>. Returns non-negative integer on success, or -1
// on failure.
- virtual int bind (const CORBA_String &opname,
+ virtual int bind (const CORBA::String &opname,
const TAO_Skeleton skelptr);
// Associate the skeleton <{skel_ptr}> with an operation named
// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate.
private:
- CORBA_ULong next_;
+ CORBA::ULong next_;
// the next available free slot
- CORBA_ULong tablesize_;
+ CORBA::ULong tablesize_;
// size of the internal table
TAO_Active_Demux_OpTable_Entry *tbl_;
diff --git a/TAO/tao/orbobj.cpp b/TAO/tao/orbobj.cpp
index 11f821ff585..88bb3bc7b0a 100644
--- a/TAO/tao/orbobj.cpp
+++ b/TAO/tao/orbobj.cpp
@@ -9,6 +9,7 @@
// component and have a loose table-driven coupling to ORB/protocol
// library components.
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -21,9 +22,12 @@
#include "tao/roa.h"
#include "tao/nvlist.h"
#include "tao/debug.h"
+#endif /* 0 */
+
+#include "tao/corba.h"
extern void __TC_init_table (void);
-extern void __TC_init_standard_exceptions (CORBA_Environment &env);
+extern void __TC_init_standard_exceptions (CORBA::Environment &env);
#if defined (SIG_IGN_BROKEN)
# undef SIG_IGN
@@ -34,22 +38,23 @@ extern void __TC_init_standard_exceptions (CORBA_Environment &env);
// {A201E4C6-F258-11ce-9598-0000C07CA898}
DEFINE_GUID (IID_CORBA_ORB,
-0xa201e4c6, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
+ 0xa201e4c6, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
// CJC Why was this commented out?
// {A201E4C7-F258-11ce-9598-0000C07CA898}
DEFINE_GUID (IID_STUB_Object,
-0xa201e4c7, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
+ 0xa201e4c7, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
TAO_Client_Strategy_Factory &
CORBA_ORB::client_factory (void)
{
+#if 0 // XXXASG: Broken code
if (client_factory_ == 0)
{
// Look in the service repository for an instance.
client_factory_ =
ACE_Dynamic_Service<TAO_Client_Strategy_Factory>::instance ("Client_Strategy_Factory");
- client_factory_from_service_config_ = CORBA_B_TRUE;
+ client_factory_from_service_config_ = CORBA::B_TRUE;
}
if (client_factory_ == 0)
@@ -59,25 +64,26 @@ CORBA_ORB::client_factory (void)
// platforms.
ACE_NEW (client_factory_, TAO_Default_Client_Strategy_Factory);
- client_factory_from_service_config_ = CORBA_B_FALSE;
+ client_factory_from_service_config_ = CORBA::B_FALSE;
// @@ At this point we need to register this with the
// Service_Repository in order to get it cleaned up properly.
// But, for now we let it leak.
}
-
+#endif /* 0 */
return *client_factory_;
}
TAO_Server_Strategy_Factory &
CORBA_ORB::server_factory (void)
{
+#if 0 // XXASG Broken code
if (server_factory_ == 0)
{
// Look in the service repository for an instance.
server_factory_ =
ACE_Dynamic_Service<TAO_Server_Strategy_Factory>::instance ("Server_Strategy_Factory");
- server_factory_from_service_config_ = CORBA_B_TRUE;
+ server_factory_from_service_config_ = CORBA::B_TRUE;
}
if (server_factory_ == 0)
@@ -87,12 +93,12 @@ CORBA_ORB::server_factory (void)
// platforms.
ACE_NEW (server_factory_, TAO_Default_Server_Strategy_Factory);
- server_factory_from_service_config_ = CORBA_B_FALSE;
+ server_factory_from_service_config_ = CORBA::B_FALSE;
// @@ At this point we need to register this with the
// Service_Repository in order to get it cleaned up properly.
// But, for now we let it leak.
}
-
+#endif /* 0 */
return *server_factory_;
}
@@ -129,11 +135,11 @@ argvec_shift (int& argc, char *argv[], int numslots)
argc -= numslots;
}
-CORBA_ORB_ptr
-CORBA_ORB_init (int &argc,
- char *const *argv,
- char *orb_name,
- CORBA_Environment &env)
+CORBA::ORB_ptr
+CORBA::ORB_init (int &argc,
+ char *const *argv,
+ char *orb_name,
+ CORBA::Environment &env)
{
#if defined (ACE_HAS_THREADS)
// @@ This use of a static is evil. Please fix...
@@ -149,16 +155,16 @@ CORBA_ORB_init (int &argc,
//
// NOTE: we still "just" assume that native floating point is IEEE.
- if (sizeof (CORBA_Short) != 2
- || sizeof (CORBA_Long) != 4
- || sizeof (CORBA_LongLong) != 8
- || sizeof (CORBA_Float) != 4
- || sizeof (CORBA_Double) != 8
- || sizeof (CORBA_LongDouble) != 16
- || sizeof (CORBA_WChar) < 2
+ if (sizeof (CORBA::Short) != 2
+ || sizeof (CORBA::Long) != 4
+ || sizeof (CORBA::LongLong) != 8
+ || sizeof (CORBA::Float) != 4
+ || sizeof (CORBA::Double) != 8
+ || sizeof (CORBA::LongDouble) != 16
+ || sizeof (CORBA::WChar) < 2
|| sizeof (void *) != SIZEOF_VOID_P)
{
- env.exception (new CORBA_INITIALIZE (COMPLETED_NO));
+ env.exception (new CORBA::INITIALIZE (CORBA::COMPLETED_NO));
return 0;
}
@@ -173,11 +179,14 @@ CORBA_ORB_init (int &argc,
//
// @@ Should we consume arguments we understand or leave all
// arguments in the vector?
-
+
// Prepare a copy of the argument vector
- char *svc_config_argv[]; // @@ Should this be a data member?
- // Probably, but there's no object in which to scope it.
+ // char *svc_config_argv[]; // @@ Should this be a data member?
+ // XXXASG - compiler doesn't like this
+ char **svc_config_argv; // @@ Should this be a data member?
+ // Probably, but there's no object in which to scope it.
int svc_config_argc = 0;
+#if 0 // XXASG : Code is broken. ACE_NEW returns, arg type conflict in argvec_shift
ACE_NEW (svc_config_argv, char *[argc + 1]);
// Be certain to copy the program name.
@@ -212,7 +221,7 @@ CORBA_ORB_init (int &argc,
argvec_shift (argc, argv[i], 1);
}
}
-
+#endif /* 0 */
#if defined (DEBUG)
// Make it a little easier to debug programs using this code.
{
@@ -241,13 +250,13 @@ CORBA_ORB_init (int &argc,
// makes it always use URL-style stringified objrefs, where the
// hostname and TCP port number are explicit (and the whole objref
// is readable by mortals).
- CORBA_Boolean use_ior;
+ CORBA::Boolean use_ior;
if (orb_name != 0
&& ACE_OS::strcmp (orb_name, "internet") == 0)
- use_ior = CORBA_B_FALSE;
+ use_ior = CORBA::B_FALSE;
else
- use_ior = CORBA_B_TRUE;
+ use_ior = CORBA::B_TRUE;
#if defined (SIGPIPE)
// @@ Is there a better way to deal with this in a portable manner? --cjc
@@ -256,7 +265,7 @@ CORBA_ORB_init (int &argc,
// implementation artifact of potential writes to dead connections,
// as it'd be way expensive. Do it here; who cares about SIGPIPE in
// these kinds of applications, anyway?
- (void) ACE_OS::signal (SIGPIPE, SIG_IGN);
+ (void) ACE_OS::signal (SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
ACE_OS::socket_init (ACE_WSOCK_VERSION);
@@ -274,25 +283,25 @@ CORBA_ORB_init (int &argc,
// Inititalize the "ORB" pseudo-object now.
IIOP_ORB_ptr the_orb = TAO_ORB::instance ();
- the_orb->use_omg_ior_format (CORBA_Boolean (use_ior));
+ the_orb->use_omg_ior_format (CORBA::Boolean (use_ior));
return the_orb;
}
void
-CORBA_ORB::create_list (CORBA_Long count,
- CORBA_NVList_ptr &retval)
+CORBA_ORB::create_list (CORBA::Long count,
+ CORBA::NVList_ptr &retval)
{
- assert (CORBA_ULong (count) <= UINT_MAX);
+ assert (CORBA::ULong (count) <= UINT_MAX);
- retval = new CORBA_NVList;
+ retval = new CORBA::NVList;
if (count != 0)
{
retval->_len = 0;
retval->_max = (u_int) count;
- retval->_values = (CORBA_NamedValue_ptr) ACE_OS::calloc ((u_int) count,
- sizeof (CORBA_NamedValue));
+ retval->_values = (CORBA::NamedValue_ptr) ACE_OS::calloc ((u_int) count,
+ sizeof (CORBA::NamedValue));
}
}
@@ -303,31 +312,33 @@ CORBA_ORB::create_list (CORBA_Long count,
//
// XXX it's server-side so should be OA-specific and not in this module
-CORBA_ORB_ptr
+CORBA::ORB_ptr
_orb (void)
{
return TAO_ORB::instance ();
}
-CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
- char **argv,
- const char *boa_identifier)
+CORBA::BOA_ptr
+CORBA_ORB::BOA_init (int &argc,
+ char **argv,
+ const char *boa_identifier)
{
// parse the arguments looking for options starting with -OA. After
// processing these options, move all these to the end of the argv
// list and decrement argc appropriately.
TAO_OA_Parameters *params = TAO_OA_PARAMS::instance (); //should have been BOA_Parameters
- CORBA_BOA_ptr rp;
- CORBA_String_var id = boa_identifier;
- CORBA_String_var host = CORBA_string_dup ("");
- CORBA_String_var demux = CORBA_string_dup ("dynamic_hash"); // default, at least for now
- CORBA_UShort port = 5001; // some default port -- needs to be a #defined value
- CORBA_ULong tablesize = 0; // default table size for lookup tables
- CORBA_Boolean use_threads = CORBA_B_FALSE;
+ CORBA::BOA_ptr rp;
+ CORBA::String_var id = boa_identifier;
+ CORBA::String_var host = CORBA::string_dup ("");
+ CORBA::String_var demux = CORBA::string_dup ("dynamic_hash"); // default, at least for now
+ CORBA::UShort port = 5001; // some default port -- needs to be a #defined value
+ CORBA::ULong tablesize = 0; // default table size for lookup tables
+ CORBA::Boolean use_threads = CORBA::B_FALSE;
ACE_INET_Addr rendezvous;
- CORBA_Environment env;
+ CORBA::Environment env;
+#if 0 /* XXXASG- code is broken. argvec_shift arg2 in conflict */
for (int i = 0; i < argc; )
{
// @@ Can you please add comments describing each of these options? --doug
@@ -337,7 +348,7 @@ CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
{
// Specify the name of the OA
if (i + 1 < argc)
- id = CORBA_string_dup (argv[i + 1]);
+ id = CORBA::string_dup (argv[i + 1]);
argvec_shift (argc, argv[i], 2);
}
@@ -346,7 +357,7 @@ CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
// Specify the name of the host (i.e., interface) on which
// the server should listen
if (i + 1 < argc)
- host = CORBA_string_dup (argv[i + 1]);
+ host = CORBA::string_dup (argv[i + 1]);
argvec_shift (argc, argv[i], 2);
}
@@ -364,7 +375,7 @@ CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
// Specify the demultiplexing strategy to be used for object
// demultiplexing
if (i + 1 < argc)
- demux = CORBA_string_dup (argv[i+1]);
+ demux = CORBA::string_dup (argv[i+1]);
argvec_shift (argc, argv[i], 2);
}
@@ -387,12 +398,13 @@ CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
else if (ACE_OS::strcmp (argv[i], "-OAthread") == 0)
{
// Specify whether or not threads should be used.
- use_threads = CORBA_B_TRUE;
+ use_threads = CORBA::B_TRUE;
argvec_shift (argc, argv[i], 1);
}
else
i++;
}
+#endif /* 0 */
// create a INET_Addr
if (ACE_OS::strlen (host) > 0)
@@ -404,7 +416,7 @@ CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
if (params->oa ())
{
- env.exception (new CORBA_INITIALIZE (COMPLETED_NO));
+ env.exception (new CORBA::INITIALIZE (CORBA::COMPLETED_NO));
return 0;
}
@@ -412,11 +424,11 @@ CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
params->using_threads (use_threads);
params->demux_strategy (demux);
params->addr (rendezvous);
- params->upcall (CORBA_BOA::dispatch);
+ params->upcall (CORBA::BOA::dispatch);
params->tablesize (tablesize);
#if defined (ROA_NEEDS_REQ_KEY)
- (void) ACE_Thread::keycreate (&req_key_);
+ (void) ACE_Thread::keycreate (&req_key_);
#endif /* ROA_NEEDS_REQ_KEY */
ACE_NEW_RETURN (rp, ROA (this, env), 0);
@@ -424,6 +436,3 @@ CORBA_BOA_ptr CORBA_ORB::BOA_init (int &argc,
return rp;
}
-#if !defined (__ACE_INLINE__)
-# include "orbobj.i"
-#endif /* __ACE_INLINE__ */
diff --git a/TAO/tao/orbobj.h b/TAO/tao/orbobj.h
index cd0c4c0515c..707d7d9818e 100644
--- a/TAO/tao/orbobj.h
+++ b/TAO/tao/orbobj.h
@@ -23,59 +23,37 @@
#if !defined (TAO_ORBOBJ_H)
# define TAO_ORBOBJ_H
+#if 0
# include "ace/OS.h"
# include "tao/factories.h"
# include "tao/params.h"
-
-// Can't have forward decls if we're doing inlines of these functions
-ACE_INLINE void CORBA_release (CORBA_ORB_ptr orb);
-ACE_INLINE CORBA_Boolean CORBA_is_nil (CORBA_ORB_ptr orb);
-
-extern "C" const IID IID_CORBA_ORB;
-
-// @@ Shoudn't this be hidden within a namespace? According to the
-// spec, CORBA_ORB_init() is a valid signature for this function, as
-// is CORBA::ORB_init(), as is (I think) CORBA::ORB::init(). It *IS*
-// hidden within the CORBA namespace. It's just that it uses the
-// underscore as the namespace separator since we don't have the
-// luxury of real C++ namespaces. --cjc
-
-// ORB initialisation, per OMG document 94-9-46.
-
-CORBA_ORB_ptr ACE_Svc_Export
-CORBA_ORB_init (int &argc,
- char *const *argv,
- char *orb_name,
- CORBA_Environment &env);
+#endif /* 0 */
class ACE_Svc_Export CORBA_ORB : public IUnknown
+{
// = TITLE
// ORB pseudo-objref
-{
public:
- CORBA_BOA_ptr BOA_init (int &argc,
- char *argv[],
+ CORBA::BOA_ptr BOA_init (int &argc,
+ char **argv,
const char *boa_identifier = 0);
- // Initialize the BOA.
+ static CORBA::ORB_ptr _duplicate (CORBA::ORB_ptr orb);
+ static CORBA::ORB_ptr _nil (void);
- // @@ Please add comments.
- static CORBA_ORB_ptr _duplicate (CORBA_ORB_ptr orb);
- static CORBA_ORB_ptr _nil (void);
-
- virtual CORBA_Object_ptr string_to_object (CORBA_String str,
- CORBA_Environment &env) = 0;
- virtual CORBA_String object_to_string (CORBA_Object_ptr obj,
- CORBA_Environment &env) = 0;
+ virtual CORBA::Object_ptr string_to_object (CORBA::String str,
+ CORBA::Environment &env) = 0;
+ virtual CORBA::String object_to_string (CORBA::Object_ptr obj,
+ CORBA::Environment &env) = 0;
// similar for TypeCodes and Anys ... to/from octet sequences
- void create_list (CORBA_Long count,
- CORBA_NVList_ptr &retval);
+ void create_list (CORBA::Long count,
+ CORBA::NVList_ptr &retval);
// Stuff required for COM IUnknown support ... this class is
// intended to be inherited by others, which will provide some more
- // of the CORBA/COM support. Implementations of this "CORBA_ORB"
+ // of the CORBA/COM support. Implementations of this "CORBA::ORB"
// class must know how to create stringify/destringify their
// objrefs, as well as how to marshal and unmarshal them ... as well
// as provide their own QueryInterface.
@@ -84,8 +62,8 @@ public:
ULONG __stdcall Release (void);
// = TAO-specific methods.
- TAO_Client_Factory &client_factory (void);
- TAO_Server_Factory &server_factory (void);
+ TAO_Client_Strategy_Factory &client_factory (void);
+ TAO_Server_Strategy_Factory &server_factory (void);
TAO_ORB_Parameters &params (void);
protected:
@@ -98,11 +76,11 @@ private:
TAO_Client_Strategy_Factory *client_factory_;
- CORBA_Boolean client_factory_from_service_config_;
+ CORBA::Boolean client_factory_from_service_config_;
TAO_Server_Strategy_Factory *server_factory_;
- CORBA_Boolean server_factory_from_service_config_;
+ CORBA::Boolean server_factory_from_service_config_;
TAO_ORB_Parameters params_;
@@ -111,9 +89,5 @@ private:
CORBA_ORB &operator= (const CORBA_ORB &);
};
-# if defined(__ACE_INLINE__)
-# include "orbobj.i"
-# endif
-
#endif /* TAO_ORBOBJ_H */
diff --git a/TAO/tao/orbobj.i b/TAO/tao/orbobj.i
index ecf273d5b3f..d6de006064a 100644
--- a/TAO/tao/orbobj.i
+++ b/TAO/tao/orbobj.i
@@ -3,10 +3,10 @@
// Constructor and destructor are accessible to subclasses
ACE_INLINE
CORBA_ORB::CORBA_ORB (void)
- : client_factory_(0),
- client_factory_from_service_config_(CORBA_B_FALSE),
- server_factory_(0),
- server_factory_from_service_config_(CORBA_B_FALSE)
+ : client_factory_ (0),
+ client_factory_from_service_config_ (CORBA::B_FALSE),
+ server_factory_ (0),
+ server_factory_from_service_config_ (CORBA::B_FALSE)
{
refcount_ = 1;
}
@@ -28,14 +28,14 @@ CORBA_ORB::~CORBA_ORB (void)
// CORBA dup/release build on top of COM's (why not).
ACE_INLINE void
-CORBA_release (CORBA_ORB_ptr obj)
+CORBA::release (CORBA::ORB_ptr obj)
{
if (obj)
obj->Release ();
}
-ACE_INLINE CORBA_ORB_ptr
-CORBA_ORB::_duplicate (CORBA_ORB_ptr obj)
+ACE_INLINE CORBA::ORB_ptr
+CORBA_ORB::_duplicate (CORBA::ORB_ptr obj)
{
if (obj)
obj->AddRef ();
@@ -44,16 +44,16 @@ CORBA_ORB::_duplicate (CORBA_ORB_ptr obj)
// Null pointers represent nil objects.
-ACE_INLINE CORBA_ORB_ptr
+ACE_INLINE CORBA::ORB_ptr
CORBA_ORB::_nil (void)
{
return 0;
}
-ACE_INLINE CORBA_Boolean
-CORBA_is_nil (CORBA_ORB_ptr obj)
+ACE_INLINE CORBA::Boolean
+CORBA::is_nil (CORBA::ORB_ptr obj)
{
- return (CORBA_Boolean) (obj == 0);
+ return (CORBA::Boolean) (obj == 0);
}
ACE_INLINE ULONG __stdcall
diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp
index 63d8726659c..c6d17566970 100644
--- a/TAO/tao/params.cpp
+++ b/TAO/tao/params.cpp
@@ -1,6 +1,10 @@
+#if 0
#include "tao/params.h"
#include "tao/connect.h"
#include "tao/objtable.h"
+#endif
+
+#include "tao/corba.h"
TAO_OA_Parameters *
TAO_OA_Parameters::instance (void)
diff --git a/TAO/tao/params.h b/TAO/tao/params.h
index b38937052b2..c443d6cc273 100644
--- a/TAO/tao/params.h
+++ b/TAO/tao/params.h
@@ -16,11 +16,13 @@
#if !defined (TAO_PARAMS_H)
# define TAO_PARAMS_H
+#if 0
# include "ace/OS.h"
# include "tao/orb.h" // get types
# include "tao/boa.h" // Need the DSI Handler
-# include "tao/sequence.h" // for CORBA_OctetSeq
+# include "tao/sequence.h" // for CORBA::OctetSeq
+#endif /* 0 */
// Forward decls.
@@ -64,10 +66,20 @@ public:
static TAO_OA_Parameters *instance (TAO_OA_Parameters*);
// Set the Singleton instance.
- typedef CORBA_BOA::dsi_handler UpcallFunc;
- typedef void (*ForwardFunc)(CORBA_OctetSeq &,
- CORBA_Object_ptr &, void *,
- CORBA_Environment &);
+#if 0
+ enum DEMUX_STRATEGY
+ {
+ TAO_LINEAR,
+ TAO_DYNAMIC_HASH,
+ TAO_ACTIVE_DEMUX,
+ TAO_USER_DEFINED
+ };
+#endif /* 0 */
+
+ typedef CORBA::BOA::dsi_handler UpcallFunc;
+ typedef void (*ForwardFunc)(CORBA::OctetSeq &,
+ CORBA::Object_ptr &, void *,
+ CORBA::Environment &);
TAO_OA_Parameters (void);
@@ -110,12 +122,12 @@ public:
// Haven't figured out what the forwarder really does...don't really
// care right now.
- CORBA_BOA_ptr oa (void);
+ CORBA::BOA_ptr oa (void);
// Return the handle to the One True Object Adapter. The code from
// which <{TAO}> is derived makes a vast assumption that there will
// only be one Object Adapter in process.
- void oa (CORBA_BOA_ptr anOA);
+ void oa (CORBA::BOA_ptr anOA);
// Set the handle to the One True Object Adapter.
void addr (ACE_INET_Addr &addr);
@@ -143,10 +155,10 @@ public:
TAO_Object_Table *userdef_lookup_strategy (void);
// return the lookup strategy
- void tablesize (CORBA_ULong tablesize);
+ void tablesize (CORBA::ULong tablesize);
// set the table size for lookup table
- CORBA_ULong tablesize (void);
+ CORBA::ULong tablesize (void);
// get the table size for the lookup table
protected:
@@ -177,7 +189,7 @@ private:
ForwardFunc forwarder_;
- CORBA_BOA_ptr oa_;
+ CORBA::BOA_ptr oa_;
// Pointer to One True Object Adapter
TAO_Demux_Strategy demux_;
@@ -186,7 +198,7 @@ private:
ACE_INET_Addr addr_;
// host + port number we are listening on
- CORBA_ULong tablesize_;
+ CORBA::ULong tablesize_;
// size of object lookup table
TAO_Object_Table *ot_;
@@ -196,8 +208,4 @@ private:
// Create a type for the singleton
typedef TAO_OA_Parameters TAO_OA_PARAMS;
-# if defined(__ACE_INLINE__)
-# include "params.i"
-# endif
-
#endif /* TAO_PARAMS_H */
diff --git a/TAO/tao/params.i b/TAO/tao/params.i
index de0a8bb3fe7..7b59f11bb5d 100644
--- a/TAO/tao/params.i
+++ b/TAO/tao/params.i
@@ -57,14 +57,14 @@ TAO_OA_Parameters::forwarder (TAO_OA_Parameters::ForwardFunc f)
forwarder_ = f;
}
-ACE_INLINE CORBA_BOA_ptr
+ACE_INLINE CORBA::BOA_ptr
TAO_OA_Parameters::oa (void)
{
return oa_;
}
ACE_INLINE void
-TAO_OA_Parameters::oa (CORBA_BOA_ptr anOA)
+TAO_OA_Parameters::oa (CORBA::BOA_ptr anOA)
{
oa_ = anOA;
}
@@ -99,19 +99,20 @@ TAO_OA_Parameters::demux_strategy (TAO_Demux_Strategy strategy)
this->demux_ = strategy; // Trust that the value is valid!
}
-ACE_INLINE TAO_OA_Parameters::TAO_Demux_Strategy
+//ACE_INLINE TAO_OA_Parameters::TAO_Demux_Strategy
+ACE_INLINE TAO_Demux_Strategy
TAO_OA_Parameters::demux_strategy (void)
{
return this->demux_;
}
ACE_INLINE void
-TAO_OA_Parameters::tablesize (CORBA_ULong tblsize)
+TAO_OA_Parameters::tablesize (CORBA::ULong tblsize)
{
this->tablesize_ = tblsize;
}
-ACE_INLINE CORBA_ULong
+ACE_INLINE CORBA::ULong
TAO_OA_Parameters::tablesize (void)
{
return this->tablesize_;
diff --git a/TAO/tao/principa.cpp b/TAO/tao/principa.cpp
index 2fae7546342..a1664b7047d 100644
--- a/TAO/tao/principa.cpp
+++ b/TAO/tao/principa.cpp
@@ -5,24 +5,28 @@
// ORB: Principal identifier pseudo-objref
//
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
#include "tao/orb.h"
#include "tao/principa.h"
+#endif
+
+#include "tao/corba.h"
void
-CORBA_release (CORBA_Principal_ptr principal)
+CORBA::release (CORBA::Principal_ptr principal)
{
if (principal)
principal->Release ();
}
-CORBA_Boolean
-CORBA_is_nil (CORBA_Principal_ptr principal)
+CORBA::Boolean
+CORBA::is_nil (CORBA::Principal_ptr principal)
{
- return (CORBA_Boolean) (principal == 0);
+ return (CORBA::Boolean) (principal == 0);
}
CORBA_Principal::CORBA_Principal (void)
diff --git a/TAO/tao/principa.h b/TAO/tao/principa.h
index 905dfc4a8e8..fbe2c8028af 100644
--- a/TAO/tao/principa.h
+++ b/TAO/tao/principa.h
@@ -23,6 +23,7 @@
#if !defined (TAO_PRINCIPAL_H)
# define TAO_PRINCIPAL_H
+#if 0
# include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
# include <objbase.h>
# include <initguid.h>
@@ -30,18 +31,15 @@
# include "ace/Synch.h"
# include "tao/sequence.h"
-
-extern "C" const IID IID_CORBA_Principal;
-
-void CORBA_release (CORBA_Principal_ptr principal);
-CORBA_Boolean CORBA_is_nil (CORBA_Principal_ptr principal);
+#endif
class ACE_Svc_Export CORBA_Principal : public IUnknown
{
public:
// To applications, the identifier is an opaque ID.
- CORBA_SEQUENCE <CORBA_Octet> id;
+ // CORBA::SEQUENCE <CORBA::Octet> id;
+ CORBA::OctetSeq id;
// XXX add "==", "<", ">" operators
@@ -61,8 +59,8 @@ private:
virtual ~CORBA_Principal (void);
// = these are not provided
- CORBA_Principal &operator = (const CORBA_Principal_ptr &);
- CORBA_Principal (const CORBA_Principal_ptr &);
+ CORBA_Principal &operator = (const CORBA::Principal_ptr &);
+ CORBA_Principal (const CORBA::Principal_ptr &);
#if defined (__GNUG__)
//
diff --git a/TAO/tao/request.cpp b/TAO/tao/request.cpp
index 98b2c05ea99..fb75df3cdc3 100644
--- a/TAO/tao/request.cpp
+++ b/TAO/tao/request.cpp
@@ -4,6 +4,7 @@
//
// Implementation of Dynamic Invocation Interface
//
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -12,6 +13,9 @@
#include "tao/stub.h"
#include "tao/cdr.h"
#include "tao/nvlist.h"
+#endif /* 0 */
+
+#include "tao/corba.h"
// {77420085-F276-11ce-9598-0000C07CA898}
DEFINE_GUID (IID_CORBA_Request,
@@ -60,55 +64,55 @@ CORBA_Request::QueryInterface (REFIID riid,
// Reference counting for DII Request object
void
-CORBA_release (CORBA_Request_ptr req)
+CORBA::release (CORBA::Request_ptr req)
{
if (req)
req->Release ();
}
-CORBA_Boolean
-CORBA_is_nil (CORBA_Request_ptr req)
+CORBA::Boolean
+CORBA::is_nil (CORBA::Request_ptr req)
{
- return (CORBA_Boolean) req == 0;
+ return (CORBA::Boolean) req == 0;
}
// DII Request class implementation
-CORBA_Request::CORBA_Request (CORBA_Object_ptr obj,
- const CORBA_Char *op,
- CORBA_NVList_ptr args,
- CORBA_NamedValue_ptr result,
- CORBA_Flags flags)
+CORBA_Request::CORBA_Request (CORBA::Object_ptr obj,
+ const CORBA::Char *op,
+ CORBA::NVList_ptr args,
+ CORBA::NamedValue_ptr result,
+ CORBA::Flags flags)
: _args (args),
_result (result),
_flags (flags),
refcount_ (1)
{
- _target = CORBA_Object::_duplicate (obj);
- _opname = CORBA_string_copy (op);
+ _target = CORBA::Object::_duplicate (obj);
+ _opname = CORBA::string_copy (op);
}
-CORBA_Request::CORBA_Request (CORBA_Object_ptr obj,
- const CORBA_Char *op)
+CORBA_Request::CORBA_Request (CORBA::Object_ptr obj,
+ const CORBA::Char *op)
: _flags (0),
refcount_ (1)
{
- _target = CORBA_Object::_duplicate (obj);
- _opname = CORBA_string_copy (op);
+ _target = CORBA::Object::_duplicate (obj);
+ _opname = CORBA::string_copy (op);
- _args = new CORBA_NVList;
- _result = new CORBA_NamedValue;
+ _args = new CORBA::NVList;
+ _result = new CORBA::NamedValue;
}
CORBA_Request::~CORBA_Request (void)
{
assert (refcount_ == 0);
- CORBA_release (_target);
- CORBA_string_free ((CORBA_String)_opname);
- CORBA_release (_args);
- CORBA_release (_result);
+ CORBA::release (_target);
+ CORBA::string_free ((CORBA::String)_opname);
+ CORBA::release (_args);
+ CORBA::release (_result);
}
// The public DII interfaces: normal and oneway calls.
@@ -126,12 +130,12 @@ CORBA_Request::invoke (void)
if (_target->QueryInterface (IID_STUB_Object,
(void **) &stub) != NOERROR)
{
- _env.exception (new CORBA_DATA_CONVERSION (COMPLETED_NO));
+ _env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return;
}
stub->do_dynamic_call ((char *)_opname,
- CORBA_B_TRUE,
+ CORBA::B_TRUE,
_args,
_result,
_flags,
@@ -148,12 +152,12 @@ CORBA_Request::send_oneway (void)
if (_target->QueryInterface (IID_STUB_Object,
(void **) &stub) != NOERROR)
{
- _env.exception (new CORBA_DATA_CONVERSION (COMPLETED_NO));
+ _env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));
return;
}
stub->do_dynamic_call ((char *)_opname,
- CORBA_B_TRUE,
+ CORBA::B_TRUE,
_args,
_result,
_flags,
diff --git a/TAO/tao/request.h b/TAO/tao/request.h
index 9d9cdf3f9d6..76f215bc537 100644
--- a/TAO/tao/request.h
+++ b/TAO/tao/request.h
@@ -21,30 +21,24 @@
#if !defined (TAO_REQUEST_H)
# define TAO_REQUEST_H
+#if 0
# include "ace/OS.h"
# include "tao/sequence.h"
# include "tao/except.h"
-
-void ACE_Svc_Export CORBA_release (CORBA_Request_ptr req);
-CORBA_Boolean ACE_Svc_Export CORBA_is_nil (CORBA_Request_ptr req);
-
-typedef CORBA_SEQUENCE <CORBA_TypeCode_ptr> CORBA_ExceptionList;
-typedef CORBA_ExceptionList *CORBA_ExceptionList_ptr;
-
-extern "C" const IID IID_CORBA_Request;
+#endif
class ACE_Svc_Export CORBA_Request : public IUnknown
{
public:
// XXX these should not be inlined
- CORBA_Object_ptr target (void) const { return _target; }
- const CORBA_Char *operation (void) const { return _opname; }
- CORBA_NVList_ptr arguments (void) { return _args; }
- CORBA_NamedValue_ptr result (void) { return _result; }
- CORBA_ExceptionList_ptr exceptions (void) { return &_exceptions; }
- CORBA_Environment *env (void) { return &_env; }
+ CORBA::Object_ptr target (void) const { return _target; }
+ const CORBA::Char *operation (void) const { return _opname; }
+ CORBA::NVList_ptr arguments (void) { return _args; }
+ CORBA::NamedValue_ptr result (void) { return _result; }
+ CORBA::ExceptionList_ptr exceptions (void) { return &_exceptions; }
+ CORBA::Environment *env (void) { return &_env; }
void invoke (void);
void send_oneway (void);
@@ -59,24 +53,24 @@ public:
private:
friend class CORBA_Object;
- CORBA_Request (CORBA_Object_ptr obj,
- const CORBA_Char *op,
- CORBA_NVList_ptr args,
- CORBA_NamedValue_ptr result,
- CORBA_Flags flags);
+ CORBA_Request (CORBA::Object_ptr obj,
+ const CORBA::Char *op,
+ CORBA::NVList_ptr args,
+ CORBA::NamedValue_ptr result,
+ CORBA::Flags flags);
- CORBA_Request (CORBA_Object_ptr obj,
- const CORBA_Char *op);
+ CORBA_Request (CORBA::Object_ptr obj,
+ const CORBA::Char *op);
virtual ~CORBA_Request (void);
- CORBA_Object_ptr _target;
- const CORBA_Char *_opname;
- CORBA_NVList_ptr _args;
- CORBA_NamedValue_ptr _result;
- CORBA_Flags _flags;
- CORBA_Environment _env;
- CORBA_ExceptionList _exceptions;
+ CORBA::Object_ptr _target;
+ const CORBA::Char *_opname;
+ CORBA::NVList_ptr _args;
+ CORBA::NamedValue_ptr _result;
+ CORBA::Flags _flags;
+ CORBA::Environment _env;
+ CORBA::ExceptionList _exceptions;
ACE_SYNCH_MUTEX lock_;
u_int refcount_;
diff --git a/TAO/tao/roa.cpp b/TAO/tao/roa.cpp
index 39a97bfa2f5..f691eec48f9 100644
--- a/TAO/tao/roa.cpp
+++ b/TAO/tao/roa.cpp
@@ -1,5 +1,6 @@
// $Id$
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -15,22 +16,25 @@
#include "tao/orbobj.h"
#include "tao/nvlist.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
// Forward declarations...
static void request_dispatcher (GIOP::RequestHeader &req,
CDR &request_body,
CDR *reply,
TAO_Dispatch_Context *context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
static GIOP::LocateStatusType request_forwarder (opaque &target_key,
- CORBA_Object_ptr &forward_reference,
+ CORBA::Object_ptr &forward_reference,
TAO_Dispatch_Context *ctx);
ROA_ptr
-ROA::init (CORBA_ORB_ptr parent,
+ROA::init (CORBA::ORB_ptr parent,
ACE_INET_Addr &,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
env.clear ();
TAO_OA_Parameters *p = TAO_OA_PARAMS::instance ();
@@ -39,7 +43,7 @@ ROA::init (CORBA_ORB_ptr parent,
if (p->oa ())
{
- env.exception (new CORBA_INITIALIZE (COMPLETED_NO));
+ env.exception (new CORBA_INITIALIZE (CORBA::COMPLETED_NO));
return 0;
}
@@ -54,15 +58,15 @@ ROA::init (CORBA_ORB_ptr parent,
return rp;
}
-ROA::ROA (CORBA_ORB_ptr owning_orb,
- CORBA_Environment &)
- : do_exit_ (CORBA_B_FALSE),
+ROA::ROA (CORBA::ORB_ptr owning_orb,
+ CORBA::Environment &)
+ : do_exit_ (CORBA::B_FALSE),
orb_ (owning_orb),
call_count_ (0),
skeleton_ (0)
{
TAO_OA_Parameters *p = TAO_OA_PARAMS::instance ();
- TAO_Server_Factory &f = owning_orb->server_factory ();
+ TAO_Server_Strategy_Factory &f = owning_orb->server_factory ();
ACE_ASSERT (p->oa () == 0);
@@ -91,7 +95,7 @@ ROA::~ROA (void)
int
ROA::handle_message (TAO_Dispatch_Context &ctx,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
int result =
GIOP::incoming_message (ctx.endpoint_,
@@ -109,22 +113,22 @@ ROA::handle_message (TAO_Dispatch_Context &ctx,
// Create an objref
-CORBA_Object_ptr
-ROA::create (CORBA_OctetSeq &key,
- CORBA_String type_id,
- CORBA_Environment &env)
+CORBA::Object_ptr
+ROA::create (CORBA::OctetSeq &key,
+ CORBA::String type_id,
+ CORBA::Environment &env)
{
- CORBA_String id;
+ CORBA::String id;
IIOP_Object *data;
if (type_id)
- id = CORBA_string_copy (type_id);
+ id = CORBA::string_copy (type_id);
else
id = 0;
IIOP::Version ver (IIOP::MY_MAJOR, IIOP::MY_MINOR);
// Cast below de-warns on Sun's C++
- CORBA_String h = (char*)addr_.get_host_name ();
+ CORBA::String h = (char*)addr_.get_host_name ();
data = new IIOP_Object (id, IIOP::ProfileBody (ver,
h,
@@ -134,16 +138,16 @@ ROA::create (CORBA_OctetSeq &key,
env.clear ();
else
{
- env.exception (new CORBA_NO_MEMORY (COMPLETED_NO));
+ env.exception (new CORBA_NO_MEMORY (CORBA::COMPLETED_NO));
return 0;
}
- // Return the CORBA_Object_ptr interface to this objref.
- CORBA_Object_ptr new_obj;
+ // Return the CORBA::Object_ptr interface to this objref.
+ CORBA::Object_ptr new_obj;
if (data->QueryInterface (IID_CORBA_Object,
(void**)&new_obj) != NOERROR)
- env.exception (new CORBA_INTERNAL (COMPLETED_NO));
+ env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO));
data->Release ();
return new_obj;
@@ -151,12 +155,12 @@ ROA::create (CORBA_OctetSeq &key,
// Return the key fed into an object at creation time.
-CORBA_OctetSeq *
-ROA::get_key (CORBA_Object_ptr,
- CORBA_Environment &env)
+CORBA::OctetSeq *
+ROA::get_key (CORBA::Object_ptr,
+ CORBA::Environment &env)
{
// XXX implement me ! ... must have been created by this OA.
- env.exception (new CORBA_IMP_LIMIT (COMPLETED_NO));
+ env.exception (new CORBA_IMP_LIMIT (CORBA::COMPLETED_NO));
return 0;
}
@@ -166,8 +170,8 @@ ROA::get_key (CORBA_Object_ptr,
// NOTE: as with all "in" parameters to a call, this memory is freed
// by the ORB not by the object implementation.
-CORBA_OctetSeq *
-TCP_OA::get_target_key (CORBA_Environment &env)
+CORBA::OctetSeq *
+TCP_OA::get_target_key (CORBA::Environment &env)
{
env.clear ();
@@ -179,8 +183,8 @@ TCP_OA::get_target_key (CORBA_Environment &env)
// NOTE: as with all "in" parameters to a call, this memory is freed
// by the ORB not by the object implementation.
-CORBA_Principal_ptr
-ROA::get_client_principal (CORBA_Environment &env)
+CORBA::Principal_ptr
+ROA::get_client_principal (CORBA::Environment &env)
{
env.clear ();
@@ -190,17 +194,17 @@ ROA::get_client_principal (CORBA_Environment &env)
// Used by method code to ask the OA to shut down.
void
-ROA::please_shutdown (CORBA_Environment &env)
+ROA::please_shutdown (CORBA::Environment &env)
{
ACE_MT (ACE_GUARD (ACE_Thread_Mutex, roa_mon, lock_));
env.clear ();
- do_exit_ = CORBA_B_TRUE;
+ do_exit_ = CORBA::B_TRUE;
}
// Used by non-method code to tell the OA to shut down.
void
-ROA::clean_shutdown (CORBA_Environment &env)
+ROA::clean_shutdown (CORBA::Environment &env)
{
ACE_MT (ACE_GUARD (ACE_Thread_Mutex, roa_mon, lock_));
@@ -209,7 +213,7 @@ ROA::clean_shutdown (CORBA_Environment &env)
if (call_count_ != 0)
{
dmsg ("called clean_shutdown with requests outstanding");
- env.exception (new CORBA_BAD_INV_ORDER (COMPLETED_NO));
+ env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO));
return;
}
@@ -219,12 +223,12 @@ ROA::clean_shutdown (CORBA_Environment &env)
// For BOA -- BOA operations for which we provide the vtable entry
void
-ROA::register_dir (CORBA_BOA::dsi_handler handler,
- void *ctx, CORBA_Environment &env)
+ROA::register_dir (CORBA::BOA::dsi_handler handler,
+ void *ctx, CORBA::Environment &env)
{
if (handler == 0)
{
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return;
}
@@ -292,7 +296,7 @@ request_dispatcher (GIOP::RequestHeader &req,
CDR &request_body,
CDR *reply,
TAO_Dispatch_Context *helper,
- CORBA_Environment &env)
+ CORBA::Environment &env)
{
TAO_OA_Parameters *p = TAO_OA_PARAMS::instance ();
IIOP_ServerRequest svr_req (&request_body,
@@ -311,8 +315,8 @@ request_dispatcher (GIOP::RequestHeader &req,
(void) ACE_Thread::setspecific (p->oa ().req_key_, &req);
#endif /* ROA_NEEDS_REQ_KEY */
- CORBA_BOA_ptr oa = p->oa ();
- CORBA_BOA::dsi_handler ptmf = helper->skeleton_;
+ CORBA::BOA_ptr oa = p->oa ();
+ CORBA::BOA::dsi_handler ptmf = helper->skeleton_;
(oa->*ptmf) (req.object_key, svr_req, helper->context_, env);
// is this the correct way to do it? skeleton is a member function
@@ -335,36 +339,36 @@ request_dispatcher (GIOP::RequestHeader &req,
// reported using the other mechanism could be "lost". Perhaps only
// the language mapped one should be used for system exceptions.
- CORBA_TypeCode_ptr tc;
+ CORBA::TypeCode_ptr tc;
const void *value;
if (!svr_req._params && env.exception () == 0)
{
dmsg ("DSI user error, didn't supply params");
- env.exception (new CORBA_BAD_INV_ORDER (COMPLETED_NO));
+ env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO));
}
if (env.exception () != 0)
{ // standard exceptions only
- CORBA_Environment env2;
- CORBA_Exception *x = env.exception ();
- CORBA_TypeCode_ptr except_tc = x->type ();
+ CORBA::Environment env2;
+ CORBA::Exception *x = env.exception ();
+ CORBA::TypeCode_ptr except_tc = x->type ();
reply->put_ulong (GIOP::SYSTEM_EXCEPTION);
(void) reply->encode (except_tc, x, 0, env2);
}
else if (svr_req._exception)
{ // any exception at all
- CORBA_Exception *x;
- CORBA_TypeCode_ptr except_tc;
+ CORBA::Exception *x;
+ CORBA::TypeCode_ptr except_tc;
- x = (CORBA_Exception *) svr_req._exception->value ();
+ x = (CORBA::Exception *) svr_req._exception->value ();
except_tc = svr_req._exception->type ();
// Finish the GIOP Reply header, then marshal the exception.
//
// XXX x->type () someday ...
- if (svr_req._ex_type == SYSTEM_EXCEPTION)
+ if (svr_req._ex_type == CORBA::SYSTEM_EXCEPTION)
reply->put_ulong (GIOP::SYSTEM_EXCEPTION);
else
reply->put_ulong (GIOP::USER_EXCEPTION);
@@ -387,10 +391,10 @@ request_dispatcher (GIOP::RequestHeader &req,
// ... followed by "inout" and "out" parameters, left to right
for (u_int i = 0; i < svr_req._params->count (); i++)
{
- CORBA_NamedValue_ptr nv = svr_req._params->item (i);
- CORBA_Any_ptr any;
+ CORBA::NamedValue_ptr nv = svr_req._params->item (i);
+ CORBA::Any_ptr any;
- if (!(nv->flags () & (CORBA_ARG_INOUT|CORBA_ARG_OUT)))
+ if (!(nv->flags () & (CORBA::ARG_INOUT|CORBA::ARG_OUT)))
continue;
any = nv->value ();
@@ -406,10 +410,10 @@ request_dispatcher (GIOP::RequestHeader &req,
static GIOP::LocateStatusType
request_forwarder (opaque &target_key,
- CORBA_Object_ptr &forward_reference,
+ CORBA::Object_ptr &forward_reference,
TAO_Dispatch_Context *helper)
{
- CORBA_Environment env;
+ CORBA::Environment env;
assert (helper->check_forward_ != 0);
helper->check_forward_ (target_key, forward_reference, helper->context_, env);
diff --git a/TAO/tao/roa.h b/TAO/tao/roa.h
index 639d78ddc07..19561cc7ed1 100644
--- a/TAO/tao/roa.h
+++ b/TAO/tao/roa.h
@@ -18,26 +18,26 @@
#if !defined (ACE_ROA_H)
# define ACE_ROA_H
+#if 0
# include "ace/INET_Addr.h"
# include "tao/boa.h"
# include "tao/params.h"
# include "tao/connect.h"
+#endif
class ACE_Svc_Export ROA;
typedef ROA* ROA_ptr;
-extern "C" const IID IID_ROA;
-
-class ACE_Svc_Export ROA : public CORBA_BOA
+class ACE_Svc_Export ROA : public CORBA::BOA
// = TITLE
// Realtime Object Adapter class.
{
public:
// = ROA Support
- static ROA_ptr init (CORBA_ORB_ptr which_orb,
+ static ROA_ptr init (CORBA::ORB_ptr which_orb,
ACE_INET_Addr &addr,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// NON-STANDARD CALL. According to CORBA V2.0, this functionality
// should really be <ROA_ptr ORB::ROA_init (argc,argv,ident)>.
//
@@ -45,57 +45,57 @@ public:
// the SunSoft IIOP reference implementation.
- void clean_shutdown (CORBA_Environment &env);
+ void clean_shutdown (CORBA::Environment &env);
// NON-STANDARD CALL. OA user asks for a clean shutdown of the OA
// after currently active calls complete. OA "requester" (calls
// <get_request>) asks if we're shutting down, and if so closes down
// transport cleanly.
- CORBA_Boolean shutting_down (void);
+ CORBA::Boolean shutting_down (void);
// NON-STANDARD CALL. Returns <TRUE> if we're in the process of
// shutting down.
- CORBA_OctetSeq *get_key (CORBA_Object_ptr obj,
- CORBA_Environment &env);
+ CORBA::OctetSeq *get_key (CORBA::Object_ptr obj,
+ CORBA::Environment &env);
// NON-STANDARD CALL. When dispatching a request to an object, you
// need to be able to get the object key you used to create the
// reference. It's the main way servers distinguish two object
// references from each other.
- virtual CORBA_ORB_ptr orb (void) const;
+ virtual CORBA::ORB_ptr orb (void) const;
// Returns pointer to the ORB with which this OA is associated.
// SHOULD PROBABLY MOVE TO BOA!
// @@ Please make sure that all macros start with TAO_ ...
#if defined (ROA_NEEDS_REQ_KEY)
- CORBA_OctetSeq *get_target_key (CORBA_Environment &env);
- CORBA_Principal_ptr get_client_principal (CORBA_Environment &env);
+ CORBA::OctetSeq *get_target_key (CORBA::Environment &env);
+ CORBA::Principal_ptr get_client_principal (CORBA::Environment &env);
#endif /* ROA_NEEDSS_REQ_KEY */
virtual int handle_message (TAO_Dispatch_Context &context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// Reads incoming GIOP messages, dispatches them, and sends back any
// required replies. Returns 1 for success, 0==EOF, -1==error.
// = BOA Support
// @@ Please add comments.
- CORBA_Object_ptr create (CORBA_OctetSeq &obj_id,
- CORBA_String type_id,
- CORBA_Environment &env);
+ CORBA::Object_ptr create (CORBA::OctetSeq &obj_id,
+ CORBA::String type_id,
+ CORBA::Environment &env);
- void register_dir (CORBA_BOA::dsi_handler handler,
+ void register_dir (CORBA::BOA::dsi_handler handler,
void *context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
- void please_shutdown (CORBA_Environment &env);
+ void please_shutdown (CORBA::Environment &env);
// = COM IUnknown Support
ULONG __stdcall AddRef (void);
ULONG __stdcall Release (void);
HRESULT __stdcall QueryInterface (REFIID riid, void** ppv);
- ROA (CORBA_ORB_ptr orb_arg,
- CORBA_Environment &env);
+ ROA (CORBA::ORB_ptr orb_arg,
+ CORBA::Environment &env);
virtual ~ROA (void);
virtual ACE_INET_Addr get_addr (void) const;
@@ -105,13 +105,13 @@ private:
// The address of the endpoint on which we're listening for
// connections and requests.
- CORBA_Boolean do_exit_;
+ CORBA::Boolean do_exit_;
// Flag set by <clean_shutdown ()>.
ROA_Acceptor client_acceptor_;
// The acceptor listening for requests.
- CORBA_ORB_ptr orb_;
+ CORBA::ORB_ptr orb_;
// Pointer to our ORB.
u_int call_count_;
@@ -120,7 +120,7 @@ private:
u_int refcount_;
// Used by COM stuff
- CORBA_BOA::dsi_handler skeleton_;
+ CORBA::BOA::dsi_handler skeleton_;
// Skeleton function
void *context_;
@@ -143,8 +143,4 @@ private:
ROA &operator= (const ROA &src);
};
-# if defined (__ACE_INLINE__)
-# include "roa.i"
-# endif /* __ACE_INLINE__ */
-
#endif /* TAO_ROA_H */
diff --git a/TAO/tao/roa.i b/TAO/tao/roa.i
index 49227ffea8f..8e0c6634efa 100644
--- a/TAO/tao/roa.i
+++ b/TAO/tao/roa.i
@@ -1,10 +1,10 @@
-ACE_INLINE CORBA_Boolean
+ACE_INLINE CORBA::Boolean
ROA::shutting_down (void)
{
return do_exit_;
}
-ACE_INLINE CORBA_ORB_ptr
+ACE_INLINE CORBA::ORB_ptr
ROA::orb (void) const
{
return orb_;
diff --git a/TAO/tao/sequence.h b/TAO/tao/sequence.h
index 4bfaedebacf..fafadf18d79 100644
--- a/TAO/tao/sequence.h
+++ b/TAO/tao/sequence.h
@@ -18,11 +18,11 @@
template <class T>
struct CORBA_SEQUENCE
-// = TITLE
-// Utility template class.
-//
-// = DESCRIPTION
{
+ // = TITLE
+ // Utility template class.
+ //
+ // = DESCRIPTION
#if SIZEOF_LONG == 4
u_long maximum;
u_long length;
@@ -40,6 +40,8 @@ struct CORBA_SEQUENCE
~CORBA_SEQUENCE (void) { }
};
+#if 0
typedef CORBA_SEQUENCE <CORBA_Octet> CORBA_OctetSeq;
+#endif
#endif /* TAO_SEQUENCE_H */
diff --git a/TAO/tao/server_factory.cpp b/TAO/tao/server_factory.cpp
index a7e68f1b01a..748081faf1d 100644
--- a/TAO/tao/server_factory.cpp
+++ b/TAO/tao/server_factory.cpp
@@ -13,9 +13,13 @@
// $Id$
// ============================================================================
+#if 0
#if !defined (__ACE_INLINE__)
# include "server_factory.i"
#endif /* __ACE_INLINE__ */
+#endif /* 0 */
+
+#include "tao/corba.h"
TAO_Server_Strategy_Factory::TAO_Server_Strategy_Factory (void)
{}
diff --git a/TAO/tao/server_factory.h b/TAO/tao/server_factory.h
index 8db824df408..c2c7db2b50c 100644
--- a/TAO/tao/server_factory.h
+++ b/TAO/tao/server_factory.h
@@ -18,6 +18,7 @@
#if !defined (TAO_SERVER_FACTORY_H)
# define TAO_SERVER_FACTORY_H
+#if 0
# include "ace/SOCK_Acceptor.h"
# include "ace/Svc_Handler.h"
# include "ace/Strategies_T.h"
@@ -27,6 +28,7 @@
# include "tao/connect.h"
# include "tao/objtable.h"
+#endif /* 0 */
class TAO_Server_Strategy_Factory : public ACE_Service_Object
// = TITLE
@@ -71,9 +73,4 @@ public:
// Return the concrete object lookup strategy.
};
-
-# if defined(__ACE_INLINE__)
-# include "server_factory.i"
-# endif /* __ACE_INLINE__ */
-
#endif /* TAO_SERVER_FACTORY_H */
diff --git a/TAO/tao/server_factory.i b/TAO/tao/server_factory.i
index e69de29bb2d..8b137891791 100644
--- a/TAO/tao/server_factory.i
+++ b/TAO/tao/server_factory.i
@@ -0,0 +1 @@
+
diff --git a/TAO/tao/svrrqst.cpp b/TAO/tao/svrrqst.cpp
index 0468d6ccd2a..0f69e523873 100644
--- a/TAO/tao/svrrqst.cpp
+++ b/TAO/tao/svrrqst.cpp
@@ -4,6 +4,7 @@
//
// Implementation of the Dynamic Server Skeleton Interface
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -13,6 +14,9 @@
#include "tao/svrrqst.h"
#include "tao/nvlist.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
// {77420086-F276-11ce-9598-0000C07CA898}
DEFINE_GUID (IID_IIOP_ServerRequest,
@@ -31,7 +35,7 @@ IIOP_ServerRequest::~IIOP_ServerRequest (void)
ACE_ASSERT (refcount_ == 0);
if (_params)
- CORBA_release (_params);
+ CORBA::release (_params);
if (_retval)
delete _retval;
if (_exception)
@@ -86,8 +90,8 @@ IIOP_ServerRequest::QueryInterface (REFIID riid,
// inout/out/return values later on.
void __stdcall
-IIOP_ServerRequest::params (CORBA_NVList_ptr list,
- CORBA_Environment &env)
+IIOP_ServerRequest::params (CORBA::NVList_ptr list,
+ CORBA::Environment &env)
{
env.clear ();
@@ -97,14 +101,14 @@ IIOP_ServerRequest::params (CORBA_NVList_ptr list,
// Then unmarshal each "in" and "inout" parameter
for (u_int i = 0; i < list->count (); i++)
{
- CORBA_NamedValue_ptr nv;
- CORBA_Any_ptr any;
- CORBA_TypeCode_ptr tc;
+ CORBA::NamedValue_ptr nv;
+ CORBA::Any_ptr any;
+ CORBA::TypeCode_ptr tc;
void *value;
nv = list->item (i);
- if (ACE_BIT_DISABLED (nv->flags (), CORBA_ARG_IN | CORBA_ARG_INOUT))
+ if (ACE_BIT_DISABLED (nv->flags (), CORBA::ARG_IN | CORBA::ARG_INOUT))
continue;
// First, make sure the memory into which we'll be unmarshaling
@@ -120,7 +124,7 @@ IIOP_ServerRequest::params (CORBA_NVList_ptr list,
tc = any->type ();
tc->AddRef ();
ACE_NEW (value, char [tc->size (env)]);
- any->replace (tc, value, CORBA_B_TRUE, env);
+ any->replace (tc, value, CORBA::B_TRUE, env);
// Decrement the refcount of "tc".
//
@@ -144,7 +148,7 @@ IIOP_ServerRequest::params (CORBA_NVList_ptr list,
{
dmsg1 ("params (), %d bytes remaining (error)",
_incoming->bytes_remaining ());
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
}
}
@@ -153,13 +157,13 @@ IIOP_ServerRequest::params (CORBA_NVList_ptr list,
// only after the parameter list has been provided (maybe empty).
void __stdcall
-IIOP_ServerRequest::result (CORBA_Any_ptr value,
- CORBA_Environment &env)
+IIOP_ServerRequest::result (CORBA::Any_ptr value,
+ CORBA::Environment &env)
{
env.clear ();
if (!_params || _retval || _exception)
- env.exception (new CORBA_BAD_INV_ORDER (COMPLETED_NO));
+ env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO));
else
_retval = value;
@@ -169,12 +173,12 @@ IIOP_ServerRequest::result (CORBA_Any_ptr value,
// Store the exception value.
void __stdcall
-IIOP_ServerRequest::exception (CORBA_ExceptionType type,
- CORBA_Any_ptr value,
- CORBA_Environment &env)
+IIOP_ServerRequest::exception (CORBA::ExceptionType type,
+ CORBA::Any_ptr value,
+ CORBA::Environment &env)
{
if (!_params || _retval || _exception)
- env.exception (new CORBA_BAD_INV_ORDER (COMPLETED_NO));
+ env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO));
else
{
env.clear ();
@@ -187,33 +191,33 @@ IIOP_ServerRequest::exception (CORBA_ExceptionType type,
// Invocation attributes.
-CORBA_String __stdcall
+CORBA::String __stdcall
IIOP_ServerRequest::op_name (void)
{
return _opname;
}
-CORBA_Object_ptr __stdcall
+CORBA::Object_ptr __stdcall
IIOP_ServerRequest::target (void)
{
// XXX implement me!! Code from TCP_OA exists ...
return 0;
}
-CORBA_Principal_ptr __stdcall
+CORBA::Principal_ptr __stdcall
IIOP_ServerRequest::caller (void)
{
// XXX ... return client's principal
return 0;
}
-CORBA_ORB_ptr __stdcall
+CORBA::ORB_ptr __stdcall
IIOP_ServerRequest::orb (void)
{
return _orb;
}
-CORBA_BOA_ptr __stdcall
+CORBA::BOA_ptr __stdcall
IIOP_ServerRequest::oa (void)
{
return _boa;
diff --git a/TAO/tao/svrrqst.h b/TAO/tao/svrrqst.h
index 18a047f32ec..e63f09405de 100644
--- a/TAO/tao/svrrqst.h
+++ b/TAO/tao/svrrqst.h
@@ -24,38 +24,35 @@
#if !defined (TAO_SVRRQST_H)
#define TAO_SVRRQST_H
+#if 0
#include "ace/OS.h"
#include "tao/cdr.h"
-
-void CORBA_release (CORBA_ServerRequest_ptr req);
-CORBA_Boolean CORBA_is_nil (CORBA_ServerRequest_ptr req);
-
-extern "C" const IID IID_CORBA_ServerRequest;
+#endif
class ACE_Svc_Export CORBA_ServerRequest : public IUnknown
-// = TITLE
-// XXX this is currently in an intermediate state; this is not
-// supposed to be IIOP-specific, or to expose quite so many
-// implementation details, but right now it is.
{
+ // = TITLE
+ // XXX this is currently in an intermediate state; this is not
+ // supposed to be IIOP-specific, or to expose quite so many
+ // implementation details, but right now it is.
public:
- virtual void __stdcall params (CORBA_NVList_ptr list,
- CORBA_Environment &env) = 0;
+ virtual void __stdcall params (CORBA::NVList_ptr list,
+ CORBA::Environment &env) = 0;
// Implementation uses this to provide the ORB with the operation's
// parameter list ... on return, their values are available; the
// list fed in has typecodes and (perhap) memory assigned.
- virtual void __stdcall result (CORBA_Any_ptr value,
- CORBA_Environment &env) = 0;
+ virtual void __stdcall result (CORBA::Any_ptr value,
+ CORBA::Environment &env) = 0;
// Implementation uses this to provide the operation result
// ... illegal if exception() was called or params() was not called.
//
// XXX Implementation should be able to assume response has been
// sent when this returns, and reclaim memory it allocated.
- virtual void __stdcall exception (CORBA_ExceptionType type,
- CORBA_Any_ptr value,
- CORBA_Environment &env) = 0;
+ virtual void __stdcall exception (CORBA::ExceptionType type,
+ CORBA::Any_ptr value,
+ CORBA::Environment &env) = 0;
// Implementation uses this to provide the exception value which is
// the only result of this particular invocation.
//
@@ -72,44 +69,42 @@ public:
// basic CORBA Object Model.
//
// XXX should not be not assuming all OAs implement the BOA API !!
- virtual CORBA_Principal_ptr __stdcall caller (void) = 0;
- virtual CORBA_Object_ptr __stdcall target (void) = 0;
- virtual CORBA_String __stdcall op_name (void) = 0;
- virtual CORBA_BOA_ptr __stdcall oa (void) = 0;
- virtual CORBA_ORB_ptr __stdcall orb (void) = 0;
+ virtual CORBA::Principal_ptr __stdcall caller (void) = 0;
+ virtual CORBA::Object_ptr __stdcall target (void) = 0;
+ virtual CORBA::String __stdcall op_name (void) = 0;
+ virtual CORBA::BOA_ptr __stdcall oa (void) = 0;
+ virtual CORBA::ORB_ptr __stdcall orb (void) = 0;
};
-extern "C" const IID IID_IIOP_ServerRequest;
-
-class ACE_Svc_Export IIOP_ServerRequest : public CORBA_ServerRequest
+class ACE_Svc_Export IIOP_ServerRequest : public CORBA::ServerRequest
{
public:
// Constructor, destructor
IIOP_ServerRequest (CDR *msg,
- CORBA_ORB_ptr the_orb,
- CORBA_BOA_ptr the_boa);
+ CORBA::ORB_ptr the_orb,
+ CORBA::BOA_ptr the_boa);
virtual ~IIOP_ServerRequest (void);
// = General ServerRequest operations
- void __stdcall params (CORBA_NVList_ptr list,
- CORBA_Environment &env);
+ void __stdcall params (CORBA::NVList_ptr list,
+ CORBA::Environment &env);
- void __stdcall result (CORBA_Any_ptr value,
- CORBA_Environment &env);
+ void __stdcall result (CORBA::Any_ptr value,
+ CORBA::Environment &env);
- void __stdcall exception (CORBA_ExceptionType type,
- CORBA_Any_ptr value,
- CORBA_Environment &env);
+ void __stdcall exception (CORBA::ExceptionType type,
+ CORBA::Any_ptr value,
+ CORBA::Environment &env);
// = Request attributes
- CORBA_String __stdcall op_name (void);
- CORBA_Principal_ptr __stdcall caller (void);
- CORBA_Object_ptr __stdcall target (void);
- CORBA_ORB_ptr __stdcall orb (void);
- CORBA_BOA_ptr __stdcall oa (void);
+ CORBA::String __stdcall op_name (void);
+ CORBA::Principal_ptr __stdcall caller (void);
+ CORBA::Object_ptr __stdcall target (void);
+ CORBA::ORB_ptr __stdcall orb (void);
+ CORBA::BOA_ptr __stdcall oa (void);
// Stuff required for COM IUnknown support
@@ -119,12 +114,12 @@ public:
void **ppv);
// private:
- CORBA_String _opname;
+ CORBA::String _opname;
CDR *_incoming;
- CORBA_NVList_ptr _params;
- CORBA_Any_ptr _retval;
- CORBA_Any_ptr _exception;
- CORBA_ExceptionType _ex_type;
+ CORBA::NVList_ptr _params;
+ CORBA::Any_ptr _retval;
+ CORBA::Any_ptr _exception;
+ CORBA::ExceptionType _ex_type;
void release (void) { refcount_--; }
// Just drop the refcount, don't destroy the object; most of these
@@ -135,13 +130,9 @@ private:
u_int refcount_;
- CORBA_ORB_ptr _orb;
+ CORBA::ORB_ptr _orb;
- CORBA_BOA_ptr _boa;
+ CORBA::BOA_ptr _boa;
};
-# if defined(__ACE_INLINE__)
-# include "svrrqst.i"
-# endif
-
#endif /* TAO_SVRRQST_H */
diff --git a/TAO/tao/svrrqst.i b/TAO/tao/svrrqst.i
index 8429bc5fb2c..4a9967ab70e 100644
--- a/TAO/tao/svrrqst.i
+++ b/TAO/tao/svrrqst.i
@@ -1,12 +1,12 @@
ACE_INLINE
IIOP_ServerRequest::IIOP_ServerRequest(CDR *msg,
- CORBA_ORB_ptr the_orb,
- CORBA_BOA_ptr the_boa)
+ CORBA::ORB_ptr the_orb,
+ CORBA::BOA_ptr the_boa)
: _incoming (msg),
_params (0),
_retval (0),
_exception (0),
- _ex_type (NO_EXCEPTION),
+ _ex_type (CORBA::NO_EXCEPTION),
refcount_ (1),
_orb (the_orb),
_boa (the_boa)
diff --git a/TAO/tao/tc_const.cpp b/TAO/tao/tc_const.cpp
index 66a413dca2b..5c65f8b685b 100644
--- a/TAO/tao/tc_const.cpp
+++ b/TAO/tao/tc_const.cpp
@@ -14,108 +14,112 @@
// THREADING NOTE: no issues, these are immutable constants
//
+#if 0
#include "tao/orb.h"
#include "tao/typecode.h"
+#endif
+
+#include "tao/corba.h"
// Null and void
-static CORBA_TypeCode tc_null (tk_null);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Null = (CORBA_TypeCode_ptr) &tc_null;
+static CORBA::TypeCode tc_null (CORBA::tk_null);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_null = (CORBA::TypeCode_ptr) &tc_null;
-CORBA_TypeCode_ptr
-CORBA_TypeCode::_nil (void)
+CORBA::TypeCode_ptr
+CORBA::TypeCode::_nil (void)
{
return &tc_null;
}
-static CORBA_TypeCode tc_void (tk_void);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Void = &tc_void;
+static CORBA::TypeCode tc_void (CORBA::tk_void);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_void = &tc_void;
// Basic numeric types: short, long, longlong, and unsigned variants
-static CORBA_TypeCode tc_short (tk_short);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Short = &tc_short;
+static CORBA::TypeCode tc_short (CORBA::tk_short);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_short = &tc_short;
-static CORBA_TypeCode tc_long (tk_long);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Long = &tc_long;
+static CORBA::TypeCode tc_long (CORBA::tk_long);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_long = &tc_long;
-static CORBA_TypeCode tc_longlong (tk_longlong);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_LongLong = &tc_longlong;
+static CORBA::TypeCode tc_longlong (CORBA::tk_longlong);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_longlong = &tc_longlong;
-static CORBA_TypeCode tc_ushort (tk_ushort);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_UShort = &tc_ushort;
+static CORBA::TypeCode tc_ushort (CORBA::tk_ushort);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_ushort = &tc_ushort;
-static CORBA_TypeCode tc_ulong (tk_ulong);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_ULong = &tc_ulong;
+static CORBA::TypeCode tc_ulong (CORBA::tk_ulong);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_ulong = &tc_ulong;
-static CORBA_TypeCode tc_ulonglong (tk_ulonglong);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_ULongLong = &tc_ulonglong;
+static CORBA::TypeCode tc_ulonglong (CORBA::tk_ulonglong);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_ulonglong = &tc_ulonglong;
// Floating point types: single, double, quad precision
-static CORBA_TypeCode tc_float (tk_float);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Float = &tc_float;
+static CORBA::TypeCode tc_float (CORBA::tk_float);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_float = &tc_float;
-static CORBA_TypeCode tc_double (tk_double);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Double = &tc_double;
+static CORBA::TypeCode tc_double (CORBA::tk_double);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_double = &tc_double;
-static CORBA_TypeCode tc_longdouble (tk_longdouble);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_LongDouble = &tc_longdouble;
+static CORBA::TypeCode tc_longdouble (CORBA::tk_longdouble);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_longdouble = &tc_longdouble;
// Various simple quantities
-static CORBA_TypeCode tc_boolean (tk_boolean);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Boolean = &tc_boolean;
+static CORBA::TypeCode tc_boolean (CORBA::tk_boolean);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_boolean = &tc_boolean;
-static CORBA_TypeCode tc_octet (tk_octet);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Octet = &tc_octet;
+static CORBA::TypeCode tc_octet (CORBA::tk_octet);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_octet = &tc_octet;
// Internationalization-related data types: ISO Latin/1 and "wide"
// characters, and strings of each. "wchar" is probably Unicode 1.1,
// "wstring" being null-terminated sets thereof.
-static CORBA_TypeCode tc_char (tk_char);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Char = &tc_char;
+static CORBA::TypeCode tc_char (CORBA::tk_char);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_char = &tc_char;
-static CORBA_TypeCode tc_wchar (tk_wchar);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_WChar = &tc_wchar;
+static CORBA::TypeCode tc_wchar (CORBA::tk_wchar);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_wchar = &tc_wchar;
// a string/wstring have a simple parameter list that indicates the length
-static const CORBA_Long _oc_string [] =
+static const CORBA::Long _oc_string [] =
{ // CDR typecode octets
1, // native endian + padding; "tricky"
0 // ... unbounded string
};
-static CORBA_TypeCode tc_string (tk_string,
+static CORBA::TypeCode tc_string (CORBA::tk_string,
sizeof _oc_string,
(u_char *) &_oc_string,
- CORBA_B_FALSE);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_String = &tc_string;
+ CORBA::B_FALSE);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_string = &tc_string;
-static const CORBA_Long _oc_wstring [] =
+static const CORBA::Long _oc_wstring [] =
{ // CDR typecode octets
1, // native endian + padding; "tricky"
0 // ... unbounded string
};
-static CORBA_TypeCode tc_wstring (tk_wstring,
+static CORBA::TypeCode tc_wstring (CORBA::tk_wstring,
sizeof _oc_wstring,
(u_char *) &_oc_wstring,
- CORBA_B_FALSE);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_WString = &tc_wstring;
+ CORBA::B_FALSE);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_wstring = &tc_wstring;
//
// Various things that can be passed as "general" parameters:
// Any, TypeCode_ptr, Principal_ptr, Object_ptr
//
-static CORBA_TypeCode tc_any (tk_any);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Any = &tc_any;
+static CORBA::TypeCode tc_any (CORBA::tk_any);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_any = &tc_any;
-static CORBA_TypeCode tc_typecode (tk_TypeCode);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_TypeCode = &tc_typecode;
+static CORBA::TypeCode tc_typecode (CORBA::tk_TypeCode);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_TypeCode = &tc_typecode;
-static CORBA_TypeCode tc_principal (tk_Principal);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Principal = &tc_principal;
+static CORBA::TypeCode tc_principal (CORBA::tk_Principal);
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_Principal = &tc_principal;
// typecode for objref is complex, has two string parameters
//
@@ -138,10 +142,10 @@ static const u_char oc_objref [] =
'c', 't', '\0', 0,
};
-static CORBA_TypeCode tc_objref (tk_objref,
+static CORBA::TypeCode tc_objref (CORBA::tk_objref,
sizeof oc_objref,
(u_char *) &oc_objref,
- CORBA_B_FALSE);
+ CORBA::B_FALSE);
-ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Object = &tc_objref;
+ACE_Svc_Export CORBA::TypeCode_ptr CORBA::_tc_Object = &tc_objref;
diff --git a/TAO/tao/typecode.cpp b/TAO/tao/typecode.cpp
index a1f6559f394..b49ef173cff 100644
--- a/TAO/tao/typecode.cpp
+++ b/TAO/tao/typecode.cpp
@@ -16,6 +16,7 @@
// only mutual exclusion relates to reference counting and
// construction.
+#if 0
#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
#include <objbase.h>
#include <initguid.h>
@@ -23,28 +24,31 @@
#include "tao/orb.h"
#include "tao/cdr.h"
#include "tao/debug.h"
+#endif
+
+#include "tao/corba.h"
// @@ This is a botch...
size_t
calc_key_union_attributes (CDR *stream,
size_t &alignment,
size_t &size_with_pad,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// Constructor for all other typecodes, including constants with
// non-empty parameter lists. See "corba.hh" for details.
-CORBA_TypeCode::CORBA_TypeCode (CORBA_TCKind kind,
- CORBA_ULong length,
- CORBA_Octet *buffer,
- CORBA_Boolean orb_owns_tc,
- CORBA_TypeCode_ptr parent)
+CORBA_TypeCode::CORBA_TypeCode (CORBA::TCKind kind,
+ CORBA::ULong length,
+ CORBA::Octet *buffer,
+ CORBA::Boolean orb_owns_tc,
+ CORBA::TypeCode_ptr parent)
: _length (length),
// _buffer (buffer),
_kind (kind),
_parent (parent),
refcount_ (1),
- _delete_flag (CORBA_B_FALSE),
+ _delete_flag (CORBA::B_FALSE),
_orb_owns (orb_owns_tc),
_private_state (new TC_Private_State (kind))
{
@@ -70,10 +74,10 @@ CORBA_TypeCode::CORBA_TypeCode (CORBA_TCKind kind,
temp = (ptr_arith_t) ACE_OS::malloc (length + 4);
temp += 3;
temp &= ~0x03;
- _buffer = (CORBA_Octet *) temp;
+ _buffer = (CORBA::Octet *) temp;
(void) ACE_OS::memcpy (_buffer, buffer, (size_t) length);
- _orb_owns = CORBA_B_FALSE; // XXX may leak
+ _orb_owns = CORBA::B_FALSE; // XXX may leak
}
#endif /* 0 */
@@ -94,15 +98,15 @@ CORBA_TypeCode::CORBA_TypeCode (CORBA_TCKind kind,
// result, during destruction, we do not want part of the allocated heap
// to remain dangling. Hence we save a handle to the original allocated
// buffer
- non_aligned_buffer_ = new CORBA_Octet [length + 4];
+ non_aligned_buffer_ = new CORBA::Octet [length + 4];
temp = (ptr_arith_t) non_aligned_buffer_;
temp += 3;
temp &= ~0x03;
- _buffer = (CORBA_Octet *) temp;
+ _buffer = (CORBA::Octet *) temp;
(void) ACE_OS::memcpy (_buffer, buffer, (size_t) length);
- _orb_owns = CORBA_B_FALSE; // the ORB does not own this typecode
+ _orb_owns = CORBA::B_FALSE; // the ORB does not own this typecode
}
else
{
@@ -130,7 +134,7 @@ CORBA_TypeCode::~CORBA_TypeCode (void)
// the process of deleteing itself
if (_parent->_delete_flag) // parent is deleteing, so we have to go
{
- _delete_flag = CORBA_B_TRUE; // set our delete flag to TRUE so that
+ _delete_flag = CORBA::B_TRUE; // set our delete flag to TRUE so that
// our children (if any) will know that
// we have initiated our destruction
delete _private_state; // delete any private state we have and thus
@@ -145,7 +149,7 @@ CORBA_TypeCode::~CORBA_TypeCode (void)
else
{
// we are free standing (IDL compiler generated code) and are to be deleted
- _delete_flag = CORBA_B_TRUE; // we indicate to our children that we are
+ _delete_flag = CORBA::B_TRUE; // we indicate to our children that we are
// getting deleted
delete _private_state; // free up our children
delete [] non_aligned_buffer_; // delete the original, possibly
@@ -155,16 +159,16 @@ CORBA_TypeCode::~CORBA_TypeCode (void)
}
// decreases the refcount and deletes when refcount reaches 0
-void CORBA_release (CORBA_TypeCode_ptr tc)
+void CORBA::release (CORBA::TypeCode_ptr tc)
{
if (tc)
tc->Release ();
}
// returns true if the typecode is NULL
-CORBA_Boolean CORBA_is_nil (CORBA_TypeCode_ptr tc)
+CORBA::Boolean CORBA::is_nil (CORBA::TypeCode_ptr tc)
{
- return (CORBA_Boolean) tc == 0;
+ return (CORBA::Boolean) tc == 0;
}
// COM's IUnknown support
@@ -224,20 +228,20 @@ CORBA_TypeCode::Release (void)
}
// constructor for the private state
-TC_Private_State::TC_Private_State (CORBA_TCKind kind)
+TC_Private_State::TC_Private_State (CORBA::TCKind kind)
: tc_kind_ (kind),
- tc_id_known_ (CORBA_B_FALSE),
- tc_name_known_ (CORBA_B_FALSE),
- tc_member_count_known_ (CORBA_B_FALSE),
- tc_member_type_list_known_ (CORBA_B_FALSE),
- tc_member_label_list_known_ (CORBA_B_FALSE),
- tc_discriminator_type_known_ (CORBA_B_FALSE),
- tc_default_index_used_known_ (CORBA_B_FALSE),
- tc_length_known_ (CORBA_B_FALSE),
- tc_content_type_known_ (CORBA_B_FALSE),
- tc_size_known_ (CORBA_B_FALSE),
- tc_alignment_known_ (CORBA_B_FALSE),
- tc_discrim_pad_size_known_ (CORBA_B_FALSE),
+ tc_id_known_ (CORBA::B_FALSE),
+ tc_name_known_ (CORBA::B_FALSE),
+ tc_member_count_known_ (CORBA::B_FALSE),
+ tc_member_type_list_known_ (CORBA::B_FALSE),
+ tc_member_label_list_known_ (CORBA::B_FALSE),
+ tc_discriminator_type_known_ (CORBA::B_FALSE),
+ tc_default_index_used_known_ (CORBA::B_FALSE),
+ tc_length_known_ (CORBA::B_FALSE),
+ tc_content_type_known_ (CORBA::B_FALSE),
+ tc_size_known_ (CORBA::B_FALSE),
+ tc_alignment_known_ (CORBA::B_FALSE),
+ tc_discrim_pad_size_known_ (CORBA::B_FALSE),
tc_id_ (0),
tc_name_ (0),
tc_member_count_ (0),
@@ -264,11 +268,11 @@ TC_Private_State::~TC_Private_State (void)
// determine what kind of children we may have and free the space accordingly
switch (tc_kind_)
{
- case tk_struct:
- case tk_except:
+ case CORBA::tk_struct:
+ case CORBA::tk_except:
{
// free up member type list
- for (CORBA_ULong i = 0;
+ for (CORBA::ULong i = 0;
i < tc_member_count_;
i++)
{
@@ -280,19 +284,19 @@ TC_Private_State::~TC_Private_State (void)
tc_member_count_ = 0;
break;
}
- case tk_sequence:
- case tk_array:
- case tk_alias:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
// delete the content type
delete tc_content_type_;
break;
- case tk_union:
+ case CORBA::tk_union:
{
// free up discriminator type, member label list, and member type list
delete tc_discriminator_type_;
if (tc_member_type_list_known_)
{
- for (CORBA_ULong i = 0;
+ for (CORBA::ULong i = 0;
i < tc_member_count_;
i++)
{
@@ -304,7 +308,7 @@ TC_Private_State::~TC_Private_State (void)
}
if (tc_member_label_list_known_)
{
- for (CORBA_ULong i = 0;
+ for (CORBA::ULong i = 0;
i < tc_member_count_;
i++)
{
@@ -340,56 +344,56 @@ CORBA_TypeCode::QueryInterface (REFIID riid,
}
// This method is not yet implemented completely - low priority task
-CORBA_Boolean
-CORBA_TypeCode::private_equal (CORBA_TypeCode_ptr,
- CORBA_Environment &) const
+CORBA::Boolean
+CORBA_TypeCode::private_equal (CORBA::TypeCode_ptr,
+ CORBA::Environment &) const
{
// We come in here only if the typecode kinds of both are same
// Handle each complex typecode separately.
switch (_kind)
{
- case tk_null:
- case tk_void:
- case tk_short:
- case tk_ushort:
- case tk_long:
- case tk_ulong:
- case tk_float:
- case tk_double:
- case tk_longlong:
- case tk_longdouble:
- case tk_boolean:
- case tk_octet:
- case tk_char:
- case tk_wchar:
- case tk_TypeCode:
- case tk_Principal:
+ 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_double:
+ case CORBA::tk_longlong:
+ case CORBA::tk_longdouble:
+ case CORBA::tk_boolean:
+ case CORBA::tk_octet:
+ case CORBA::tk_char:
+ case CORBA::tk_wchar:
+ case CORBA::tk_TypeCode:
+ case CORBA::tk_Principal:
// all these are simple typecodes and the comparison is based solely on
// the _kind field
- return CORBA_B_TRUE;
- case tk_objref:
+ return CORBA::B_TRUE;
+ case CORBA::tk_objref:
// return private_equal_objref (tc, env);
- case tk_struct:
+ case CORBA::tk_struct:
// return private_equal_struct (tc, env);
- case tk_union:
+ case CORBA::tk_union:
// return private_equal_union (tc, env);
- case tk_enum:
+ case CORBA::tk_enum:
// return private_equal_enum (tc, env);
- case tk_string:
+ case CORBA::tk_string:
// return private_equal_string (tc, env);
- case tk_wstring:
+ case CORBA::tk_wstring:
// return private_equal_string (tc, env);
- case tk_sequence:
+ case CORBA::tk_sequence:
// return private_equal_sequence (tc, env);
- case tk_array:
+ case CORBA::tk_array:
// return private_equal_array (tc, env);
- case tk_alias:
+ case CORBA::tk_alias:
// return private_equal_alias (tc, env);
- case tk_except:
+ case CORBA::tk_except:
// return private_equal_except (tc, env);
default:
// Not implemented yet
- return CORBA_B_FALSE;
+ return CORBA::B_TRUE;
}
}
@@ -399,8 +403,8 @@ CORBA_TypeCode::private_equal (CORBA_TypeCode_ptr,
//
// Valid only for objref, struct, union, enum, alias, and except. Raises
// BadKind exception for the rest of the cases.
-TAO_CONST CORBA_String
-CORBA_TypeCode::private_id (CORBA_Environment &env) const
+TAO_CONST CORBA::String
+CORBA_TypeCode::private_id (CORBA::Environment &env) const
{
env.clear ();
@@ -411,15 +415,15 @@ CORBA_TypeCode::private_id (CORBA_Environment &env) const
// per CDR rules. That means we can just return a pointer to
// that string directly!
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_enum:
- case tk_alias:
- case tk_except:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_enum:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
{
- _private_state->tc_id_known_ = CORBA_B_TRUE;
- _private_state->tc_id_ = (CORBA_String) (_buffer
+ _private_state->tc_id_known_ = CORBA::B_TRUE;
+ _private_state->tc_id_ = (CORBA::String) (_buffer
+ 4 // skip byte order flag
// and padding
+ 4); // skip (strlen + 1)
@@ -428,14 +432,14 @@ CORBA_TypeCode::private_id (CORBA_Environment &env) const
}
// No other typecodes ever have type IDs
default:
- env.exception (new CORBA_BadKind ());
+ env.exception (new CORBA::TypeCode::BadKind ());
return 0;
}
}
// return the name. The string is owned by the typecode
-TAO_CONST CORBA_String
-CORBA_TypeCode::private_name (CORBA_Environment &env) const
+TAO_CONST CORBA::String
+CORBA_TypeCode::private_name (CORBA::Environment &env) const
{
env.clear ();
@@ -446,12 +450,12 @@ CORBA_TypeCode::private_name (CORBA_Environment &env) const
// per CDR rules. That means we can just return a pointer to
// that string directly!
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_enum:
- case tk_alias:
- case tk_except:
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_enum:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
{
CDR stream;
@@ -460,23 +464,23 @@ CORBA_TypeCode::private_name (CORBA_Environment &env) const
// skip the typecode ID
if (stream.skip_string ()) // ID
{
- _private_state->tc_name_known_ = CORBA_B_TRUE;
+ _private_state->tc_name_known_ = CORBA::B_TRUE;
// skip past the length field.
- _private_state->tc_name_ = (CORBA_String) (stream.next + CDR::LONG_SIZE);
+ _private_state->tc_name_ = (CORBA::String) (stream.next + CDR::LONG_SIZE);
return _private_state->tc_name_;
}
else
{
- env.exception (new CORBA_INTERNAL (COMPLETED_NO));
- return (CORBA_String)0;
+ env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO));
+ return (CORBA::String)0;
}
}
// No other typecodes ever have type IDs
default:
- env.exception (new CORBA_BadKind ());
- return (CORBA_String)0;
+ env.exception (new CORBA::TypeCode::BadKind ());
+ return (CORBA::String)0;
}
}
@@ -485,23 +489,23 @@ CORBA_TypeCode::private_name (CORBA_Environment &env) const
// Applicable to struct, union, enum, alias, and except
// For the rest of the cases, raises the BadKind exception.
-CORBA_ULong
-CORBA_TypeCode::private_member_count (CORBA_Environment &env) const
+CORBA::ULong
+CORBA_TypeCode::private_member_count (CORBA::Environment &env) const
{
env.clear ();
switch (_kind)
{
- case tk_alias:
- // tc_member_count_known_ = CORBA_B_TRUE;
+ case CORBA::tk_alias:
+ // tc_member_count_known_ = CORBA::B_TRUE;
//tc_member_count_ = 1;
return 1;
- case tk_enum:
- case tk_except:
- case tk_struct:
+ case CORBA::tk_enum:
+ case CORBA::tk_except:
+ case CORBA::tk_struct:
{
- CORBA_ULong members;
+ CORBA::ULong members;
CDR stream;
stream.setup_encapsulation (_buffer, (size_t)_length);
@@ -512,17 +516,17 @@ CORBA_TypeCode::private_member_count (CORBA_Environment &env) const
|| !stream.skip_string () // struct name
|| !stream.get_ulong (members))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
- _private_state->tc_member_count_known_ = CORBA_B_TRUE;
+ _private_state->tc_member_count_known_ = CORBA::B_TRUE;
_private_state->tc_member_count_ = members;
return _private_state->tc_member_count_;
}
- case tk_union:
+ case CORBA::tk_union:
{
- CORBA_ULong members;
+ CORBA::ULong members;
CDR stream;
stream.setup_encapsulation (_buffer, (size_t) _length);
@@ -537,25 +541,25 @@ CORBA_TypeCode::private_member_count (CORBA_Environment &env) const
{
// this is a system exception indicating something is wrong with
// the typecode itself.
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
- _private_state->tc_member_count_known_ = CORBA_B_TRUE;
+ _private_state->tc_member_count_known_ = CORBA::B_TRUE;
_private_state->tc_member_count_ = members;
return _private_state->tc_member_count_;
}
default:
- env.exception (new CORBA_BadKind ());
+ env.exception (new CORBA::TypeCode::BadKind ());
return 0;
}
}
// Return the name for the nth member
-// Applicable only to tk_struct, tk_union, and tk_except
-TAO_CONST CORBA_String
-CORBA_TypeCode::member_name (CORBA_ULong,
- CORBA_Environment &) const
+// Applicable only to CORBA::tk_struct, CORBA::tk_union, and CORBA::tk_except
+TAO_CONST CORBA::String
+CORBA_TypeCode::member_name (CORBA::ULong,
+ CORBA::Environment &) const
{
// not implemented - low priority task
return 0;
@@ -569,31 +573,31 @@ CORBA_TypeCode::member_name (CORBA_ULong,
// Applicable only to struct, union, and except
//
-CORBA_TypeCode_ptr
-CORBA_TypeCode::private_member_type (CORBA_ULong index,
- CORBA_Environment &env) const
+CORBA::TypeCode_ptr
+CORBA_TypeCode::private_member_type (CORBA::ULong index,
+ CORBA::Environment &env) const
{
- CORBA_ULong temp, mcount;
+ CORBA::ULong temp, mcount;
// Build the de-encapsulating CDR stream, bypassing the stringent
// alignment tests (we're a bit looser in what we need here, and we
// _know_ we're OK). Then skip the byte order code.
CDR stream;
- CORBA_TypeCode_ptr tc = 0;
+ CORBA::TypeCode_ptr tc = 0;
stream.setup_encapsulation (_buffer, (size_t)_length);
switch (_kind)
{
- case tk_except:
- case tk_struct: // index from 0
+ case CORBA::tk_except:
+ case CORBA::tk_struct: // index from 0
mcount = member_count (env); // clears env
if (env.exception () == 0)
{
// the first time in. Precompute and store types of all members
// Allocate a list to hold the member typecodes
- _private_state->tc_member_type_list_ = new CORBA_TypeCode_ptr [mcount];
+ _private_state->tc_member_type_list_ = new CORBA::TypeCode_ptr [mcount];
if (_private_state->tc_member_type_list_)
{
@@ -602,18 +606,18 @@ CORBA_TypeCode::private_member_type (CORBA_ULong index,
|| !stream.skip_string () // typedef name
|| !stream.get_ulong (temp)) // member count
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return (CORBA::TypeCode_ptr)0;
}
else
{
// compute the typecodes for all the members and
// return the required one.
- for (CORBA_ULong i = 0; i < mcount; i++)
+ for (CORBA::ULong i = 0; i < mcount; i++)
{
// the ith entry will have the typecode of the ith guy
if (!stream.skip_string () // skip the name
- || stream.decode (_tc_CORBA_TypeCode,
+ || stream.decode (CORBA::_tc_TypeCode,
// the typecode will be retrieved
// at the i-th location. The decode
// routine will allocate the
@@ -625,41 +629,41 @@ CORBA_TypeCode::private_member_type (CORBA_ULong index,
// case where the 3rd
// parameter is used in a
// decode method
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
- _private_state->tc_member_type_list_known_ = CORBA_B_TRUE;
+ _private_state->tc_member_type_list_known_ = CORBA::B_TRUE;
if (index < mcount)
return _private_state->tc_member_type_list_[index];
else
{
- env.exception (new CORBA_Bounds ());
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::TypeCode::Bounds ());
+ return (CORBA::TypeCode_ptr)0;
}
}
}
else // no memory for the member_list
{
- env.exception (new CORBA_NO_MEMORY (COMPLETED_NO));
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
+ return (CORBA::TypeCode_ptr)0;
}
}
else // out of bounds
{
- env.exception (new CORBA_Bounds ());
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::TypeCode::Bounds ());
+ return (CORBA::TypeCode_ptr)0;
}
- case tk_union: // index from 0
+ case CORBA::tk_union: // index from 0
mcount = member_count (env); // clears env
if (env.exception () == 0)
{
// the first time in. Precompute and store types of all members
- _private_state->tc_member_type_list_ = new CORBA_TypeCode_ptr [mcount];
+ _private_state->tc_member_type_list_ = new CORBA::TypeCode_ptr [mcount];
if (_private_state->tc_member_type_list_)
{
// skip the id, name, and discrimant type part
@@ -667,18 +671,18 @@ CORBA_TypeCode::private_member_type (CORBA_ULong index,
|| !stream.skip_string () // typedef name
|| !skip_typecode (stream)) // skip typecode for discriminant
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
+ return (CORBA::TypeCode_ptr)0;
}
else if (!stream.get_ulong (temp) // default used
|| !stream.get_ulong (temp)) // member count
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
else
{
- CORBA_Long scratch; // always big enough because labels can
+ CORBA::Long scratch; // always big enough because labels can
// only be of a few different types of
// which "long" has the largest size
@@ -687,131 +691,130 @@ CORBA_TypeCode::private_member_type (CORBA_ULong index,
// compute the typecodes for all the members and return the
// required one
- for (CORBA_ULong i = 0; i < temp; i++) // temp holds the
- // member count
+ for (CORBA::ULong i = 0; i < mcount; i++)
{
// the ith entry will have the typecode of the ith guy
if (stream.decode (tc, &scratch, this, env) // member label
- != CORBA_TypeCode::TRAVERSE_CONTINUE
+ != CORBA::TypeCode::TRAVERSE_CONTINUE
|| !stream.skip_string () // skip the name
- || stream.decode (_tc_CORBA_TypeCode, // get the typecode
+ || stream.decode (CORBA::_tc_TypeCode, // get the typecode
&_private_state->tc_member_type_list_[i],
this,
env) !=
- CORBA_TypeCode::TRAVERSE_CONTINUE)
+ CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
- _private_state->tc_member_type_list_known_ = CORBA_B_TRUE;
+ _private_state->tc_member_type_list_known_ = CORBA::B_TRUE;
if (index < mcount)
return _private_state->tc_member_type_list_[index];
else
{
- env.exception (new CORBA_Bounds ());
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::TypeCode::Bounds ());
+ return (CORBA::TypeCode_ptr)0;
}
}
}
else // no memory for the member_list
{
- env.exception (new CORBA_NO_MEMORY (COMPLETED_NO));
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
+ return (CORBA::TypeCode_ptr)0;
}
}
else // out of bounds
{
- env.exception (new CORBA_Bounds ());
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::TypeCode::Bounds ());
+ return (CORBA::TypeCode_ptr)0;
}
default:
// bad kind
- env.exception (new CORBA_BadKind ());
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::TypeCode::BadKind ());
+ return (CORBA::TypeCode_ptr)0;
}
}
-// Return member labels for tk_union typecodes.
-CORBA_Any_ptr
-CORBA_TypeCode::private_member_label (CORBA_ULong n,
- CORBA_Environment &env) const
+// Return member labels for CORBA::tk_union typecodes.
+CORBA::Any_ptr
+CORBA_TypeCode::private_member_label (CORBA::ULong n,
+ CORBA::Environment &env) const
{
env.clear ();
- // this function is only applicable to the tk_union TC
- if (_kind == tk_union)
+ // this function is only applicable to the CORBA::tk_union TC
+ if (_kind == CORBA::tk_union)
{
CDR stream;
stream.setup_encapsulation (_buffer, (size_t)_length);
// skip ID and name, and then get the discriminant TC
- CORBA_TypeCode_ptr tc = 0;
+ CORBA::TypeCode_ptr tc = 0;
if (!stream.skip_string () // type ID, hidden
|| !stream.skip_string () // typedef name
|| !skip_typecode (stream)) // skip discriminant typecode
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
// skip default used, and get member count
- CORBA_ULong member_count;
+ CORBA::ULong member_count;
if (!stream.get_ulong (member_count) // default used
|| !stream.get_ulong (member_count)) // member count
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
dmsg ("TypeCode::private_member_label -- error reading from stream");
return 0;
}
// member labels are of type Any. However, the actual types are
// restricted to simple types
- _private_state->tc_member_label_list_ = new CORBA_Any_ptr [member_count];
+ _private_state->tc_member_label_list_ = new CORBA::Any_ptr [member_count];
if (_private_state->tc_member_label_list_)
{
tc = discriminator_type (env); // retrieve the discriminator type as
// this decides what the label is
- for (CORBA_ULong i = 0; i < member_count; i++)
+ for (CORBA::ULong i = 0; i < member_count; i++)
{
// allocate buffer to hold the member label value
- void *buf = new CORBA_Octet [tc->size (env)];
+ void *buf = new CORBA::Octet [tc->size (env)];
if (stream.decode (tc, buf, this, env)
- != CORBA_TypeCode::TRAVERSE_CONTINUE
+ != CORBA::TypeCode::TRAVERSE_CONTINUE
|| !stream.skip_string () // member name
|| !skip_typecode (stream)) // member type
{ // member TC
dmsg1 ("TypeCode::private_member_label -- error getting typecode for member %d",i);
delete [] buf;
// XXXASG: free this list on error
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
else
{
- _private_state->tc_member_label_list_[i] = new CORBA_Any (tc,
- buf, CORBA_B_TRUE);
+ _private_state->tc_member_label_list_[i] = new CORBA::Any (tc,
+ buf, CORBA::B_TRUE);
}
}
}
else
{
- env.exception (new CORBA_NO_MEMORY (COMPLETED_NO));
+ env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
return 0;
}
- _private_state->tc_member_label_list_known_ = CORBA_B_TRUE;
+ _private_state->tc_member_label_list_known_ = CORBA::B_TRUE;
// If caller asked for the label for a nonexistent member, they get
// an error report!
if (n >= member_count)
{
- env.exception (new CORBA_Bounds ());
+ env.exception (new CORBA::TypeCode::Bounds ());
return 0;
}
else
@@ -819,13 +822,13 @@ CORBA_TypeCode::private_member_label (CORBA_ULong n,
}
else // wrong typecode
{
- env.exception (new CORBA_BadKind ());
+ env.exception (new CORBA::TypeCode::BadKind ());
return 0;
}
}
-CORBA_TypeCode_ptr
-CORBA_TypeCode::private_discriminator_type (CORBA_Environment &env) const
+CORBA::TypeCode_ptr
+CORBA_TypeCode::private_discriminator_type (CORBA::Environment &env) const
{
CDR stream;
@@ -835,22 +838,22 @@ CORBA_TypeCode::private_discriminator_type (CORBA_Environment &env) const
if (!stream.skip_string () // type ID, hidden
|| !stream.skip_string () // typedef name
- || stream.decode (_tc_CORBA_TypeCode,
+ || stream.decode (CORBA::_tc_TypeCode,
&_private_state->tc_discriminator_type_, this, env) !=
- CORBA_TypeCode::TRAVERSE_CONTINUE)
+ CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
else
{
- _private_state->tc_discriminator_type_known_ = CORBA_B_TRUE;
+ _private_state->tc_discriminator_type_known_ = CORBA::B_TRUE;
return _private_state->tc_discriminator_type_;
}
}
-CORBA_Long
-CORBA_TypeCode::private_default_index (CORBA_Environment &env) const
+CORBA::Long
+CORBA_TypeCode::private_default_index (CORBA::Environment &env) const
{
CDR stream;
@@ -864,112 +867,111 @@ CORBA_TypeCode::private_default_index (CORBA_Environment &env) const
|| !stream.get_long (_private_state->tc_default_index_used_))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
else
{
- _private_state->tc_default_index_used_known_ = CORBA_B_TRUE;
+ _private_state->tc_default_index_used_known_ = CORBA::B_TRUE;
return _private_state->tc_default_index_used_;
}
}
-CORBA_Long
-CORBA_TypeCode::private_length (CORBA_Environment &env) const
+CORBA::Long
+CORBA_TypeCode::private_length (CORBA::Environment &env) const
{
CDR stream;
- CORBA_TypeCode_ptr tc = 0;
+ CORBA::TypeCode_ptr tc = 0;
stream.setup_encapsulation (_buffer, (size_t)_length);
switch (_kind)
{
- case tk_sequence:
- case tk_array:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
{
// skip the typecode of the element and get the bounds
- if (stream.decode (_tc_CORBA_TypeCode, &tc, this, env) !=
- CORBA_TypeCode::TRAVERSE_CONTINUE // skip typecode
+ if (!skip_typecode (stream) // skip typecode
|| !stream.get_ulong (_private_state->tc_length_))
{
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
else
{
- _private_state->tc_length_known_ = CORBA_B_TRUE;
+ _private_state->tc_length_known_ = CORBA::B_TRUE;
return _private_state->tc_length_;
}
- case tk_string:
- case tk_wstring:
+ case CORBA::tk_string:
+ case CORBA::tk_wstring:
{
if (stream.get_ulong (_private_state->tc_length_))
{
- _private_state->tc_length_known_ = CORBA_B_TRUE;
+ _private_state->tc_length_known_ = CORBA::B_TRUE;
return _private_state->tc_length_;
}
else
{
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
}
default:
- env.exception (new CORBA_BadKind);
+ env.exception (new CORBA::TypeCode::BadKind);
return 0;
}
}
}
-CORBA_TypeCode_ptr
-CORBA_TypeCode::private_content_type (CORBA_Environment &env) const
+CORBA::TypeCode_ptr
+CORBA_TypeCode::private_content_type (CORBA::Environment &env) const
{
CDR stream;
stream.setup_encapsulation (_buffer, (size_t) _length);
switch (_kind)
{
- case tk_sequence:
- case tk_array:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
{
- // skip the typecode of the element and get the bounds
- if (stream.decode (_tc_CORBA_TypeCode, &_private_state->tc_content_type_,
+ // retrieve the content type
+ if (stream.decode (CORBA::_tc_TypeCode, &_private_state->tc_content_type_,
this, env) !=
- CORBA_TypeCode::TRAVERSE_CONTINUE) // element type
+ CORBA::TypeCode::TRAVERSE_CONTINUE) // element type
{
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
else
{
- _private_state->tc_content_type_known_ = CORBA_B_TRUE;
+ _private_state->tc_content_type_known_ = CORBA::B_TRUE;
return _private_state->tc_content_type_;
}
- case tk_alias:
+ case CORBA::tk_alias:
{
if (!stream.skip_string () // typeID
|| !stream.skip_string () // name
- || stream.decode (_tc_CORBA_TypeCode,
+ || stream.decode (CORBA::_tc_TypeCode,
&_private_state->tc_content_type_, this, env) !=
- CORBA_TypeCode::TRAVERSE_CONTINUE)
+ CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
else
{
- _private_state->tc_content_type_known_ = CORBA_B_TRUE;
+ _private_state->tc_content_type_known_ = CORBA::B_TRUE;
return _private_state->tc_content_type_;
}
}
default:
- env.exception (new CORBA_BadKind);
+ env.exception (new CORBA::TypeCode::BadKind);
return 0;
}
}
}
-CORBA_ULong
-CORBA_TypeCode::private_discrim_pad_size (CORBA_Environment &env)
+CORBA::ULong
+CORBA_TypeCode::private_discrim_pad_size (CORBA::Environment &env)
{
CDR stream;
size_t discrim_size,
@@ -981,7 +983,7 @@ CORBA_TypeCode::private_discrim_pad_size (CORBA_Environment &env)
if (env. exception () == 0)
{
- _private_state->tc_discrim_pad_size_known_ = CORBA_B_TRUE;
+ _private_state->tc_discrim_pad_size_known_ = CORBA::B_TRUE;
_private_state->tc_discrim_pad_size_ = discrim_size;
return discrim_size;
}
@@ -998,8 +1000,8 @@ CORBA_TypeCode::private_discrim_pad_size (CORBA_Environment &env)
// doesn't strictly comply with what CORBA says "param_count"
// provides.
-CORBA_ULong
-CORBA_TypeCode::param_count (CORBA_Environment &env) const
+CORBA::ULong
+CORBA_TypeCode::param_count (CORBA::Environment &env) const
{
env.clear ();
@@ -1008,22 +1010,22 @@ CORBA_TypeCode::param_count (CORBA_Environment &env) const
default:
return 0;
- case tk_string:
- case tk_wstring:
+ case CORBA::tk_string:
+ case CORBA::tk_wstring:
return 1;
- case tk_objref:
- case tk_sequence:
- case tk_array:
+ case CORBA::tk_objref:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
return 2;
- case tk_alias:
+ case CORBA::tk_alias:
return 3;
- case tk_except:
- case tk_struct:
+ case CORBA::tk_except:
+ case CORBA::tk_struct:
{
- CORBA_ULong members;
+ CORBA::ULong members;
CDR stream;
stream.setup_encapsulation (_buffer, (size_t)_length);
@@ -1034,15 +1036,15 @@ CORBA_TypeCode::param_count (CORBA_Environment &env) const
|| !stream.skip_string () // struct name
|| !stream.get_ulong (members))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
return 3 + 2 * members;
}
- case tk_enum:
+ case CORBA::tk_enum:
{
- CORBA_ULong members;
+ CORBA::ULong members;
CDR stream;
stream.setup_encapsulation (_buffer, (size_t)_length);
@@ -1053,15 +1055,15 @@ CORBA_TypeCode::param_count (CORBA_Environment &env) const
|| !stream.skip_string () // typedef name
|| !stream.get_ulong (members))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
return 3 + members;
}
- case tk_union:
+ case CORBA::tk_union:
{
- CORBA_ULong members;
+ CORBA::ULong members;
CDR stream;
stream.setup_encapsulation (_buffer, (size_t) _length);
@@ -1074,7 +1076,7 @@ CORBA_TypeCode::param_count (CORBA_Environment &env) const
|| !stream.get_ulong (members) // default used
|| !stream.get_ulong (members)) // real member count
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -1088,11 +1090,11 @@ CORBA_TypeCode::param_count (CORBA_Environment &env) const
// implemented. Doesn't support all the types that those routines
// support.
-CORBA_ULong
-CORBA_TypeCode::ulong_param (CORBA_ULong n,
- CORBA_Environment &env) const
+CORBA::ULong
+CORBA_TypeCode::ulong_param (CORBA::ULong n,
+ CORBA::Environment &env) const
{
- CORBA_ULong temp;
+ CORBA::ULong temp;
temp = param_count (env); // clears env
if (env.exception ())
@@ -1100,7 +1102,7 @@ CORBA_TypeCode::ulong_param (CORBA_ULong n,
if (temp < n)
{
- env.exception (new CORBA_Bounds);
+ env.exception (new CORBA::TypeCode::Bounds);
return 0;
}
@@ -1112,8 +1114,8 @@ CORBA_TypeCode::ulong_param (CORBA_ULong n,
break;
// Array, sequence ... complex parameter lists
- case tk_array: // param 1 is an integer
- case tk_sequence: // ... identical content
+ case CORBA::tk_array: // param 1 is an integer
+ case CORBA::tk_sequence: // ... identical content
{
if (n == 0)
break;
@@ -1125,25 +1127,25 @@ CORBA_TypeCode::ulong_param (CORBA_ULong n,
stream.setup_encapsulation (_buffer, (size_t)_length);
if (!skip_typecode (stream))
{
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
// Then comes the "bounds" parameter.
if (!stream.get_ulong (temp))
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return temp;
}
// string, wstring ... simple parameter lists, containing just the
// string bounds (zero indicates unbounded). Stored specially
- case tk_string:
- case tk_wstring:
+ case CORBA::tk_string:
+ case CORBA::tk_wstring:
if (n != 0)
break;
return _length;
}
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
@@ -1155,11 +1157,11 @@ CORBA_TypeCode::ulong_param (CORBA_ULong n,
// value indicates that this typecode is the parent. See comments at
// stream.decode () for further details.
-CORBA_TypeCode_ptr
-CORBA_TypeCode::typecode_param (CORBA_ULong n,
- CORBA_Environment &env) const
+CORBA::TypeCode_ptr
+CORBA_TypeCode::typecode_param (CORBA::ULong n,
+ CORBA::Environment &env) const
{
- CORBA_ULong temp;
+ CORBA::ULong temp;
temp = param_count (env); // clears env
if (env.exception ())
@@ -1167,7 +1169,7 @@ CORBA_TypeCode::typecode_param (CORBA_ULong n,
if (temp < n)
{
- env.exception (new CORBA_Bounds);
+ env.exception (new CORBA::TypeCode::Bounds);
return 0;
}
@@ -1176,7 +1178,7 @@ CORBA_TypeCode::typecode_param (CORBA_ULong n,
// _know_ we're OK). Then skip the byte order code.
CDR stream;
- CORBA_TypeCode_ptr tc = 0;
+ CORBA::TypeCode_ptr tc = 0;
stream.setup_encapsulation (_buffer, (size_t)_length);
@@ -1185,38 +1187,38 @@ CORBA_TypeCode::typecode_param (CORBA_ULong n,
default: // most have no tc params
break;
- case tk_sequence: // param 0 is a tc
- case tk_array:
+ case CORBA::tk_sequence: // param 0 is a tc
+ case CORBA::tk_array:
if (n != 0)
break;
- if (stream.decode (_tc_CORBA_TypeCode,
+ if (stream.decode (CORBA::_tc_TypeCode,
&tc,
this,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
return tc;
- case tk_alias: // #1 is a tc
+ case CORBA::tk_alias: // #1 is a tc
if (n != 2)
break;
if (!stream.skip_string () // type ID, hidden
|| !stream.skip_string () // typedef name
- || stream.decode (_tc_CORBA_TypeCode, &tc, this, env)
- != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ || stream.decode (CORBA::_tc_TypeCode, &tc, this, env)
+ != CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
return tc;
- case tk_except:
- case tk_struct: // #5 and up are tc, index from 0
+ case CORBA::tk_except:
+ case CORBA::tk_struct: // #5 and up are tc, index from 0
if (n < 4 || n & 0x1)
{ // tc is at odd number of param list
- env.exception (new CORBA_Bounds);
+ env.exception (new CORBA::TypeCode::Bounds);
return 0;
}
@@ -1224,7 +1226,7 @@ CORBA_TypeCode::typecode_param (CORBA_ULong n,
|| !stream.skip_string () // typedef name
|| !stream.get_ulong (temp))
{ // member count
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
else
@@ -1232,48 +1234,48 @@ CORBA_TypeCode::typecode_param (CORBA_ULong n,
temp = (n - 3) / 2;
// skip member pairs to the one we want
- for (CORBA_ULong i = 0; i < temp; i++)
+ for (CORBA::ULong i = 0; i < temp; i++)
{
// skip to the member being asked
if (!stream.skip_string () // member name
|| !skip_typecode (stream))
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
if (!stream.skip_string ()
- || stream.decode (_tc_CORBA_TypeCode, &tc, this,
- env)!= CORBA_TypeCode::TRAVERSE_CONTINUE)
+ || stream.decode (CORBA::_tc_TypeCode, &tc, this,
+ env)!= CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
return tc;
}
- case tk_union: // #6 and up are tc, index from 0
+ case CORBA::tk_union: // #6 and up are tc, index from 0
if (n != 2 && (n < 7 || (n - 7) % 3))
{
- env.exception (new CORBA_Bounds);
+ env.exception (new CORBA::TypeCode::Bounds);
return 0;
}
if (!stream.skip_string () // type ID, hidden
|| !stream.skip_string () // typedef name
- || stream.decode (_tc_CORBA_TypeCode,
+ || stream.decode (CORBA::_tc_TypeCode,
&tc, this,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE) // TC
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE) // TC
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
else if (!stream.get_ulong (temp) // default used
|| !stream.get_ulong (temp)) // member count
{
tc->Release ();
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
@@ -1284,17 +1286,17 @@ CORBA_TypeCode::typecode_param (CORBA_ULong n,
// skip to the member requested
- CORBA_Long scratch; // always big enough
+ CORBA::Long scratch; // always big enough
- for (CORBA_ULong i = 0; i < temp; i++)
+ for (CORBA::ULong i = 0; i < temp; i++)
{
if (stream.decode (tc, &scratch, this, env) // member label
- != CORBA_TypeCode::TRAVERSE_CONTINUE
+ != CORBA::TypeCode::TRAVERSE_CONTINUE
|| !stream.skip_string () // member name
|| !skip_typecode (stream))
{ // member typecode
tc->Release ();
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
}
@@ -1302,39 +1304,39 @@ CORBA_TypeCode::typecode_param (CORBA_ULong n,
// member label
if (stream.decode (tc,
&scratch, this,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE
|| !stream.skip_string ()) // member name
{
tc->Release ();
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
tc->Release ();
- if (stream.decode (_tc_CORBA_TypeCode,
+ if (stream.decode (CORBA::_tc_TypeCode,
&tc, this,
- env) != CORBA_TypeCode::TRAVERSE_CONTINUE)
+ env) != CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- env.exception (new CORBA_BAD_TYPECODE (COMPLETED_NO));
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return 0;
}
return tc;
}
- env.exception (new CORBA_BAD_PARAM (COMPLETED_NO));
+ env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
// skip a typecode encoding in a given CDR stream
// This is just a helper function
-CORBA_Boolean
+CORBA::Boolean
CORBA_TypeCode::skip_typecode (CDR &stream)
{
- CORBA_ULong kind;
- CORBA_ULong temp;
+ CORBA::ULong kind;
+ CORBA::ULong temp;
if (stream.get_ulong (kind)
- && (kind < TC_KIND_COUNT || kind == ~CORBA_ULong(0)))
+ && (kind < CORBA::TC_KIND_COUNT || kind == ~CORBA::ULong(0)))
{
switch (kind)
@@ -1345,29 +1347,29 @@ CORBA_TypeCode::skip_typecode (CDR &stream)
// Some have single integer parameters, easy to skip. Some have
// preallocated constants that could be used.
- case tk_string:
- case tk_wstring:
+ case CORBA::tk_string:
+ case CORBA::tk_wstring:
case ~0:
return stream.get_ulong (temp);
// The rest have "complex" parameter lists that are
// encoded as bulk octets ... just skip them.
- case tk_objref:
- case tk_struct:
- case tk_union:
- case tk_enum:
- case tk_sequence:
- case tk_array:
- case tk_alias:
- case tk_except:
- return stream.get_ulong (temp) != CORBA_B_FALSE
- && stream.skip_bytes (temp) != CORBA_B_FALSE;
+ case CORBA::tk_objref:
+ case CORBA::tk_struct:
+ case CORBA::tk_union:
+ case CORBA::tk_enum:
+ case CORBA::tk_sequence:
+ case CORBA::tk_array:
+ case CORBA::tk_alias:
+ case CORBA::tk_except:
+ return stream.get_ulong (temp) != CORBA::B_FALSE
+ && stream.skip_bytes (temp) != CORBA::B_FALSE;
}
- return CORBA_B_TRUE;
+ return CORBA::B_TRUE;
}
else
- return CORBA_B_FALSE;
+ return CORBA::B_FALSE;
}
diff --git a/TAO/tao/typecode.h b/TAO/tao/typecode.h
index cab7c08c42e..00600ce6fc7 100644
--- a/TAO/tao/typecode.h
+++ b/TAO/tao/typecode.h
@@ -28,69 +28,25 @@
#if !defined (TAO_TYPECODE_H)
# define TAO_TYPECODE_H
-# include "ace/OS.h"
-
-# include "tao/any.h"
-# include "tao/except.h"
-
struct CDR;
-enum CORBA_TCKind
-{
- tk_null = 0,
- tk_void = 1,
- tk_short = 2,
- tk_long = 3,
- tk_ushort = 4,
- tk_ulong = 5,
- tk_float = 6,
- tk_double = 7,
- tk_boolean = 8,
- tk_char = 9,
- tk_octet = 10,
- tk_any = 11,
- tk_TypeCode = 12,
- tk_Principal = 13,
- tk_objref = 14,
- tk_struct = 15,
- tk_union = 16,
- tk_enum = 17,
- tk_string = 18,
- tk_sequence = 19,
- tk_array = 20,
- tk_alias = 21, // 94-11-7
- tk_except = 22, // 94-11-7
-
- // these five are OMG-IDL data type extensions
- tk_longlong = 23, // 94-9-32 Appendix A (+ 2)
- tk_ulonglong = 24, // 94-9-32 Appendix A (+ 2)
- tk_longdouble = 25, // 94-9-32 Appendix A (+ 2)
- tk_wchar = 26, // 94-9-32 Appendix A (+ 2)
- tk_wstring = 27, // 94-9-32 Appendix A (+ 2)
-
- // This symbol is not defined by CORBA 2.0. It's used to speed up
- // dispatch based on TCKind values, and lets many important ones
- // just be table lookups. It must always be the last enum value!!
-
- TC_KIND_COUNT
-};
-
-// Two "user exceptions" are defined for manipulating TypeCodes.
+// Two "user exceptions" are defined for manipulating TypeCodes. These two
+// classes are really to be defined inside the TypeCode class
-extern CORBA_TypeCode_ptr _tc_CORBA_Bounds;
-class CORBA_Bounds : public CORBA_UserException
+//extern CORBA::TypeCode_ptr CORBA::_tc_Bounds;
+class CORBA_Bounds : public CORBA::UserException
{
public:
CORBA_Bounds (void)
- : CORBA_UserException (_tc_CORBA_Bounds) {}
+ : CORBA::UserException (CORBA::_tc_Bounds) {}
};
-extern CORBA_TypeCode_ptr _tc_CORBA_BadKind;
-class CORBA_BadKind : public CORBA_UserException
+//extern CORBA::TypeCode_ptr CORBA::_tc_BadKind;
+class CORBA_BadKind : public CORBA::UserException
{
public:
CORBA_BadKind (void)
- : CORBA_UserException (_tc_CORBA_BadKind) {}
+ : CORBA::UserException (CORBA::_tc_BadKind) {}
};
// A TypeCode describes data. This one's as thin a wrapper around CDR
@@ -101,10 +57,6 @@ public:
// compiler) that needs to create typecodes from their octet-sequence
// encodings.
-void CORBA_release (CORBA_TypeCode_ptr);
-CORBA_Boolean CORBA_is_nil (CORBA_TypeCode_ptr obj);
-
-extern "C" const IID IID_CORBA_TypeCode;
class TC_Private_State;
class ACE_Svc_Export CORBA_TypeCode : public IUnknown
@@ -117,69 +69,75 @@ class ACE_Svc_Export CORBA_TypeCode : public IUnknown
// Implements the CORBA::TypeCode interface specified by CORBA 2.0 spec
public:
- static CORBA_TypeCode_ptr _duplicate (CORBA_TypeCode_ptr tc);
+ typedef CORBA_Bounds Bounds;
+ typedef CORBA_BadKind BadKind;
+ // As per the spec, these two exception classes are supposed to be nested
+ // inside the TypeCode class. Since we are trying to avoid nesting of
+ // classes, we use the above typedef.
+
+ static CORBA::TypeCode_ptr _duplicate (CORBA::TypeCode_ptr tc);
// duplicates i.e., increments ref count
- static CORBA_TypeCode_ptr _nil (void);
+ static CORBA::TypeCode_ptr _nil (void);
// returns a NULL typecode
- CORBA_Boolean equal (const CORBA_TypeCode_ptr, CORBA_Environment &env) const;
+ CORBA::Boolean equal (const CORBA::TypeCode_ptr, CORBA::Environment &env) const;
// compares two typecodes
- CORBA_TCKind kind (CORBA_Environment &) const;
+ CORBA::TCKind kind (CORBA::Environment &) const;
// For all TypeCode kinds, returns the "kind" of the typecode
- TAO_CONST CORBA_String id (CORBA_Environment &) const;
+ TAO_CONST CORBA::String id (CORBA::Environment &) const;
// For tk_{objref,struct,union,enum,alias,except}. Returns the repository ID,
// raises BadKind.
- TAO_CONST CORBA_String name (CORBA_Environment &) const;
+ TAO_CONST CORBA::String name (CORBA::Environment &) const;
// returns name (), raises (BadKind)
- CORBA_ULong member_count (CORBA_Environment &) const;
+ CORBA::ULong member_count (CORBA::Environment &) const;
// returns member_count (), raises (BadKind). Useful for tk_struct, tk_union,
// tk_enum, tk_alias, and tk_except.
- TAO_CONST CORBA_String member_name (CORBA_ULong index, CORBA_Environment &) const;
+ TAO_CONST CORBA::String member_name (CORBA::ULong index, CORBA::Environment &) const;
// returns member_name (...), raises (BadKind, Bounds); Useful for tk_struct, tk_union,
// tk_enum, tk_alias, and tk_except.
- CORBA_TypeCode_ptr member_type (CORBA_ULong index, CORBA_Environment &) const;
+ CORBA::TypeCode_ptr member_type (CORBA::ULong index, CORBA::Environment &) const;
// returns member_type (...), raises (BadKind, Bounds); Useful for tk_struct,
// tk_union, and tk_except
- CORBA_Any_ptr member_label (CORBA_ULong n, CORBA_Environment&) const;
+ CORBA::Any_ptr member_label (CORBA::ULong n, CORBA::Environment&) const;
// For tk_union. Returns the label. Raises BadKind, Bounds.
- CORBA_TypeCode_ptr discriminator_type (CORBA_Environment &) const;
+ CORBA::TypeCode_ptr discriminator_type (CORBA::Environment &) const;
// returns the discriminator type for tk_union. raises (BadKind);
- CORBA_Long default_index (CORBA_Environment &) const;
+ CORBA::Long default_index (CORBA::Environment &) const;
// returns the default index for the tk_union. Raises (BadKind);
- CORBA_ULong length (CORBA_Environment &) const;
+ CORBA::ULong length (CORBA::Environment &) const;
// returns length, raises (BadKind). Used for tk_string, tk_sequence, and
// tk_array
- CORBA_TypeCode_ptr content_type (CORBA_Environment &) const;
+ CORBA::TypeCode_ptr content_type (CORBA::Environment &) const;
// returns the content type (element type). Raises (BadKind); Useful for
// tk_sequence, tk_array, and tk_alias
- CORBA_ULong TAO_discrim_pad_size (CORBA_Environment &);
+ CORBA::ULong TAO_discrim_pad_size (CORBA::Environment &);
// Calculates the padded size of discriminant type
// TAO Extension
// =Following three are deprecated
- CORBA_ULong param_count (CORBA_Environment &) const;
+ CORBA::ULong param_count (CORBA::Environment &) const;
// Deprecated, CORBA 1.2, not fully usable. Returns the number of parameters
// that the typecode takes.
- CORBA_ULong ulong_param (CORBA_ULong n,
- CORBA_Environment &) const;
+ CORBA::ULong ulong_param (CORBA::ULong n,
+ CORBA::Environment &) const;
- CORBA_TypeCode_ptr typecode_param (CORBA_ULong n,
- CORBA_Environment &) const;
+ CORBA::TypeCode_ptr typecode_param (CORBA::ULong n,
+ CORBA::Environment &) const;
// Internal utilities, pending CORBA 2.0 IFR APIs; just enough
// to make array and sequence typecode interpretation cheap
@@ -188,15 +146,15 @@ public:
// These aren't really public APIs, but an IDL compiler will need to
// be able to create TypeCodes as part of creating stubs.
- CORBA_TypeCode (CORBA_TCKind kind);
+ CORBA_TypeCode (CORBA::TCKind kind);
// This constructor is used only for built-in TypeCode constants,
// with no parameters.
- CORBA_TypeCode (CORBA_TCKind kind,
- CORBA_ULong length,
- CORBA_Octet *buffer,
- CORBA_Boolean orb_owns_tc,
- CORBA_TypeCode_ptr parent = 0);
+ CORBA_TypeCode (CORBA::TCKind kind,
+ CORBA::ULong length,
+ CORBA::Octet *buffer,
+ CORBA::Boolean orb_owns_tc,
+ 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.
@@ -223,17 +181,17 @@ public:
// these are used to indicate the status of marshaling
// = The following traverse function is unused in TAO.
- typedef traverse_status (_FAR * VisitRoutine) (CORBA_TypeCode_ptr tc,
+ typedef traverse_status (_FAR * VisitRoutine) (CORBA::TypeCode_ptr tc,
const void *value1,
const void *value2,
void *context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
traverse_status traverse (const void *value1,
const void *value2,
VisitRoutine visit,
void *context,
- CORBA_Environment &env);
+ CORBA::Environment &env);
// This routine calls visit () on each component of one (or two)
// structurally equivalent data values. "Components" are either
// primitive (long, string, ...) or constructed (struct, ...) data
@@ -261,10 +219,10 @@ public:
// interpereter's knowledge of data structure layout through mutual
// recursion.
- size_t size (CORBA_Environment &env);
+ size_t size (CORBA::Environment &env);
// returns the size. Used by the IIOP marshaling engine.
- size_t alignment (CORBA_Environment &env);
+ size_t alignment (CORBA::Environment &env);
// returns the alignment requirements for this typecode. used by the IIOP
// marshaling engine.
@@ -280,75 +238,75 @@ public:
// This is implemented as a counted set of bytes, in marshaled CDR
// format.
- CORBA_ULong _length;
+ CORBA::ULong _length;
// length of the encapsulated stream
- CORBA_Octet *_buffer;
+ CORBA::Octet *_buffer;
// the encapsulated stream
- CORBA_TCKind _kind;
+ CORBA::TCKind _kind;
// the TypeCode kind
- CORBA_TypeCode_ptr _parent;
+ CORBA::TypeCode_ptr _parent;
// Indirected typecodes share "buffer" with a parent, and hold a
// reference to that parent to ensure its memory is not freed
// inappropriately.
- static CORBA_Boolean skip_typecode (CDR &stream);
+ static CORBA::Boolean skip_typecode (CDR &stream);
// skip a typecode encoding in a given CDR stream
// This is just a helper function
private:
// All the private/helper methods
- CORBA_Boolean private_equal (CORBA_TypeCode_ptr tc, CORBA_Environment &env) const;
+ CORBA::Boolean private_equal (CORBA::TypeCode_ptr tc, CORBA::Environment &env) const;
// compares the typecodes
- TAO_CONST CORBA_String private_id (CORBA_Environment &) const;
+ TAO_CONST CORBA::String private_id (CORBA::Environment &) const;
// For tk_{objref,struct,union,enum,alias,except}. Returns the repository ID,
// raises BadKind.
- TAO_CONST CORBA_String private_name (CORBA_Environment &) const;
+ TAO_CONST CORBA::String private_name (CORBA::Environment &) const;
// returns name (), raises (BadKind)
- CORBA_ULong private_member_count (CORBA_Environment &) const;
+ CORBA::ULong private_member_count (CORBA::Environment &) const;
// returns member_count (), raises (BadKind). Useful for tk_struct, tk_union,
// tk_enum, tk_alias, and tk_except.
- CORBA_TypeCode_ptr private_member_type (CORBA_ULong index,
- CORBA_Environment &) const;
+ CORBA::TypeCode_ptr private_member_type (CORBA::ULong index,
+ CORBA::Environment &) const;
// returns member_type (...), raises (BadKind, Bounds); Useful for tk_struct,
// tk_union, and tk_except
- // CORBA_TypeCode_ptr private_member_label (CORBA_ULong index,
- // CORBA_Environment &) const;
+ // CORBA::TypeCode_ptr private_member_label (CORBA::ULong index,
+ // CORBA::Environment &) const;
// returns member_label (...), raises (BadKind, Bounds); Useful for tk_union
- CORBA_Any_ptr private_member_label (CORBA_ULong n, CORBA_Environment&) const;
+ CORBA::Any_ptr private_member_label (CORBA::ULong n, CORBA::Environment&) const;
// For tk_union. Returns the label. Raises BadKind, Bounds.
- CORBA_TypeCode_ptr private_discriminator_type (CORBA_Environment &) const;
+ CORBA::TypeCode_ptr private_discriminator_type (CORBA::Environment &) const;
// returns the discriminator type for tk_union. raises (BadKind);
- CORBA_Long private_default_index (CORBA_Environment &) const;
+ CORBA::Long private_default_index (CORBA::Environment &) const;
// returns the default index for the tk_union. Raises (BadKind);
- CORBA_Long private_length (CORBA_Environment &) const;
+ CORBA::Long private_length (CORBA::Environment &) const;
// returns length, raises (BadKind). Used for tk_string, tk_sequence, and
// tk_array
- CORBA_TypeCode_ptr private_content_type (CORBA_Environment &) const;
+ CORBA::TypeCode_ptr private_content_type (CORBA::Environment &) const;
// returns the content type (element type). Raises (BadKind); Useful for
// tk_sequence, tk_array, and tk_alias
- size_t private_size (CORBA_Environment &env);
+ size_t private_size (CORBA::Environment &env);
// returns the size. Used by the IIOP marshaling engine.
- size_t private_alignment (CORBA_Environment &env);
+ size_t private_alignment (CORBA::Environment &env);
// returns the alignment requirements for this typecode. used by the IIOP
// marshaling engine.
- CORBA_ULong private_discrim_pad_size (CORBA_Environment &);
+ CORBA::ULong private_discrim_pad_size (CORBA::Environment &);
// Calculates the padded size of discriminant type
// TAO Extension
@@ -358,10 +316,10 @@ private:
ACE_SYNCH_MUTEX lock_;
// Protect access to the reference count.
- CORBA_Boolean _delete_flag;
+ CORBA::Boolean _delete_flag;
// indicates if we are freeing ourselves
- CORBA_Boolean _orb_owns;
+ CORBA::Boolean _orb_owns;
// TAO's approach differs from the SunSoft IIOP. Constant typecodes
// are owned by the ORB and get freed only when the ORB dies.
@@ -382,88 +340,89 @@ private:
// = No copy constructor or assignment operator supported;
// Use TypeCode_ptr values, duplicate (), release ().
- CORBA_TypeCode (const CORBA_TypeCode &src);
- CORBA_TypeCode &operator = (const CORBA_TypeCode &src);
+ CORBA_TypeCode (const CORBA::TypeCode &src);
+ CORBA_TypeCode &operator = (const CORBA::TypeCode &src);
- CORBA_Octet *non_aligned_buffer_;
+ CORBA::Octet *non_aligned_buffer_;
// original buffer that may possibly be non-aligned. We still need a handle
// to the allocated memory so that all of it can be freed by the destructor
};
class ACE_Svc_Export TC_Private_State
-// = TITLE
-// Private state of the TypeCode.
-// =DESCRIPTION
-// Used to store precomputed values
-
{
+ // = TITLE
+ // Private state of the TypeCode.
+ // =DESCRIPTION
+ // Used to store precomputed values
public:
- TC_Private_State (CORBA_TCKind kind);
+ TC_Private_State (CORBA::TCKind kind);
// constructor
~TC_Private_State (void);
// destructor
- CORBA_TCKind tc_kind_;
+ CORBA::TCKind tc_kind_;
// our kind that will determine what kind of children we may have
// =data members that indicate if the desired quantify was precomputed or not.
- CORBA_Boolean tc_id_known_;
- CORBA_Boolean tc_name_known_;
- CORBA_Boolean tc_member_count_known_;
- CORBA_Boolean tc_member_type_list_known_;
- CORBA_Boolean tc_member_label_list_known_;
- CORBA_Boolean tc_discriminator_type_known_;
- CORBA_Boolean tc_default_index_used_known_;
- CORBA_Boolean tc_length_known_;
- CORBA_Boolean tc_content_type_known_;
- CORBA_Boolean tc_size_known_;
- CORBA_Boolean tc_alignment_known_;
- CORBA_Boolean tc_discrim_pad_size_known_;
+ CORBA::Boolean tc_id_known_;
+ CORBA::Boolean tc_name_known_;
+ CORBA::Boolean tc_member_count_known_;
+ CORBA::Boolean tc_member_type_list_known_;
+ CORBA::Boolean tc_member_label_list_known_;
+ CORBA::Boolean tc_discriminator_type_known_;
+ CORBA::Boolean tc_default_index_used_known_;
+ CORBA::Boolean tc_length_known_;
+ CORBA::Boolean tc_content_type_known_;
+ CORBA::Boolean tc_size_known_;
+ CORBA::Boolean tc_alignment_known_;
+ CORBA::Boolean tc_discrim_pad_size_known_;
// =These data members store the precomputed values
- CORBA_String tc_id_;
- CORBA_String tc_name_;
- CORBA_ULong tc_member_count_;
- CORBA_TypeCode_ptr *tc_member_type_list_;
- CORBA_Any_ptr *tc_member_label_list_;
- CORBA_TypeCode_ptr tc_discriminator_type_;
- CORBA_Long tc_default_index_used_;
- CORBA_ULong tc_length_;
- CORBA_TypeCode_ptr tc_content_type_;
- CORBA_ULong tc_size_;
- CORBA_ULong tc_alignment_;
- CORBA_ULong tc_discrim_pad_size_;
+ CORBA::String tc_id_;
+ CORBA::String tc_name_;
+ CORBA::ULong tc_member_count_;
+ CORBA::TypeCode_ptr *tc_member_type_list_;
+ CORBA::Any_ptr *tc_member_label_list_;
+ CORBA::TypeCode_ptr tc_discriminator_type_;
+ CORBA::Long tc_default_index_used_;
+ CORBA::ULong tc_length_;
+ CORBA::TypeCode_ptr tc_content_type_;
+ CORBA::ULong tc_size_;
+ CORBA::ULong tc_alignment_;
+ CORBA::ULong tc_discrim_pad_size_;
};
+#if 0
// =TypeCode constants, which are always accessible in all ORB runtimes.
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Null;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Void;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Short;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Long;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_LongLong;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_UShort;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_ULong;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_ULongLong;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Null;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Void;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Short;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Long;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_LongLong;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_UShort;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_ULong;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_ULongLong;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Float;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Double;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_LongDouble;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Float;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Double;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_LongDouble;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Boolean;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Octet;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Boolean;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Octet;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Char;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_String;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_WChar;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_WString;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Char;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_String;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_WChar;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_WString;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Any;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_TypeCode;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Principal;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Any;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_TypeCode;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Principal;
-extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Object;
+extern ACE_Svc_Export CORBA::TypeCode_ptr _tc_CORBA_Object;
+#endif
// In this case, we make a substantial exception to how inline
// files are included. Normally, we would conditionally include the
@@ -479,7 +438,7 @@ extern ACE_Svc_Export CORBA_TypeCode_ptr _tc_CORBA_Object;
# define ACE_INLINE inline
# define do_undef_on_ACE_INLINE
# endif
-# include "typecode.i"
+//# include "typecode.i"
# if defined (do_undef_on_ACE_INLINE)
# undef do_undef_on_ACE_INLINE
# undef ACE_INLINE
diff --git a/TAO/tao/typecode.i b/TAO/tao/typecode.i
index 537feb78c57..b5208bc830f 100644
--- a/TAO/tao/typecode.i
+++ b/TAO/tao/typecode.i
@@ -5,15 +5,15 @@ CORBA_TypeCode::operator new (size_t s)
return ::operator new (s);
}
-ACE_INLINE CORBA_TCKind
-CORBA_TypeCode::kind (CORBA_Environment &env) const
+ACE_INLINE CORBA::TCKind
+CORBA_TypeCode::kind (CORBA::Environment &env) const
{
env.clear ();
return _kind;
}
-ACE_INLINE CORBA_TypeCode_ptr
-CORBA_TypeCode::_duplicate (CORBA_TypeCode_ptr tc)
+ACE_INLINE CORBA::TypeCode_ptr
+CORBA_TypeCode::_duplicate (CORBA::TypeCode_ptr tc)
{
if (tc)
tc->AddRef ();
@@ -23,34 +23,35 @@ CORBA_TypeCode::_duplicate (CORBA_TypeCode_ptr tc)
// Constructor for CONSTANT typecodes with empty parameter lists.
// These are only created once, and those constants are shared.
-ACE_INLINE CORBA_TypeCode::CORBA_TypeCode (CORBA_TCKind kind)
+ACE_INLINE
+CORBA_TypeCode::CORBA_TypeCode (CORBA::TCKind kind)
: _length (0),
_buffer (0),
_kind (kind),
_parent (0),
refcount_ (1),
- _delete_flag (CORBA_B_FALSE),
- _orb_owns (CORBA_B_TRUE),
+ _delete_flag (CORBA::B_FALSE),
+ _orb_owns (CORBA::B_TRUE),
_private_state (new TC_Private_State (kind)),
non_aligned_buffer_ (0)
{
}
// Returns true if the two typecodes are identical
-ACE_INLINE CORBA_Boolean
-CORBA_TypeCode::equal (const CORBA_TypeCode_ptr tc,
- CORBA_Environment &env) const
+ACE_INLINE CORBA::Boolean
+CORBA_TypeCode::equal (const CORBA::TypeCode_ptr tc,
+ CORBA::Environment &env) const
{
if (this->_kind != tc->kind (env))
// simple case
- return CORBA_B_FALSE;
+ return CORBA::B_FALSE;
else
return this->private_equal (tc, env);
}
// returns the Repository ID
-ACE_INLINE TAO_CONST CORBA_String
-CORBA_TypeCode::id (CORBA_Environment &env) const
+ACE_INLINE TAO_CONST CORBA::String
+CORBA_TypeCode::id (CORBA::Environment &env) const
{
env.clear ();
@@ -62,8 +63,8 @@ CORBA_TypeCode::id (CORBA_Environment &env) const
}
// returns the string name
-ACE_INLINE TAO_CONST CORBA_String
-CORBA_TypeCode::name (CORBA_Environment &env) const
+ACE_INLINE TAO_CONST CORBA::String
+CORBA_TypeCode::name (CORBA::Environment &env) const
{
env.clear ();
@@ -79,8 +80,8 @@ CORBA_TypeCode::name (CORBA_Environment &env) const
// Applicable to struct, union, enum, alias, and except
// For the rest of the cases, raises the BadKind exception.
-ACE_INLINE CORBA_ULong
-CORBA_TypeCode::member_count (CORBA_Environment &env) const
+ACE_INLINE CORBA::ULong
+CORBA_TypeCode::member_count (CORBA::Environment &env) const
{
env.clear ();
@@ -96,9 +97,9 @@ CORBA_TypeCode::member_count (CORBA_Environment &env) const
//
// Applicable only to struct, union, and except
-ACE_INLINE CORBA_TypeCode_ptr
-CORBA_TypeCode::member_type (CORBA_ULong index,
- CORBA_Environment &env) const
+ACE_INLINE CORBA::TypeCode_ptr
+CORBA_TypeCode::member_type (CORBA::ULong index,
+ CORBA::Environment &env) const
{
if (_private_state->tc_member_count_known_
&& _private_state->tc_member_type_list_known_)
@@ -107,7 +108,7 @@ CORBA_TypeCode::member_type (CORBA_ULong index,
return _private_state->tc_member_type_list_[index];
else
{
- env.exception (new CORBA_Bounds ());
+ env.exception (new CORBA::TypeCode::Bounds ());
return 0;
}
}
@@ -116,10 +117,10 @@ CORBA_TypeCode::member_type (CORBA_ULong index,
}
-// Return the label of the i-th member. Applicable only to tk_union
-ACE_INLINE CORBA_Any_ptr
-CORBA_TypeCode::member_label (CORBA_ULong index,
- CORBA_Environment &env) const
+// Return the label of the i-th member. Applicable only to CORBA::tk_union
+ACE_INLINE CORBA::Any_ptr
+CORBA_TypeCode::member_label (CORBA::ULong index,
+ CORBA::Environment &env) const
{
if (_private_state->tc_member_count_known_
&& _private_state->tc_member_label_list_known_)
@@ -128,7 +129,7 @@ CORBA_TypeCode::member_label (CORBA_ULong index,
return _private_state->tc_member_label_list_[index];
else
{
- env.exception (new CORBA_Bounds ());
+ env.exception (new CORBA::TypeCode::Bounds ());
return 0;
}
}
@@ -136,11 +137,11 @@ CORBA_TypeCode::member_label (CORBA_ULong index,
return private_member_label (index, env);
}
-// only applicable to tk_unions
-ACE_INLINE CORBA_TypeCode_ptr
-CORBA_TypeCode::discriminator_type (CORBA_Environment &env) const
+// only applicable to CORBA::tk_unions
+ACE_INLINE CORBA::TypeCode_ptr
+CORBA_TypeCode::discriminator_type (CORBA::Environment &env) const
{
- if (_kind == tk_union)
+ if (_kind == CORBA::tk_union)
{
if (_private_state->tc_discriminator_type_known_)
return _private_state->tc_discriminator_type_;
@@ -149,16 +150,16 @@ CORBA_TypeCode::discriminator_type (CORBA_Environment &env) const
}
else
{
- env.exception (new CORBA_BadKind ());
- return (CORBA_TypeCode_ptr)0;
+ env.exception (new CORBA::TypeCode::BadKind ());
+ return (CORBA::TypeCode_ptr)0;
}
}
-// only applicable to tk_unions
-ACE_INLINE CORBA_Long
-CORBA_TypeCode::default_index (CORBA_Environment &env) const
+// only applicable to CORBA::tk_unions
+ACE_INLINE CORBA::Long
+CORBA_TypeCode::default_index (CORBA::Environment &env) const
{
- if (_kind == tk_union)
+ if (_kind == CORBA::tk_union)
{
if (_private_state->tc_default_index_used_known_)
return _private_state->tc_default_index_used_;
@@ -167,20 +168,20 @@ CORBA_TypeCode::default_index (CORBA_Environment &env) const
}
else
{
- env.exception (new CORBA_BadKind ());
+ env.exception (new CORBA::TypeCode::BadKind ());
return 0;
}
}
// returns the length. Applicable only to string, sequence, and arrays
-ACE_INLINE CORBA_ULong
-CORBA_TypeCode::length (CORBA_Environment &env) const
+ACE_INLINE CORBA::ULong
+CORBA_TypeCode::length (CORBA::Environment &env) const
{
// a switch stmt, unfortunately, doesn't get inlined
- if (_kind == tk_sequence
- || _kind == tk_array
- || _kind == tk_string
- || _kind == tk_wstring)
+ if (_kind == CORBA::tk_sequence
+ || _kind == CORBA::tk_array
+ || _kind == CORBA::tk_string
+ || _kind == CORBA::tk_wstring)
{
if (_private_state->tc_length_known_)
return _private_state->tc_length_;
@@ -189,18 +190,18 @@ CORBA_TypeCode::length (CORBA_Environment &env) const
}
else
{
- env.exception (new CORBA_BadKind ());
+ env.exception (new CORBA::TypeCode::BadKind ());
return 0;
}
}
// returns the length. Applicable only to string, sequence, and arrays
-ACE_INLINE CORBA_TypeCode_ptr
-CORBA_TypeCode::content_type (CORBA_Environment &env) const
+ACE_INLINE CORBA::TypeCode_ptr
+CORBA_TypeCode::content_type (CORBA::Environment &env) const
{
- if (_kind == tk_sequence
- || _kind == tk_array
- || _kind == tk_alias)
+ if (_kind == CORBA::tk_sequence
+ || _kind == CORBA::tk_array
+ || _kind == CORBA::tk_alias)
{
if (_private_state->tc_content_type_known_)
return _private_state->tc_content_type_;
@@ -209,14 +210,14 @@ CORBA_TypeCode::content_type (CORBA_Environment &env) const
}
else
{
- env.exception (new CORBA_BadKind ());
+ env.exception (new CORBA::TypeCode::BadKind ());
return 0;
}
}
// calculate size of the typecode
ACE_INLINE size_t
-CORBA_TypeCode::size (CORBA_Environment &env)
+CORBA_TypeCode::size (CORBA::Environment &env)
{
if (_private_state->tc_size_known_)
return _private_state->tc_size_;
@@ -226,7 +227,7 @@ CORBA_TypeCode::size (CORBA_Environment &env)
// calculate alignment requirements of the typecode
ACE_INLINE size_t
-CORBA_TypeCode::alignment (CORBA_Environment &env)
+CORBA_TypeCode::alignment (CORBA::Environment &env)
{
if (_private_state->tc_alignment_known_)
return _private_state->tc_alignment_;
@@ -235,10 +236,10 @@ CORBA_TypeCode::alignment (CORBA_Environment &env)
}
// compute the padded size of the discriminant
-ACE_INLINE CORBA_ULong
-CORBA_TypeCode::TAO_discrim_pad_size (CORBA_Environment &env)
+ACE_INLINE CORBA::ULong
+CORBA_TypeCode::TAO_discrim_pad_size (CORBA::Environment &env)
{
- if (_kind == tk_union)
+ if (_kind == CORBA::tk_union)
{
if (_private_state->tc_discrim_pad_size_known_)
return _private_state->tc_discrim_pad_size_;
@@ -247,7 +248,7 @@ CORBA_TypeCode::TAO_discrim_pad_size (CORBA_Environment &env)
}
else
{
- env.exception (new CORBA_BadKind ());
+ env.exception (new CORBA::TypeCode::BadKind ());
return 0;
}
}