summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1998-03-22 19:16:16 +0000
committergokhale <asgokhale@users.noreply.github.com>1998-03-22 19:16:16 +0000
commita5509bf2e52906a3852541282b80064097f05ce8 (patch)
treedeca1cb2214bcee22bf90b514d99de662438b1c6
parente1dd361668324c67c29131110a05e1da8c31bc23 (diff)
downloadATCD-a5509bf2e52906a3852541282b80064097f05ce8.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c5
-rw-r--r--TAO/tao/Align.h25
-rw-r--r--TAO/tao/Any.cpp480
-rw-r--r--TAO/tao/Any.h55
-rw-r--r--TAO/tao/Any.i45
-rw-r--r--TAO/tao/CDR.h2
-rw-r--r--TAO/tao/Connect.cpp4
-rw-r--r--TAO/tao/Exception.cpp70
-rw-r--r--TAO/tao/Exception.h105
-rw-r--r--TAO/tao/Exception.i83
-rw-r--r--TAO/tao/GIOP.cpp41
-rw-r--r--TAO/tao/GIOP.h42
-rw-r--r--TAO/tao/IIOP_ORB.cpp10
-rw-r--r--TAO/tao/IIOP_Object.cpp6
-rw-r--r--TAO/tao/Marshal.h52
-rw-r--r--TAO/tao/NVList.cpp4
-rw-r--r--TAO/tao/ORB_Core.cpp31
-rw-r--r--TAO/tao/Operation_Table.cpp6
-rw-r--r--TAO/tao/Request.h39
-rw-r--r--TAO/tao/Servant_Base.cpp2
-rw-r--r--TAO/tao/Stub.h43
-rw-r--r--TAO/tao/Typecode.cpp15
-rw-r--r--TAO/tao/decode.cpp59
-rw-r--r--TAO/tao/deep_copy.cpp95
24 files changed, 558 insertions, 761 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index d75313f8b7b..dcc8f61d4df 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,8 @@
+Sun Mar 22 13:05:15 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu>
+
+ * tao: Added comments, made some modifications, and refined some
+ class definitions. Changes were made to a large number of files.
+
Sun Mar 22 08:00:08 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
* Naming_Service.h: Renamed tao_util.h to TAO.h.
diff --git a/TAO/tao/Align.h b/TAO/tao/Align.h
index 14a670b7f7d..08839254fbe 100644
--- a/TAO/tao/Align.h
+++ b/TAO/tao/Align.h
@@ -7,7 +7,7 @@
// TAO
//
// = FILENAME
-// align.h
+// Align.h
//
// = DESCRIPTION
// Pointer alignment utilities
@@ -46,16 +46,6 @@ typedef u_long long ptr_arith_t;
// boundaries are binary powers and that we're using two's complement
// arithmetic.
-#if 0
-static inline ptr_arith_t
-align_binary (const ptr_arith_t value,
- size_t alignment)
-{
- ptr_arith_t temp = alignment - 1;
-
- return (value + temp) & ~temp;
-}
-#endif /* 0 */
#define align_binary(ptr, alignment) \
((ptr + ((ptr_arith_t)((alignment)-1))) & (~((ptr_arith_t)((alignment)-1))))
@@ -63,19 +53,6 @@ align_binary (const ptr_arith_t value,
// all such boundaries are binary powers and that we're using two's
// complement arithmetic.
//
-// XXX Returned as "byte pointer" -- CDR module would change to be
-// seen as a "void *". May want to change this to add XDR cleanly.
-
-// @@ Andy, do we still need this function or is the macro sufficient?
-// If the macro is sufficient can we remove the function?
-#if 0
-static inline u_char *
-ptr_align_binary (const u_char *ptr,
- size_t alignment)
-{
- return (u_char *) align_binary ((ptr_arith_t) ptr, alignment);
-}
-#endif /* 0 */
#define ptr_align_binary(ptr, alignment) \
((u_char *) align_binary (((ptr_arith_t) (ptr)), (alignment)))
diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp
index eb7ab852c57..71cbc9fbd13 100644
--- a/TAO/tao/Any.cpp
+++ b/TAO/tao/Any.cpp
@@ -1,5 +1,37 @@
// @ (#) $Id$
+// Copyright 1994-1995 by Sun Microsystems Inc.
+// All Rights Reserved
+//
+// ORB: Implementation of CORBA_Any
+//
+// This includes three constructors, a destructor, and a "replace"
+// method for the "Any" data type. "Any" values pair a pointer to a
+// data structure in the native binary representation (e.g. C struct)
+// with a TypeCode that describes that data structure.
+//
+// The copy constructor and the destructor each use the TypeCode
+// interpreter with specialized "visit" callback routines. The
+// "visit" routines are used respectively to make "deep copies" and
+// perform "deep frees" of the aritrary values as described by the
+// "Any" value's typecode.
+//
+// Note that these "visit" routines are called directly, and they
+// choose whether or not to use the TypeCode interpreter to examine
+// constituents. In the simple cases, the "visit" routines can do
+// their work without any further calls; only for constructed types is
+// the interpreter's knowledge really required.
+//
+// THREADING NOTE: "Any" is a data structure which must be protected
+// by external critical sections. Like simpler numeric types, "Any"
+// instances are accessed and modified atomically. This
+// implementation is reentrant, so that independent "Any" values may
+// be manipulated concurrently when the underlying programming
+// environment is itself reentrant.
+//
+// COM NOTE: Yes, this is a utility data type whose implementation is
+// fully exposed. Factories for these are not normally used in C++.
+
#include "tao/corba.h"
CORBA::TypeCode_ptr
@@ -23,7 +55,7 @@ CORBA_Any::value (void) const
CORBA_Any::CORBA_Any (void)
: type_ (CORBA::_tc_null),
value_ (0),
- orb_owns_data_ (CORBA::B_FALSE),
+ any_owns_data_ (CORBA::B_FALSE),
refcount_ (1)
{
}
@@ -34,236 +66,19 @@ CORBA_Any::CORBA_Any (void)
CORBA_Any::CORBA_Any (CORBA::TypeCode_ptr tc,
void *value,
- CORBA::Boolean orb_owns_data)
+ CORBA::Boolean any_owns_data)
: type_ (tc),
value_ (value),
- orb_owns_data_ (orb_owns_data),
+ any_owns_data_ (any_owns_data),
refcount_ (1)
{
tc->AddRef ();
}
-// Helper routine for "Any" copy constructor ...
-//
-// "Deep Copy" from source to dest. Memory is always there to be
-// copied to ... if this calls itself recursively, it ensures that
-// this remains true (only really an issue for sequences) .
-//
-// This shows the main reason to pass two values to the "visit"
-// function used by the TypeCode interpreter: it allows the copy to be
-// made without using any additional temporary memory. Most other
-// 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,
- const void *source,
- const void *dest,
- void *, // no context
- CORBA::Environment &env)
-{
- CORBA::TypeCode::traverse_status retval;
- CORBA::TCKind my_kind;
-
- if (!tc)
- {
- env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO) );
- return CORBA::TypeCode::TRAVERSE_STOP;
- }
-
- my_kind = tc->kind (env);
-
- 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
- // platforms with non-IEEE floating point values or atypical byte
- // and word sizes.
- //
- // See the TypeCode interpreter code for more details about the
- // representational assumptions here.
-
- retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
-
- switch (my_kind)
- {
- case CORBA::tk_null:
- case CORBA::tk_void:
- break;
-
- case CORBA::tk_char:
- case CORBA::tk_octet:
- *(CORBA::Octet *) dest = *(CORBA::Octet *) source;
- break;
-
- case CORBA::tk_short:
- case CORBA::tk_ushort:
- *(CORBA::Short *) dest = *(CORBA::Short *) source;
- break;
-
- case CORBA::tk_wchar:
- *(CORBA::WChar *) dest = *(CORBA::WChar *) source;
- break;
-
- case CORBA::tk_long:
- case CORBA::tk_ulong:
- case CORBA::tk_float:
- *(CORBA::Long *) dest = *(CORBA::Long *) source;
- break;
-
- case CORBA::tk_longlong:
- case CORBA::tk_ulonglong:
- case CORBA::tk_double:
- *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source;
- break;
-
- case CORBA::tk_longdouble:
- *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source;
- break;
-
- case CORBA::tk_boolean:
- *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source;
- break;
-
- case CORBA::tk_any:
- (void) new (dest) CORBA_Any (*(CORBA_Any*) source);
- break;
-
- case CORBA::tk_TypeCode:
- if ((*(CORBA::TypeCode_ptr *) source) != 0)
- dest = source;
- else
- dest = CORBA::_tc_null;
- ((CORBA::TypeCode_ptr) dest)->AddRef ();
- break;
-
- case CORBA::tk_Principal:
- {
- CORBA::Principal_ptr src, dst;
-
- src = *(CORBA::Principal_ptr *) source;
- // @@ Andy, please make sure to check for memory failure.
- dst = *(CORBA::Principal_ptr *) dest = new CORBA::Principal;
-
- // Principals are just opaque IDs ... copy them
-
- assert (src->id.length <= UINT_MAX);
- dst->id.length = dst->id.maximum = src->id.length;
-
- if (dst->id.length > 0)
- {
- // @@ Andy, please make sure to check for memory failure.
- dst->id.buffer = new CORBA::Octet [(unsigned) dst->id.length];
- ACE_OS::memcpy (dst->id.buffer, src->id.buffer,
- (size_t) dst->id.length);
- }
- else
- dst->id.buffer = 0;
- }
- break;
-
- case CORBA::tk_objref:
- *(CORBA::Object_ptr *) dest =
- CORBA::Object::_duplicate (*(CORBA::Object_ptr *) source);
- break;
-
- case CORBA::tk_sequence:
- {
- 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;
-
- assert (src->length <= UINT_MAX);
- dst->length = dst->maximum = src->length;
-
- // Get the size of each "buffer" element
-
- tcp = tc->typecode_param (0, env);
-
- if (env.exception () != 0)
- {
- retval = CORBA::TypeCode::TRAVERSE_STOP;
- break;
- }
-
- size = tcp->size (env);
-
- if (env.exception () != 0)
- {
- retval = CORBA::TypeCode::TRAVERSE_STOP;
- break;
- }
- tcp->Release ();
-
- // Now allocate a new (uninitialized) buffer of the right size
- // to hold that many elements ... fall through and let a
- // general traverse fill in those buffer elements.
-
- size *= (size_t) src->length;
- dst->buffer = new CORBA::Octet[size];
- }
- // FALLTHROUGH
-
- 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,
- 0,
- env);
-
- 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 ();
-
- return tc->traverse (source,
- dest,
- (CORBA::TypeCode::VisitRoutine) deep_copy,
- 0,
- env);
-
- case CORBA::tk_enum:
- *(int *) dest = *(int *) source;
- break;
-
- case CORBA::tk_string:
- *(CORBA::String *) dest =
- CORBA::string_copy (*(CORBA::String *) source);
- break;
-
- 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 (CORBA::COMPLETED_NO) );
- retval = CORBA::TypeCode::TRAVERSE_STOP;
- break;
- }
- return retval;
-}
-
// Copy constructor for "Any".
-
CORBA_Any::CORBA_Any (const CORBA_Any &src)
: type_ (src.type_ != 0 ? src.type_ : CORBA::_tc_null),
- orb_owns_data_ (CORBA::B_TRUE),
+ any_owns_data_ (CORBA::B_TRUE),
refcount_ (1)
{
CORBA::Environment env;
@@ -271,189 +86,55 @@ CORBA_Any::CORBA_Any (const CORBA_Any &src)
this->type_->AddRef ();
- size = this->type_->size (env); // XXX check error status
- this->value_ = (char *) calloc (1, size);
-
-#if 0
- // @@ Andy, can we remove this code if its not needed?
- (void) this->type_->traverse (src.value_,
- value_,
- (CORBA::TypeCode::VisitRoutine) deep_copy,
- 0,
- env);
-#endif /* replaced by our optimizations */
+ size = this->type_->size (env);
+ // allocate sufficient memory and deep copy the data
+ // XXXTAO - the following allocation to be addressed by our memory management
+ // scheme
+ this->value_ = (char *) ACE_OS::calloc (1, size);
(void) DEEP_COPY (this->type_, src.value_, this->value_, env);
}
-//a&a : Added on 14 feb 1998
-
+// assignment operator
CORBA_Any &
CORBA_Any::operator= (const CORBA_Any &src)
{
CORBA::Environment env;
size_t size;
+ // check if it is a self assignment
if (this == &src)
{
this->AddRef ();
return *this;
}
- if (this->orb_owns_data_)
- DEEP_FREE (this->type_, this->value_, 0, env);
-
- // @@ Andy, can we remove this code if it's not needed?
- // this->Release (); // release any value + typecode we may have
+ // if we own any previous data, deallocate it
+ if (this->any_owns_data_)
+ {
+ DEEP_FREE (this->type_, this->value_, 0, env);
+ // XXXTAO: The following needs to be addressed properly. We need to make
+ // sure if we use "delete" or "free"
+ // delete this->value_;
+ }
// Now copy the contents of the source to ourselves.
this->type_ = (src.type_) != 0 ? src.type_ : CORBA::_tc_null;
- this->orb_owns_data_ = CORBA::B_TRUE;
+ this->any_owns_data_ = CORBA::B_TRUE;
this->refcount_ = 1;
this->type_->AddRef ();
- size = this->type_->size (env); // XXX check error status
- this->value_ = (char *) calloc (1, size);
+ size = this->type_->size (env);
+
+ // allocate sufficient storage and deep copy the data
+ // XXXTAO - address the following
+ this->value_ = (char *) ACE_OS::calloc (1, size);
(void) DEEP_COPY (this->type_, src.value_, this->value_, env);
return *this;
}
-// Helper routine for "Any" destructor.
-//
-// This frees all the memory pointed to by any given value held inside
-// of an "Any". For most data types it does nothing, since most data
-// types don't hold any memory. For a few, it recurses.
-//
-// This is one of the simplest typecode interpreter callbacks, since
-// 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,
- const void *value,
- const void *, // value2 unused
- void *, // context unused
- CORBA::Environment &env)
-{
- // Don't do anything if the value is a null pointer.
-
- if (!value)
- return CORBA::TypeCode::TRAVERSE_CONTINUE;
-
- CORBA::TypeCode::traverse_status retval;
- CORBA::TCKind my_kind;
-
- if (!tc)
- {
- env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO) );
- return CORBA::TypeCode::TRAVERSE_STOP;
- }
-
- my_kind = tc->kind (env);
-
- 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;
- switch (my_kind)
- {
- 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,
- 0,
- env);
-
- // XXX: Exceptions are currently leaked because of bugs lurking
- // in this area. Keep in mind that there are two things to
- // free: (a) the typecode in the exception base class; (b) any
- // pointers held by a user-defined exception, such as an objref
- // or string.
- //
- // Since this code does nothing, it should leak BOTH of those
- // kinds of memory. Since it's not supposed to be called except
- // when the exception really is being freed, it should only be
- // called when the reference count in the exception base class
- // is zero.
- //
- // It's not clear which of those assertions actually hold.
- //
- // The code SHOULD be just like the traverse () call for a
- // structure, with (a) a precondition that the reference count
- // is zero, (b) an assertion that the typecode in the exception
- // and "tc" are equivalent, (c) releasing that typecode found
- // within the exception.
- //
- case CORBA::tk_except:
- return retval;
-
- case CORBA::tk_sequence:
- retval = tc->traverse (value,
- 0,
- (CORBA::TypeCode::VisitRoutine) deep_free,
- 0,
- env);
- // @@ This better be allocated via new[].
- //
- // @@ (ANDY) I'm not sure what to do here...should I delete the
- // value? It seems that the DTOR for the sequence will insure
- // that this buffer goes away.
- delete [] ((CORBA::OctetSeq *) value)->buffer;
- break;
-
- case CORBA::tk_TypeCode:
- if ((*(CORBA::TypeCode_ptr *) value) != 0)
- (*(CORBA::TypeCode_ptr *) value)->Release ();
- break;
-
- case CORBA::tk_Principal:
- CORBA::release (*(CORBA::Principal_ptr *) value);
- break;
-
- case CORBA::tk_objref:
- CORBA::release (*(CORBA::Object_ptr *) value);
- break;
-
- case CORBA::tk_string:
- CORBA::string_free (*(CORBA::String *) value);
- *(CORBA::String *)value = 0;
- break;
-
- case CORBA::tk_wstring:
- CORBA::wstring_free (*(CORBA::WString *) value);
- *(CORBA::WString *)value = 0;
- break;
-
- 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.
-
- dmsg ("Delete Any-in-Any ... memory leak with BC++ 4.5");
-#else
- ((CORBA_Any *) value)->~CORBA_Any ();
-#endif /* __BORLANDC__ */
- break;
-
- default:
- return CORBA::TypeCode::TRAVERSE_CONTINUE;
- }
-
- if (env.exception_type () != CORBA::NO_EXCEPTION)
- return CORBA::TypeCode::TRAVERSE_STOP;
- else
- return retval;
-}
-
// Destructor for an "Any" deep-frees memory if needed.
//
// NOTE that the assertion below will fire on application programmer
@@ -469,16 +150,13 @@ CORBA_Any::~CORBA_Any (void)
// assert (this->refcount_ == 0);
- if (this->orb_owns_data_)
- // @@ Andy, do we still need the deep_free() function call? If
- // not, can we remove it?
- // (void) deep_free (type_, value_, 0, 0, env);
- DEEP_FREE (this->type_, this->value_, 0, env);
- // @@ Andy, is the following comment still true? If not, can we remove it?
-
- // TODO: This crashes the server on NT, apparently the previous
- // DEEP_FREE does the job and make the delete operator uneeded.
- // delete value_;
+ if (this->any_owns_data_)
+ {
+ // we own the data. So first do a deep free and then deallocate it.
+ DEEP_FREE (this->type_, this->value_, 0, env);
+ // XXXTAO - address the following
+ // delete this->value_;
+ }
if (this->type_)
this->type_->Release ();
@@ -489,30 +167,29 @@ CORBA_Any::~CORBA_Any (void)
void
CORBA_Any::replace (CORBA::TypeCode_ptr tc,
const void *v,
- CORBA::Boolean orb_owns_data,
+ CORBA::Boolean any_owns_data,
CORBA::Environment &env)
{
- if (this->orb_owns_data_)
+ if (this->any_owns_data_)
{
- // @@ Andy, do we still need the deep_free() function call? If
- // not, can we remove it?
- // (void) deep_free (type_, value_, 0, 0, env);
- if (value_)
- DEEP_FREE (this->type_, this->value_, 0, env);
- // @@ Andy, is this delete ok? The one in the destructor is
- // commented out...
- delete this->value_;
+ if (this->value_)
+ {
+ DEEP_FREE (this->type_, this->value_, 0, env);
+ // XXXTAO - to be addressed
+ // delete this->value_;
+ }
}
+ if (env.exception ())
+ return;
+
if (this->type_ != 0)
this->type_->Release ();
- env.clear ();
-
this->type_ = tc;
tc->AddRef ();
this->value_ = (void *) v;
- this->orb_owns_data_ = orb_owns_data;
+ this->any_owns_data_ = any_owns_data;
}
// insertion of from_string
@@ -539,11 +216,12 @@ CORBA_Any::operator<<= (from_string s)
else
tc = CORBA::_tc_string; // unbounded.
+ CORBA::Environment env;
if (s.nocopy_)
- this->replace (tc, new char* (s.val_), CORBA::B_TRUE);
+ this->replace (tc, new char* (s.val_), CORBA::B_TRUE, env);
else // copying
this->replace (tc, new char* (CORBA::string_dup (s.val_)),
- CORBA::B_TRUE);
+ CORBA::B_TRUE, env);
}
// Extraction: these are safe and hence we have to check that the
diff --git a/TAO/tao/Any.h b/TAO/tao/Any.h
index 1f9b47b57bd..4b5d7979c59 100644
--- a/TAO/tao/Any.h
+++ b/TAO/tao/Any.h
@@ -59,13 +59,14 @@ public:
};
// = Initialization and termination operations.
+
CORBA_Any (void);
// Default constructor.
CORBA_Any (CORBA::TypeCode_ptr type,
void *value = 0,
- CORBA::Boolean orb_owns_data = CORBA::B_FALSE);
- // Constructor.
+ CORBA::Boolean any_owns_data = CORBA::B_FALSE);
+ // Constructor. The any_owns_data flag determines if the Any owns the value
CORBA_Any (const CORBA_Any &a);
// Copy constructor.
@@ -156,7 +157,8 @@ public:
struct from_string
{
- from_string (char* s, CORBA::ULong b,
+ from_string (char* s,
+ CORBA::ULong b,
CORBA::Boolean nocopy = CORBA::B_FALSE);
char *val_;
CORBA::ULong bound_;
@@ -176,7 +178,7 @@ public:
// insert a bounded string
// = Special types.
-
+
// These extract octets, chars, booleans, bounded strings, and
// object references
@@ -212,33 +214,56 @@ public:
};
// extraction of the special types
+
CORBA::Boolean operator>>= (to_boolean) const;
+ // extract a boolean
+
CORBA::Boolean operator>>= (to_octet) const;
+ // extract an octet
+
CORBA::Boolean operator>>= (to_char) const;
+ // extract a char
+
CORBA::Boolean operator>>= (to_string) const;
+ // extract a bounded string
+
CORBA::Boolean operator>>= (to_object) const;
+ // extract an object reference
// = ALLOCATION
+
void *operator new (size_t, const void *p);
// Placement new.
+
void *operator new (size_t s);
// Default new.
+
void operator delete (void *p);
// Default delete
+ // the following are unsafe operations
+ // ORBOS/90-01-11, pg 672: For C++ mapping using the CORBA::Environment
+ // parameter, two forms of the replace method are provided.
+
void replace (CORBA::TypeCode_ptr type,
const void *value,
- CORBA::Boolean orb_owns_data,
+ CORBA::Boolean any_owns_data,
CORBA::Environment &env);
// Replace the current typecode and data with the specified one -
// unsafe.
+ void replace (CORBA::TypeCode_ptr type,
+ const void *value,
+ CORBA::Environment &env);
+ // Replace the current typecode and data with the specified one -
+ // unsafe. This uses a default value for the "any_owns_data" parameter
+
CORBA::TypeCode_ptr type (void) const;
// Return TypeCode of the element stored in the Any.
const void *value (void) const;
// Returns 0 if the Any has not been assigned a value, following the
- // CORBA spec (TODO: give a reference) it returns a non-zero value
+ // CORBA spec (ORBOS/98-01-11) it returns a non-zero value
// otherwise. TAO does *not* guarantee that this value may be casted
// to the contained type safely.
@@ -253,18 +278,12 @@ private:
void *value_;
// Value for the <Any>.
- CORBA::Boolean orb_owns_data_;
+ CORBA::Boolean any_owns_data_;
// Flag that indicates the ORB is responsible for deleting the data.
CORBA::ULong refcount_;
// Reference count the <Any> to reduce copying costs.
- void replace (CORBA::TypeCode_ptr type,
- const void *value,
- CORBA::Boolean orb_owns_data);
- // Helper for extraction operators that don't pass an environment
- // parameter.
-
// 94-9-14 hides unsigned char insert/extract
void operator<<= (unsigned char);
CORBA::Boolean operator>>= (unsigned char&) const;
@@ -274,7 +293,7 @@ class TAO_Export CORBA_Any_var
{
// = TITLE
// Provide for automatic storage deallocation on going out of
- // scope.
+ // scope.
public:
CORBA_Any_var (void);
// default constructor
@@ -321,9 +340,13 @@ private:
};
class TAO_Export CORBA_Any_out
- // = TITLE
- // @@ (ANDY) Please document me.
{
+ // = TITLE
+ // CORBA_Any_out
+ //
+ // = DESCRIPTION
+ // The _out class for CORBA_Any. This is used to help in managing the out
+ // parameters.
public:
// = operations.
diff --git a/TAO/tao/Any.i b/TAO/tao/Any.i
index 2b4e36a6afd..55c740cf42a 100644
--- a/TAO/tao/Any.i
+++ b/TAO/tao/Any.i
@@ -20,15 +20,14 @@ CORBA_Any::operator delete (void *p)
// Insertion from special types.
-// @@ Andy, please take a look at this method and make sure it's what
-// you intended. I couldn't find it defined anywhere. --cjc
ACE_INLINE void
CORBA_Any::replace (CORBA::TypeCode_ptr type,
const void *value,
- CORBA::Boolean orb_owns_data)
+ CORBA::Environment &env)
{
- CORBA_Environment e;
- this->replace (type, value, orb_owns_data, e);
+ // invoke the first form of the replace method and pass the default value
+ // (FALSE) for the "any_owns_data" parameter
+ this->replace (type, value, CORBA::B_FALSE, env);
}
// insertion operators
@@ -36,51 +35,59 @@ CORBA_Any::replace (CORBA::TypeCode_ptr type,
ACE_INLINE void
CORBA_Any::operator<<= (CORBA::Short s)
{
- this->replace (CORBA::_tc_short, new CORBA::Short (s), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_short, new CORBA::Short (s), CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (CORBA::UShort s)
{
- this->replace (CORBA::_tc_ushort, new CORBA::UShort (s), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_ushort, new CORBA::UShort (s), CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (CORBA::Long l)
{
- this->replace (CORBA::_tc_long, new CORBA::Long (l), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_long, new CORBA::Long (l), CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (CORBA::ULong l)
{
- this->replace (CORBA::_tc_ulong, new CORBA::ULong (l), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_ulong, new CORBA::ULong (l), CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (CORBA::Float f)
{
- this->replace (CORBA::_tc_float, new CORBA::Float (f), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_float, new CORBA::Float (f), CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (CORBA::Double d)
{
- this->replace (CORBA::_tc_double, new CORBA::Double (d), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_double, new CORBA::Double (d), CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (const CORBA_Any& a)
{
- this->replace (CORBA::_tc_any, new CORBA_Any (a), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_any, new CORBA_Any (a), CORBA::B_TRUE, env);
}
// this is a copying version for unbounded strings
ACE_INLINE void
CORBA_Any::operator<<= (const char* s)
{
+ CORBA::Environment env;
this->replace (CORBA::_tc_string, new char* (CORBA::string_dup (s)),
- CORBA::B_TRUE);
+ CORBA::B_TRUE, env);
}
// implementing the special types
@@ -147,19 +154,25 @@ CORBA_Any::to_object::to_object (CORBA::Object_ptr &obj)
ACE_INLINE void
CORBA_Any::operator<<= (from_boolean b)
{
- this->replace (CORBA::_tc_boolean, new CORBA::Boolean (b.val_), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_boolean, new CORBA::Boolean (b.val_),
+ CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (from_octet o)
{
- this->replace (CORBA::_tc_octet, new CORBA::Octet (o.val_), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_octet, new CORBA::Octet (o.val_),
+ CORBA::B_TRUE, env);
}
ACE_INLINE void
CORBA_Any::operator<<= (from_char c)
{
- this->replace (CORBA::_tc_char, new CORBA::Char (c.val_), CORBA::B_TRUE);
+ CORBA::Environment env;
+ this->replace (CORBA::_tc_char, new CORBA::Char (c.val_),
+ CORBA::B_TRUE, env);
}
// ----------------------------------------------------------------------
diff --git a/TAO/tao/CDR.h b/TAO/tao/CDR.h
index b8812720e5f..6709f697a35 100644
--- a/TAO/tao/CDR.h
+++ b/TAO/tao/CDR.h
@@ -37,7 +37,7 @@
//
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems, Inc.
-// Many enhancements added by Andy Gokhake and Carlos O'Ryan.
+// Many enhancements added by Aniruddha Gokhale and Carlos O'Ryan.
//
// ============================================================================
diff --git a/TAO/tao/Connect.cpp b/TAO/tao/Connect.cpp
index 815c1f04122..8c073796106 100644
--- a/TAO/tao/Connect.cpp
+++ b/TAO/tao/Connect.cpp
@@ -277,8 +277,8 @@ TAO_Server_Connection_Handler::handle_request (const TAO_GIOP_RequestHeader &hdr
env);
svr_req.release ();
#if 0
- // XXXASG - this commented out code must remain here since the DSI will use
- // it.
+ // XXXTAO (ASG) - this commented out code must remain here since the DSI will use
+ // it. Please keep it here until I have figured out the best way out 03/22/98.
// If no reply is necessary (i.e., oneway), then return!
if (hdr.response_expected == 0)
diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp
index 7c8e59d1da0..baf4a737f87 100644
--- a/TAO/tao/Exception.cpp
+++ b/TAO/tao/Exception.cpp
@@ -19,18 +19,18 @@ CORBA_Exception::CORBA_Exception (CORBA::TypeCode_ptr tc)
: type_ (tc),
refcount_ (0)
{
- if (type_)
- type_->AddRef ();
- assert (type_ != 0);
+ if (this->type_)
+ this->type_->AddRef ();
+ assert (this->type_ != 0);
}
CORBA_Exception::CORBA_Exception (const CORBA_Exception &src)
: type_ (src.type_),
refcount_ (0)
{
- if (type_)
- type_->AddRef ();
- assert (type_ != 0);
+ if (this->type_)
+ this->type_->AddRef ();
+ assert (this->type_ != 0);
}
// NOTE: It's this code, not anything defined in a subclass, which
@@ -39,8 +39,8 @@ CORBA_Exception::CORBA_Exception (const CORBA_Exception &src)
CORBA_Exception::~CORBA_Exception (void)
{
- assert (refcount_ == 0);
- assert (type_ != 0);
+ assert (this->refcount_ == 0);
+ assert (this->type_ != 0);
assert (1 == 2);
}
@@ -48,12 +48,12 @@ CORBA_Exception::~CORBA_Exception (void)
CORBA_Exception &
CORBA_Exception::operator = (const CORBA_Exception &src)
{
- if (type_)
- type_->Release ();
- type_ = src.type_;
- if (type_)
- type_->AddRef ();
- assert (type_ != 0);
+ if (this->type_)
+ this->type_->Release ();
+ this->type_ = src.type_;
+ if (this->type_)
+ this->type_->AddRef ();
+ assert (this->type_ != 0);
return *this;
}
@@ -63,8 +63,8 @@ CORBA_Exception::_id (void) const
{
CORBA::Environment env;
- if (type_)
- return type_->id (env);
+ if (this->type_)
+ return this->type_->id (env);
else
return 0;
}
@@ -72,7 +72,7 @@ CORBA_Exception::_id (void) const
TAO_CONST CORBA::TypeCode_ptr
CORBA_Exception::_type (void) const
{
- return type_;
+ return this->type_;
}
int
@@ -84,19 +84,19 @@ CORBA_Exception::_is_a (const char* repository_id) const
CORBA::ULong
CORBA_Exception::AddRef (void)
{
- return ++refcount_;
+ return ++this->refcount_;
}
CORBA::ULong
CORBA_Exception::Release (void)
{
- refcount_--;
- if (refcount_ != 0)
- return refcount_;
+ this->refcount_--;
+ if (this->refcount_ != 0)
+ return this->refcount_;
// CORBA::TypeCode_ptr tc = type_->_duplicate ();
- CORBA::Any free_it_all (type_, this, CORBA::B_TRUE);
+ CORBA::Any free_it_all (this->type_, this, CORBA::B_TRUE);
// tc->Release ();
@@ -134,8 +134,8 @@ CORBA_SystemException::CORBA_SystemException (CORBA::TypeCode_ptr tc,
CORBA::ULong code,
CORBA::CompletionStatus completed)
: CORBA_Exception (tc),
- _minor (code),
- _completed (completed)
+ minor_ (code),
+ completed_ (completed)
{
}
@@ -287,7 +287,7 @@ TAO_Exceptions::make_standard_typecode (CORBA::TypeCode_ptr tcp,
// Declare static storage for these ... the buffer is "naturally"
// aligned and overwritten.
//
-// XXX this actually doesn't guarantee "natural" alignment, but
+// XXXTAO this actually doesn't guarantee "natural" alignment, but
// it works that way in most systems.
#define TAO_SYSTEM_EXCEPTION(name) \
@@ -303,9 +303,9 @@ TAO_Exceptions::init_standard_exceptions (CORBA::Environment &env)
// Initialize the list of system exceptions, used when
// unmarshaling.
TAO_Exceptions::system_exceptions.length = 0;
- TAO_Exceptions::system_exceptions.maximum =
+ TAO_Exceptions::system_exceptions.maximum =
TAO_Exceptions::NUM_SYS_EXCEPTIONS;
- TAO_Exceptions::system_exceptions.buffer =
+ TAO_Exceptions::system_exceptions.buffer =
&TAO_Exceptions::sys_exceptions [0];
// Initialize the typecodes.
@@ -399,14 +399,14 @@ CORBA::Environment::exception_type (void) const
static char sysex_prefix [] = "IDL:omg.org/CORBA/";
static char typecode_extra [] = "TypeCode/";
- if (!_exception)
+ if (!this->exception_)
return CORBA::NO_EXCEPTION;
// All exceptions currently (CORBA 2.0) defined in the CORBA
// scope are system exceptions ... except for a couple that
// are related to TypeCodes.
- const char *id = _exception->_id ();
+ const char *id = this->exception_->_id ();
if (ACE_OS::strncmp (id, sysex_prefix, sizeof sysex_prefix - 1) == 0
&& ACE_OS::strncmp (id + sizeof sysex_prefix - 1,
@@ -423,21 +423,21 @@ void
CORBA::Environment::print_exception (const char *info,
FILE *) const
{
- const char *id = this->_exception->_id ();
+ const char *id = this->exception_->_id ();
ACE_DEBUG ((LM_ERROR, "(%P|%t) EXCEPTION, %s\n", info));
- // XXX get rid of this logic, and rely on some member function on
+ // XXXTAO get rid of this logic, and rely on some member function on
// Exception to say if it's user or system exception.
if (ACE_OS::strncmp ((char *) id, "IDL:omg.org/CORBA/", 10) == 0
&& ACE_OS::strncmp ((char *) id, "IDL:omg.org/CORBA/TypeCode/", 19) != 0)
{
- // XXX this should be a QueryInterface call instead.
+ // XXXTAO this should be a QueryInterface call instead.
CORBA::SystemException *x2 =
- (CORBA::SystemException *) this->_exception;
+ (CORBA::SystemException *) this->exception_;
- // XXX there are a other few "user exceptions" in the CORBA
+ // XXXTAO there are a other few "user exceptions" in the CORBA
// scope, they're not all standard/system exceptions ... really
// need to either compare exhaustively against all those IDs
// (yeech) or (preferably) to represent the exception type
@@ -455,7 +455,7 @@ CORBA::Environment::print_exception (const char *info,
"garbage"));
}
else
- // XXX we can use the exception's typecode to dump all the data
+ // XXXTAO we can use the exception's typecode to dump all the data
// held within it ...
ACE_DEBUG ((LM_ERROR,
diff --git a/TAO/tao/Exception.h b/TAO/tao/Exception.h
index 7382628fa43..b1f432f5aa5 100644
--- a/TAO/tao/Exception.h
+++ b/TAO/tao/Exception.h
@@ -8,7 +8,7 @@
// = FILENAME
// except.h
//
-// = DESCRTION
+// = DESCRIPTION
// This file defines way in which CORBA exceptions are reported.
//
// = AUTHOR
@@ -22,25 +22,40 @@
class TAO_Export CORBA_Exception
{
// = TITLE
- // CORBA2-specified exception hierarchy.
+ // CORBA_Exception
//
// = DESCRIPTION
+ // CORBA2-specified exception hierarchy.
// All exceptions have a type (represented by a TypeCode) and a
// widely 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:
+public:
CORBA_Exception (const CORBA_Exception &src);
+ // copy constructor
+
CORBA_Exception &operator = (const CORBA_Exception &src);
+ // assignment operator
+
+ virtual ~CORBA_Exception (void);
+ // destructor
// = Memory allocators.
void *operator new (size_t, const void *p);
void *operator new (size_t s);
void operator delete (void *p);
+ // these are extensions
+
+ CORBA_Exception (CORBA::TypeCode_ptr type);
+ // constructor from a TypeCode
+
const char *_id (void) const;
+ // return the repository ID of the Exception
+
TAO_CONST CORBA::TypeCode_ptr _type (void) const;
+ // return the TypeCode corresponding to the currently stored
// = To implement the narrow method.
virtual int _is_a (const char* repository_id) const;
@@ -49,10 +64,10 @@ class TAO_Export CORBA_Exception
CORBA::ULong AddRef (void);
CORBA::ULong Release (void);
- CORBA_Exception (CORBA::TypeCode_ptr type);
- virtual ~CORBA_Exception (void);
-
protected:
+ CORBA_Exception (void);
+ // default constructor is protected
+
CORBA::TypeCode_ptr type_;
// Type of the Exception.
@@ -67,49 +82,88 @@ class TAO_Export CORBA_UserException : public CORBA_Exception
// User exceptions are those defined by application developers
// using OMG-IDL.
public:
+ CORBA_UserException (void);
+ // default constructor
+
+ CORBA_UserException (const CORBA_UserException &src);
+ // copy ctor
+
CORBA_UserException (CORBA::TypeCode_ptr tc);
+ // constructor from a TypeCode
+
~CORBA_UserException (void);
+ // destructor
+
+ CORBA_UserException &operator= (const CORBA_UserException &src);
+ // assignment operator
- virtual int _is_a (const char *interface_id) const;
static CORBA_UserException *_narrow (CORBA_Exception *exception);
+ // the narrow operation
-protected:
- // Copy and assignment operators.
- // @@ Andy, should these be added here?
+ // extension
+
+ virtual int _is_a (const char *interface_id) const;
+ // used for narrowing
};
class TAO_Export CORBA_SystemException : public CORBA_Exception
{
// = TITLE
+ // CORBA_SystemException
+ //
+ // = DESCRIPTION
// System exceptions are those defined in the CORBA spec; OMG-IDL
// defines these.
public:
- // = 94-9-14 sez: public copy constructor and assignment operator.
- CORBA_SystemException (CORBA::TypeCode_ptr tc,
- CORBA::ULong code,
- CORBA::CompletionStatus completed);
+ CORBA_SystemException (void);
+ // default ctor
+
+ CORBA_SystemException (const CORBA_SystemException &src);
+ // copy ctor
~CORBA_SystemException (void);
+ // destructor
+
+ CORBA_SystemException &operator= (const CORBA_SystemException &src);
+ // assignment operator
CORBA::ULong minor (void) const;
+ // get the minor status
+
void minor (CORBA::ULong m);
+ // set the minor status
CORBA::CompletionStatus completion (void) const;
+ // get the completion status
void completion (CORBA::CompletionStatus c);
+ // set the operation completion status
- virtual int _is_a (const char *type_id) const;
static CORBA_SystemException *_narrow (CORBA_Exception* exception);
+ // narrow to a SystemException
+
+ // extension
+
+ CORBA_SystemException (CORBA::TypeCode_ptr tc,
+ CORBA::ULong code,
+ CORBA::CompletionStatus completed);
+ // ctor using a TypeCode
+ virtual int _is_a (const char *type_id) const;
+ // helper for the _narrow operation
private:
- CORBA::ULong _minor;
- CORBA::CompletionStatus _completed;
+ CORBA::ULong minor_;
+ // minor code
+
+ CORBA::CompletionStatus completed_;
+ // completion status
+
};
// Declarations for all of the CORBA standard exceptions.
//
-// XXX shouldn't have a default minor code, at least for code that's
+// XXXTAO - shouldn't have a default minor code, at least for code that's
// inside the ORB. All minor codes should be symbolically catalogued.
#define TAO_SYSTEM_EXCEPTION(name) \
@@ -153,16 +207,22 @@ TAO_SYSTEM_EXCEPTION(DATA_CONVERSION);
#undef TAO_SYSTEM_EXCEPTION
class TAO_Export CORBA_Environment
+{
// = TITLE
+ // CORBA_Environment
+ //
+ // = DESCRIPTION
// 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:
// = Initialization and termination methods.
CORBA_Environment (void);
+ // ctor
+
~CORBA_Environment (void);
+ // dtor
CORBA::Exception_ptr exception (void) const;
// Return the exception. Caller must call AddRef() in order to keep
@@ -172,7 +232,10 @@ public:
// Set the exception to <ex>, taking a reference on it.
CORBA::ExceptionType exception_type (void) const;
+ // return the typecode for the exception
+
TAO_CONST CORBA::String exception_id (void) const;
+ // return the repository ID for the exception
void clear (void);
// Clear the exception.
@@ -182,7 +245,7 @@ public:
// print the exception to output determined by f
private:
- CORBA::Exception_ptr _exception;
+ CORBA::Exception_ptr exception_;
// Pointer to the exception object contained in the environment.
// = These are not provided.
@@ -194,7 +257,7 @@ class TAO_Export TAO_Exceptions
{
// = TITLE
// This class is a namespace for exception-related static data and
- // methods.
+ // methods.
public:
static void make_standard_typecode (CORBA::TypeCode_ptr tcp,
diff --git a/TAO/tao/Exception.i b/TAO/tao/Exception.i
index dc3bb7ccbdc..70cfd707c0e 100644
--- a/TAO/tao/Exception.i
+++ b/TAO/tao/Exception.i
@@ -3,81 +3,80 @@
ACE_INLINE void *
CORBA_Exception::operator new (size_t,
const void *p)
-{
- return (void *) p;
+{
+ return (void *) p;
}
ACE_INLINE void *
-CORBA_Exception::operator new (size_t s)
-{
- return ::operator new (s);
+CORBA_Exception::operator new (size_t s)
+{
+ return ::operator new (s);
}
-ACE_INLINE void
-CORBA_Exception::operator delete (void *p)
-{
- ::operator delete (p);
+ACE_INLINE void
+CORBA_Exception::operator delete (void *p)
+{
+ ::operator delete (p);
}
-ACE_INLINE CORBA::ULong
-CORBA_SystemException::minor (void) const
-{
- return _minor;
+ACE_INLINE CORBA::ULong
+CORBA_SystemException::minor (void) const
+{
+ return this->minor_;
}
-ACE_INLINE void
-CORBA_SystemException::minor (CORBA::ULong m)
-{
- _minor = m;
+ACE_INLINE void
+CORBA_SystemException::minor (CORBA::ULong m)
+{
+ this->minor_ = m;
}
-ACE_INLINE CORBA::CompletionStatus
-CORBA_SystemException::completion (void) const
-{
- return _completed;
+ACE_INLINE CORBA::CompletionStatus
+CORBA_SystemException::completion (void) const
+{
+ return this->completed_;
}
ACE_INLINE void
-CORBA_SystemException::completion (CORBA::CompletionStatus c)
-{
- _completed = c;
+CORBA_SystemException::completion (CORBA::CompletionStatus c)
+{
+ this->completed_ = c;
}
-ACE_INLINE
+ACE_INLINE
CORBA_Environment::CORBA_Environment (void)
- : _exception (0)
+ : exception_ (0)
{
}
-ACE_INLINE void
+ACE_INLINE void
CORBA_Environment::clear (void)
{
- if (_exception)
+ if (this->exception_)
{
- _exception->Release ();
- _exception = 0; // XXX
+ this->exception_->Release ();
}
}
-ACE_INLINE
-CORBA_Environment::~CORBA_Environment (void)
-{
- this->clear ();
+ACE_INLINE
+CORBA_Environment::~CORBA_Environment (void)
+{
+ this->clear ();
}
-ACE_INLINE
-CORBA::Exception_ptr CORBA_Environment::exception (void) const
-{
- return _exception;
+ACE_INLINE
+CORBA::Exception_ptr CORBA_Environment::exception (void) const
+{
+ return this->exception_;
}
-ACE_INLINE void
+ACE_INLINE void
CORBA_Environment::exception (CORBA::Exception *ex)
{
- if (ex != _exception)
+ if (ex != this->exception_)
{
this->clear ();
- _exception = ex;
- _exception->AddRef ();
+ this->exception_ = ex;
+ this->exception_->AddRef ();
}
}
diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp
index 557c001d7f1..ace8c2ebada 100644
--- a/TAO/tao/GIOP.cpp
+++ b/TAO/tao/GIOP.cpp
@@ -38,7 +38,7 @@
// ORB client is not allowed to rely on semantic implications of such
// a model.
//
-// XXX there is lots of unverified I/O here. In all cases, if an
+// XXXTAO there is lots of unverified I/O here. In all cases, if an
// error is detected when marshaling or unmarshaling, it should be
// reported.
@@ -107,7 +107,7 @@ TAO_GIOP::send_request (TAO_SVC_HANDLER *handler,
// versions seem to need it though. Leaving it costs little.
TAO_GIOP::dump_msg ("send",
- ACE_reinterpret_cast (u_char *, buf),
+ ACE_reinterpret_cast (u_char *, buf),
buflen);
ACE_SOCK_Stream &peer = handler->peer ();
@@ -137,7 +137,7 @@ TAO_GIOP::send_request (TAO_SVC_HANDLER *handler,
// On error or EOF, report the fault, close the connection, and
// mark it as unusable/defunct.
//
- // XXX on client side write errors, we may hit the case that the
+ // XXXTAO on client side write errors, we may hit the case that the
// server did a clean shutdown but we've not yet read the
// GIOP::CloseConnection message. If we get an error, we need
// to see if there is such a message waiting for us, and if so
@@ -197,8 +197,8 @@ static const char
close_message [TAO_GIOP_HEADER_LEN] =
{
'G', 'I', 'O', 'P',
- MY_MAJOR,
- MY_MINOR,
+ TAO_GIOP_MessageHeader::MY_MAJOR,
+ TAO_GIOP_MessageHeader::MY_MINOR,
TAO_ENCAP_BYTE_ORDER,
TAO_GIOP::CloseConnection,
0, 0, 0, 0
@@ -211,7 +211,7 @@ TAO_GIOP::close_connection (TAO_Client_Connection_Handler *&handler,
// It's important that we use a reliable shutdown after we send this
// message, so we know it's received.
//
- // XXX should recv and discard queued data for portability; note
+ // XXXTAO should recv and discard queued data for portability; note
// that this won't block (long) since we never set SO_LINGER
TAO_GIOP::dump_msg ("send",
@@ -237,8 +237,8 @@ static const char
error_message [TAO_GIOP_HEADER_LEN] =
{
'G', 'I', 'O', 'P',
- MY_MAJOR,
- MY_MINOR,
+ TAO_GIOP_MessageHeader::MY_MAJOR,
+ TAO_GIOP_MessageHeader::MY_MINOR,
TAO_ENCAP_BYTE_ORDER,
TAO_GIOP::MessageError,
0, 0, 0, 0
@@ -247,7 +247,7 @@ error_message [TAO_GIOP_HEADER_LEN] =
void
TAO_GIOP::send_error (TAO_Client_Connection_Handler *&handler)
{
- TAO_GIOP::dump_msg ("send",
+ TAO_GIOP::dump_msg ("send",
(const u_char *) error_message,
TAO_GIOP_HEADER_LEN);
handler->peer ().send_n (error_message, TAO_GIOP_HEADER_LEN);
@@ -342,7 +342,7 @@ TAO_GIOP::recv_request (TAO_SVC_HANDLER *&handler,
connection.get_handle ()));
ACE_TIMEPROBE (" -> GIOP::recv_request - EOF");
return TAO_GIOP::EndOfFile;
- // XXX should probably find some way to report this without
+ // XXXTAO should probably find some way to report this without
// an exception, since for most servers it's not an error.
// Is it _never_ an error? Not sure ...
/* NOTREACHED */
@@ -389,7 +389,8 @@ TAO_GIOP::recv_request (TAO_SVC_HANDLER *&handler,
// Then make sure the major version is ours, and the minor version
// is one that we understand.
- if (!(bufptr [4] == MY_MAJOR && bufptr [5] <= MY_MINOR))
+ if (!(bufptr [4] == TAO_GIOP_MessageHeader::MY_MAJOR
+ && bufptr [5] <= TAO_GIOP_MessageHeader::MY_MINOR))
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); // header
ACE_DEBUG ((LM_DEBUG, "bad header, version\n"));
@@ -535,7 +536,7 @@ TAO_GIOP_Invocation::~TAO_GIOP_Invocation (void)
// CDR typecode octets.
static const CORBA::Long _oc_opaque [] =
-{
+{
TAO_ENCAP_BYTE_ORDER, // native endian + padding; "tricky"
10, // ... (sequence of) octets
@@ -776,7 +777,7 @@ TAO_GIOP_Invocation::start (CORBA::Environment &env)
const char *
TAO_GIOP::message_name (TAO_GIOP::Message_Type which)
{
- static const char *msgnames[] =
+ static const char *msgnames[] =
{
"EndOfFile (nonstd)",
"Request (client)",
@@ -814,13 +815,13 @@ TAO_GIOP_Invocation::invoke (CORBA::ExceptionList &exceptions,
this->handler_ = 0;
//
- // XXX highly desirable to know whether we wrote _any_ data; if
+ // XXXTAO highly desirable to know whether we wrote _any_ data; if
// we wrote none, then there's no chance the call completed and
// applications don't have to deal with those nasty
// indeterminate states where they can't immediatly tell if
// what's safe to do.
//
- // XXX also, there might have been a GIOP::CloseConnection
+ // XXXTAO also, there might have been a GIOP::CloseConnection
// message in the input queue. If so, this request should be
// treated as a (full) "rebind" case. Can't do that from this
// point in the code however! Some minor restructuring needs to
@@ -851,7 +852,7 @@ TAO_GIOP_Invocation::invoke (CORBA::ExceptionList &exceptions,
// evidence that locking at the level of requests loses on at least
// some platforms.
//
- // XXX In all MT environments, there's a cancellation point lurking
+ // XXXTAO In all MT environments, there's a cancellation point lurking
// here; need to investigate. Client threads would frequently be
// canceled sometime during recv_request ... the correct action to
// take on being canceled is to issue a CancelRequest message to the
@@ -1113,7 +1114,7 @@ TAO_GIOP_Invocation::invoke (CORBA::ExceptionList &exceptions,
// reusing memory where practical. Then delete the forwarded
// objref, retaining only its profile.
//
- // XXX add and use a "forward count", to prevent loss of data
+ // XXXTAO add and use a "forward count", to prevent loss of data
// in forwarding chains during concurrent calls -- only a
// forward that's a response to the current fwd_profile should
// be recorded here. (This is just an optimization, and is not
@@ -1132,7 +1133,7 @@ TAO_GIOP_Invocation::invoke (CORBA::ExceptionList &exceptions,
// Make sure a new connection is used next time.
this->handler_->close ();
- this->handler_ = 0; // @@ not sure this is correct!
+ this->handler_ = 0; // XXXTAO not sure this is correct!
// We may not need to do this since TAO_GIOP_Invocations
// get created on a per-call basis. For now we'll play it safe.
}
@@ -1224,8 +1225,8 @@ TAO_GIOP::start_message (TAO_GIOP::Message_Type type, CDR &msg)
next [2] = 'O';
next [3] = 'P';
- next [4] = MY_MAJOR;
- next [5] = MY_MINOR;
+ next [4] = TAO_GIOP_MessageHeader::MY_MAJOR;
+ next [5] = TAO_GIOP_MessageHeader::MY_MINOR;
next [6] = TAO_ENCAP_BYTE_ORDER;
next [7] = (u_char) type;
diff --git a/TAO/tao/GIOP.h b/TAO/tao/GIOP.h
index 6cc40eee613..9099182ec74 100644
--- a/TAO/tao/GIOP.h
+++ b/TAO/tao/GIOP.h
@@ -6,7 +6,7 @@
// TAO
//
// = FILENAME
-// giop.h
+// Giop.h
//
// = DESCRIPTION
// GIOP data structures and support routines
@@ -60,7 +60,7 @@ public:
TAO_opaque profile_data;
};
-typedef TAO_Unbounded_Sequence<TAO_IOP_Tagged_Profile>
+typedef TAO_Unbounded_Sequence<TAO_IOP_Tagged_Profile>
TAO_IOP_Tagged_Profile_Sequence;
class TAO_IOP_IOR
@@ -115,7 +115,7 @@ public:
TAO_opaque component_data;
};
-typedef TAO_Unbounded_Sequence<TAO_IOP_TaggedComponent>
+typedef TAO_Unbounded_Sequence<TAO_IOP_TaggedComponent>
TAO_IOP_MultipleComponentProfile;
// namespace TAO_GIOP
@@ -126,23 +126,22 @@ struct TAO_Version
CORBA::Octet minor;
};
-// @@ Is it possible to put these enums into a class so they don't
-// pollute the global namespace?
-enum
-{
- // = DESCRIPTION
- // GIOP protocol version 1.0 information.
-
- MY_MAJOR = 1,
- MY_MINOR = 0
-};
-
class TAO_GIOP_MessageHeader
{
// = TITLE
// This is the header sent with ever GIOP request!
public:
+ // version numbers
+ enum
+ {
+ // = DESCRIPTION
+ // GIOP protocol version 1.0 information.
+
+ MY_MAJOR = 1,
+ MY_MINOR = 0
+ };
+
CORBA::Char magic [4]; // "GIOP"
TAO_Version giop_version;
CORBA::Octet byte_order; // 0 = big, 1 = little
@@ -153,8 +152,10 @@ public:
// defined by GIOP 1.0 protocol @@ Is this portable? The structure
// above could have some padding on machines with absurd padding
// requirements (like 8 byte boundaries); hence the size of it may not
-// match th size of the header on the wire.
-#define TAO_GIOP_HEADER_LEN sizeof (TAO_GIOP_MessageHeader)
+// match the size of the header on the wire.
+//#define TAO_GIOP_HEADER_LEN sizeof (TAO_GIOP_MessageHeader)
+// XXXTAO - I made this explicitly 12 (ASG)
+#define TAO_GIOP_HEADER_LEN 12
// Support for Implicit ORB Service Context.
typedef CORBA::ULong TAO_GIOP_ServiceID;
@@ -174,12 +175,12 @@ class TAO_GIOP_ServiceContext
{
// = TITLE
// Sent for service context entries in the GIOP request header.
-public:
+public:
TAO_GIOP_ServiceID context_id;
TAO_opaque context_data;
};
-typedef TAO_Unbounded_Sequence<TAO_GIOP_ServiceContext>
+typedef TAO_Unbounded_Sequence<TAO_GIOP_ServiceContext>
TAO_GIOP_ServiceContextList;
extern CORBA::TypeCode TC_ServiceContextList;
@@ -230,7 +231,7 @@ enum TAO_GIOP_ReplyStatusType
// Request terminated with system exception
TAO_GIOP_LOCATION_FORWARD
- // @@ More info
+ // Reply is a location forward type
};
class TAO_GIOP_ReplyHeader
@@ -309,10 +310,11 @@ public:
// <start> goes beyond initialising data structures, and makes calls
// that may fail -- and thus throw exceptions.
- // @@ Andy, can you please document this method?
void put_param (CORBA::TypeCode_ptr tc,
void *value,
CORBA::Environment &env);
+ // Encodes the value into the undelying CDR stream based on the TypeCode
+ // parameter
TAO_GIOP_ReplyStatusType invoke (CORBA::ExceptionList &exceptions,
CORBA::Environment &env);
diff --git a/TAO/tao/IIOP_ORB.cpp b/TAO/tao/IIOP_ORB.cpp
index b39cd0e29e9..50792a5e66b 100644
--- a/TAO/tao/IIOP_ORB.cpp
+++ b/TAO/tao/IIOP_ORB.cpp
@@ -34,13 +34,13 @@ IIOP_ORB::object_to_string (CORBA::Object_ptr obj,
// ORB implementations ...
char *bytes;
- // @@ Is BUFSIZ the right size here?
+ // XXXTAO Is BUFSIZ the right size here?
char buf [BUFSIZ];
CDR cdr (buf, sizeof buf, TAO_ENCAP_BYTE_ORDER);
bytes = buf;
// support limited oref ACE_OS::strcmp.
- (void) ACE_OS::memset (bytes, 0, BUFSIZ);
+ (void) ACE_OS::memset (bytes, 0, BUFSIZ);
// Marshal the objref into an encapsulation bytestream.
(void) cdr.put_char (TAO_ENCAP_BYTE_ORDER);
@@ -266,14 +266,14 @@ iiop_string_to_object (CORBA::String string,
// Parse the object key
TAO_POA::decode_string_to_sequence (data->profile.object_key,
string);
-
+
// Create the CORBA level proxy.
CORBA_Object *obj = new CORBA_Object (data);
-
+
// Clean up in case of error
if (obj == 0)
data->Release ();
-
+
return obj;
}
diff --git a/TAO/tao/IIOP_Object.cpp b/TAO/tao/IIOP_Object.cpp
index 74b8ceec015..0594fc8e89c 100644
--- a/TAO/tao/IIOP_Object.cpp
+++ b/TAO/tao/IIOP_Object.cpp
@@ -50,7 +50,7 @@ IIOP::Profile::set (const char *h,
return -1;
// Enough room as to print a <void *>.
- // @@ The following "32" should not be a magic #...
+ // XXXTAO The following "32" should not be a magic #...
const int bufs = 32;
char buffer[bufs];
@@ -527,12 +527,12 @@ IIOP_Object::do_static_call (CORBA::Environment &env, // exception reporting
{
void *ptr = va_arg (param_vector, void *);
- // XXXASG - added this 12/24/97
// if it is an inout parameter, it would become necessary to
// first release the "in" memory
if (pdp->mode == PARAM_INOUT)
{
- // XXXASG - add others as we test each case
+ // XXXTAO - add others as we test each case
+ // (ASG) will do 03/22/98.
switch (pdp->tc->kind (env))
{
case CORBA::tk_string:
diff --git a/TAO/tao/Marshal.h b/TAO/tao/Marshal.h
index 2ce048e22ee..30ca9a3d729 100644
--- a/TAO/tao/Marshal.h
+++ b/TAO/tao/Marshal.h
@@ -4,7 +4,7 @@
//
// = LIBRARY
// TAO
-//
+//
// = FILENAME
// Marshal.h
//
@@ -13,7 +13,7 @@
//
// = AUTHOR
// Aniruddha S. Gokhale
-//
+//
// ============================================================================
#if !defined (TAO_MARSHAL_H)
@@ -67,28 +67,12 @@ public:
private:
struct TAO_Marshal_Object_Entry
{
- TAO_Marshal_Object *obj_;
+ TAO_Marshal_Object *obj_;
};
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
- TAO_Marshal_Primitive *m_primitive_;
- TAO_Marshal_Any *m_any_;
- TAO_Marshal_TypeCode *m_typecode_;
- TAO_Marshal_Principal *m_principal_;
- TAO_Marshal_ObjRef *m_objref_;
- TAO_Marshal_Struct *m_struct_;
- TAO_Marshal_Union *m_union_;
- TAO_Marshal_String *m_string_;
- TAO_Marshal_Sequence *m_sequence_;
- TAO_Marshal_Array *m_array_;
- TAO_Marshal_Alias *m_alias_;
- TAO_Marshal_Except *m_except_;
- TAO_Marshal_WString *m_wstring_;
-#endif /* 0 */
};
class TAO_Export TAO_Marshal
@@ -105,10 +89,11 @@ public:
class TAO_Export TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Object
+ // = DESCRIPTION
// The Marshaling object that provides a common interface to the
// CDR object for marshaling different IDL data types
//
- // = DESCRIPTION
// Provides a set of virtual methods for encoding, decoding,
// deep_copying, and deep_freeing.
public:
@@ -135,9 +120,10 @@ public:
class TAO_Export TAO_Marshal_Primitive: public TAO_Marshal_Object
{
- // @@ (ANDY) Please fill in here and add comments to this class.
// = TITLE
+ // TAO_Marshal_Primitive
// = DESCRIPTION
+ // marshaling primitives
public:
TAO_Marshal_Primitive (void);
@@ -166,7 +152,9 @@ public:
class TAO_Export TAO_Marshal_Any: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Any
// = DESCRIPTION
+ // Marshal an Any
public:
TAO_Marshal_Any (void);
@@ -195,7 +183,9 @@ public:
class TAO_Export TAO_Marshal_TypeCode: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_TypeCode
// = DESCRIPTION
+ // marshal a typecode
public:
TAO_Marshal_TypeCode (void);
@@ -224,7 +214,9 @@ public:
class TAO_Export TAO_Marshal_Principal: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Principal
// = DESCRIPTION
+ // marshal a principal
public:
TAO_Marshal_Principal (void);
@@ -253,7 +245,9 @@ public:
class TAO_Export TAO_Marshal_ObjRef: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_ObjRef
// = DESCRIPTION
+ // marshal an object reference
public:
TAO_Marshal_ObjRef (void);
@@ -282,7 +276,9 @@ public:
class TAO_Export TAO_Marshal_Struct: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Struct
// = DESCRIPTION
+ // marshal a struct
public:
TAO_Marshal_Struct (void);
@@ -311,7 +307,9 @@ public:
class TAO_Export TAO_Marshal_Union: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Union
// = DESCRIPTION
+ // marshal a union
public:
TAO_Marshal_Union (void);
@@ -340,7 +338,9 @@ public:
class TAO_Export TAO_Marshal_String: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_String
// = DESCRIPTION
+ // marshal a string
public:
TAO_Marshal_String (void);
@@ -369,7 +369,9 @@ public:
class TAO_Export TAO_Marshal_Sequence: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Sequence
// = DESCRIPTION
+ // marshal a sequence
public:
TAO_Marshal_Sequence (void);
@@ -398,7 +400,9 @@ public:
class TAO_Export TAO_Marshal_Array: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Array
// = DESCRIPTION
+ // marshal an array
public:
TAO_Marshal_Array (void);
@@ -427,7 +431,9 @@ public:
class TAO_Export TAO_Marshal_Alias: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Alias
// = DESCRIPTION
+ // marshal an alias
public:
TAO_Marshal_Alias (void);
@@ -456,7 +462,9 @@ public:
class TAO_Export TAO_Marshal_Except: public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_Except
// = DESCRIPTION
+ // marshal an exception
public:
TAO_Marshal_Except (void);
~TAO_Marshal_Except (void);
@@ -484,7 +492,9 @@ public:
class TAO_Export TAO_Marshal_WString : public TAO_Marshal_Object
{
// = TITLE
+ // TAO_Marshal_WString
// = DESCRIPTION
+ // marshal a wide string
public:
TAO_Marshal_WString (void);
~TAO_Marshal_WString (void);
diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp
index 313c2fa764f..e744d929981 100644
--- a/TAO/tao/NVList.cpp
+++ b/TAO/tao/NVList.cpp
@@ -215,7 +215,7 @@ CORBA_NVList::add_value_consume (char * /*name*/,
// not implemented because we need to see how we can consume the value
// One soln is to make the any_ member of NamedValue to be a Any_ptr or
// Any_var
- // XXXASG- TODO
+ // XXXTAO (ASG) - TODO
return 0;
}
@@ -224,7 +224,7 @@ void
CORBA_NVList::remove (CORBA::ULong /*n*/, CORBA::Environment &/*env*/)
{
// not implemented
- // XXXASG - TODO
+ // XXXTAO (ASG) - TODO
}
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 2cf4c055c09..e6f16736dc5 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -8,7 +8,7 @@
#include "tao/TAO_Internal.h"
#include "tao/Arg_Shifter.h"
-typedef ACE_TSS_Singleton<TAO_ORB_Core, ACE_SYNCH_MUTEX>
+typedef ACE_TSS_Singleton<TAO_ORB_Core, ACE_SYNCH_MUTEX>
TAO_ORB_CORE;
TAO_ORB_Core::TAO_ORB_Core (void)
@@ -70,8 +70,7 @@ TAO_ORB_Core::init (int& argc, char** argv)
// as the ACE_Service_Config or the RootPOA.
// Prepare a copy of the argument vector
- // XXXASG - compiler doesn't like this
- char **svc_config_argv; // @@ Should this be a data member?
+ char **svc_config_argv; // XXXTAO Should this be a data member?
// Probably, but there's no object in which to scope it.
int svc_config_argc = 0;
@@ -91,16 +90,16 @@ TAO_ORB_Core::init (int& argc, char** argv)
// template sometime.
// Name Service IOR string.
- char *ns_ior = 0;
+ char *ns_ior = 0;
// Name Service port #.
- u_short ns_port = 0;
+ u_short ns_port = 0;
// Trading Service IOR string.
- char *ts_ior = 0;
+ char *ts_ior = 0;
// Trading Service port #.
- u_short ts_port = 0;
+ u_short ts_port = 0;
// Buffer sizes for kernel socket buffers
size_t rcv_sock_size = 0;
@@ -392,7 +391,7 @@ TAO_ORB_Core::init (int& argc, char** argv)
this->orb_params ()->trading_service_ior (ts_ior);
if (ts_port != 0)
this->orb_params ()->trading_service_port (ts_port);
- if (rcv_sock_size != 0)
+ if (rcv_sock_size != 0)
this->orb_params ()->sock_rcvbuf_size (rcv_sock_size);
if (snd_sock_size != 0)
this->orb_params ()->sock_rcvbuf_size (snd_sock_size);
@@ -731,8 +730,8 @@ TAO_Resource_Factory::parse_args (int argc, char **argv)
ACE_TRACE ("TAO_Default_Server_Strategy_Factory::parse_args");
// This table shows the arguments that are parsed with their valid
// combinations.
- //
- // ORB POA comments
+ //
+ // ORB POA comments
// +-------+-------+-----------------+
// | TSS | TSS | if ORB==TSS |
// | | | then POA=TSS |
@@ -783,23 +782,23 @@ TAO_Resource_Factory::parse_args (int argc, char **argv)
(local_poa_source == TAO_TSS) )
return -1;
- // make poa=tss the default, if ORB is tss and the user didn't
+ // make poa=tss the default, if ORB is tss and the user didn't
// specify a value.
if ( (local_resource_source == TAO_TSS) &&
(local_poa_source == -1) )
local_poa_source = TAO_TSS;
// update the object data members.
- if (local_resource_source != -1)
+ if (local_resource_source != -1)
this->resource_source_ = local_resource_source;
- if (local_poa_source != -1)
- this->poa_source_ = local_poa_source;
+ if (local_poa_source != -1)
+ this->poa_source_ = local_poa_source;
// Don't allow a global ORB and a tss POA.
if ( (this->resource_source_ == TAO_GLOBAL) &&
(this->poa_source_ == TAO_TSS) )
- return -1;
-
+ return -1;
+
return 0;
}
diff --git a/TAO/tao/Operation_Table.cpp b/TAO/tao/Operation_Table.cpp
index 6c4ff00b38f..ed3f5019f3f 100644
--- a/TAO/tao/Operation_Table.cpp
+++ b/TAO/tao/Operation_Table.cpp
@@ -33,7 +33,7 @@ TAO_Dynamic_Hash_OpTable::TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry
// bind the operation name to its corresponding skeleton
for (CORBA::ULong i=0; i < dbsize; i++)
{
- // XXXASG: what happens if bind fails ???
+ // XXXTAO (ASG): what happens if bind fails ???
(void)this->bind (db[i].opname_, db[i].skel_ptr_);
}
}
@@ -84,7 +84,7 @@ TAO_Linear_OpTable::TAO_Linear_OpTable (const TAO_operation_db_entry *db,
// skeleton.
for (CORBA::ULong i=0; i < dbsize; i++)
- // XXXASG: what happens if bind fails ???
+ // XXXTAO (ASG): what happens if bind fails ???
(void)this->bind (db[i].opname_, db[i].skel_ptr_);
}
@@ -156,7 +156,7 @@ TAO_Active_Demux_OpTable::TAO_Active_Demux_OpTable (const
// database and bind the operation name to its corresponding
// skeleton.
for (CORBA::ULong i=0; i < dbsize; i++)
- // XXXASG: what happens if bind fails ???
+ // XXXTAO (ASG): what happens if bind fails ???
(void) this->bind (db[i].opname_, db[i].skel_ptr_);
}
diff --git a/TAO/tao/Request.h b/TAO/tao/Request.h
index 45999d49880..f3903fd2f28 100644
--- a/TAO/tao/Request.h
+++ b/TAO/tao/Request.h
@@ -5,7 +5,7 @@
//
// = LIBRARY
// TAO
-//
+//
// = FILENAME
// Request.h
//
@@ -15,7 +15,7 @@
//
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems, Inc.
-//
+//
// ============================================================================
#if !defined (TAO_REQUEST_H)
@@ -24,23 +24,26 @@
class TAO_Export CORBA_Request
{
// = TITLE
- // @@ Andy, please document me.
+ // CORBA_Request
+ // = DESCRIPTION
+ // Provides a way to create requests and populate it with parameters for
+ // use in the Dynamic Invocation Interface
public:
CORBA::Object_ptr target (void) const;
// Return the target of this request.
-
+
const CORBA::Char *operation (void) const;
// Return the operation name for the request.
-
+
CORBA::NVList_ptr arguments (void);
// Return the arguments for the request.
-
+
CORBA::NamedValue_ptr result (void);
// Return the result for the request.
-
+
CORBA::ExceptionList_ptr exceptions (void);
// Return the exceptions resulting from this request.
-
+
CORBA::Environment *env (void);
// Return the <Environment> for this request.
@@ -50,7 +53,7 @@ public:
// result argument specified on <create_request>. The behavior is
// undefined if this <Request> has already been used with a previous
// call to <invoke>, <send>, or <send_multiple_requests>.
-
+
void send_oneway (void);
// Send a oneway request.
@@ -61,6 +64,8 @@ public:
private:
friend class CORBA_Object;
+ // following are not allowed
+
CORBA_Request (CORBA::Object_ptr obj,
const CORBA::Char *op,
CORBA::NVList_ptr args,
@@ -72,15 +77,29 @@ private:
~CORBA_Request (void);
- // @@ Please document me.
CORBA::Object_ptr target_;
+ // target object
+
const CORBA::Char *opname_;
+ // operation name
+
CORBA::NVList_ptr args_;
+ // parameter list
+
CORBA::NamedValue_ptr result_;
+ // result of the operation
+
CORBA::Flags flags_;
+ // invocation flags
+
CORBA::Environment env_;
+ // holds exceptions
+
CORBA::ExceptionList exceptions_;
+ // list of exceptions raised by the operation
+
CORBA::ULong refcount_;
+ // reference counting
};
#endif /* TAO_REQUEST_H */
diff --git a/TAO/tao/Servant_Base.cpp b/TAO/tao/Servant_Base.cpp
index 613e7b9ade9..c8d23ae0ca7 100644
--- a/TAO/tao/Servant_Base.cpp
+++ b/TAO/tao/Servant_Base.cpp
@@ -62,7 +62,7 @@ TAO_ServantBase::_dispatch (CORBA::ServerRequest &req,
void *context,
CORBA::Environment &env)
{
- // XXXASG - we should check here if the call was for _non_existant, else
+ // XXXTAO (ASG) - we should check here if the call was for _non_existant, else
// issue an error. For the time being we issue an error
CORBA::String opname = req.op_name ();
ACE_UNUSED_ARG (context);
diff --git a/TAO/tao/Stub.h b/TAO/tao/Stub.h
index 952fdf2b667..73553e2b4d6 100644
--- a/TAO/tao/Stub.h
+++ b/TAO/tao/Stub.h
@@ -34,9 +34,11 @@
// Descriptions of parameters.
enum TAO_Param_Type
+{
// = TITLE
+ // TAO_Param_Type
+ // =DESCRIPTION
// Parameter mode of a given parameter.
-{
PARAM_IN,
PARAM_OUT,
PARAM_INOUT,
@@ -44,10 +46,12 @@ enum TAO_Param_Type
};
struct TAO_Param_Data
+{
// = TITLE
- // Description of a single parameter.
+ // TAO_Param_Data
//
// = DESCRIPTION
+ // Description of a single parameter.
//
// If value_size is nonzero for OUT, INOUT, or RETURN parameters,
// it's (a) an indicator that the ORB returns a pointer-to-value
@@ -65,30 +69,33 @@ struct TAO_Param_Data
// is nonzero, the value passed to do_static_call() must be the address
// of a pointer.
-{
CORBA::TypeCode_ptr tc;
- // Type of param.
+ // TypeCode for the parameter
TAO_Param_Type mode;
// Its mode.
size_t value_size;
- // zero or tc->size ().
+ // zero or tc->size (). For SII, we always know its size since it is the IDL
+ // compiler which generates the stub code.
};
struct TAO_Call_Data
+{
// = TITLE
+ // TAO_Call_Data
+ //
+ // = DESCRIPTION
// Descriptions of operations, as used by the stub interpreter.
// Only interpretive marshaling/unmarshaling is used, and the
// stubs don't know what particular on-the-wire protocol is being
// used.
//
- // = DESCRIPTION
// When using C++ exceptions, many C++ compilers will require the
// use of compiled code throw the exception. As binary standards
// for exception throwing evolve, it may become practical to
// interpretively throw exceptions.
-{
+
const char *opname;
// Operation name.
@@ -120,12 +127,15 @@ struct TAO_Call_Data
};
struct TAO_Skel_Entry
+{
// = TITLE
+ // TAO_Skel_Entry
+ //
+ // = DESCRIPTION
// Skeletons map "ServerRequest" generic signatures to the static
// call signature required by the implementation's methods. table
// of these per implementation
//
- // = DESCRIPTION
// There are several optimizations that'd be desirable for use by
// "static skeletons", notably (a) passing of per-object data held
// by the OA so that the method doesn't need to look it up itself,
@@ -134,13 +144,21 @@ struct TAO_Skel_Entry
// "get_implementation". This code is currently set up only for
// Dynamic Skeletons and bridging, for which none of those are
// real issues.
-{
+
const TAO_Call_Data *op_descriptor;
+ // pointer to the calldata structure that holds information about all the
+ // parameters
+
TAO_Skeleton impl_skeleton;
+ // skeleton corresponding to the operation
};
class TAO_Export STUB_Object : public TAO_IUnknown
+{
// = TITLE
+ // STUB_Object
+ //
+ // = DESCRIPTION
// Per-objref data includes the (protocol-specific) Profile, which
// is handled by placing it into a subclass of this type along
// with data that may be used in protocol-specific caching
@@ -152,11 +170,10 @@ class TAO_Export STUB_Object : public TAO_IUnknown
//
// The stub and DII interpreter APIs are member functions of this
// type.
-{
public:
virtual void do_static_call (CORBA::Environment &env,
- const TAO_Call_Data *info,
- ...) = 0;
+ const TAO_Call_Data *info,
+ ...) = 0;
// The "stub interpreter" method parameters are:
//
// - env ... used for exception reporting
@@ -212,7 +229,7 @@ public:
virtual CORBA::Boolean is_equivalent (CORBA::Object_ptr other_obj,
CORBA::Environment &env) = 0;
- // @@ (ANDY) Please comment me.
+ // check for equivalence
STUB_Object (CORBA::String p = 0);
// XXX All objref representations should know how to marshal
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index 453ec0a167c..126c544ba08 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -470,7 +470,7 @@ TC_Private_State::~TC_Private_State (void)
// Delete the content type only if it has a parent i.e., if it
// is not acquired from the pool of constant or predefined
// typecodes.
- if (this->tc_content_type_known_
+ if (this->tc_content_type_known_
&& this->tc_content_type_->parent_)
delete this->tc_content_type_;
break;
@@ -684,13 +684,13 @@ CORBA_TypeCode::private_equal_struct (CORBA::TypeCode_ptr tc,
return 0;
// compare repoIDs if they exist
- if (ACE_OS::strlen (my_id) > 1
+ if (ACE_OS::strlen (my_id) > 1
&& ACE_OS::strlen (tc_id) > 1
&& ACE_OS::strcmp (my_id, tc_id)) // not same
return 0;
// Compare names if they exist.
- if (ACE_OS::strlen (my_name) > 1
+ if (ACE_OS::strlen (my_name) > 1
&& ACE_OS::strlen (tc_name) > 1
&& ACE_OS::strcmp (my_name, tc_name)) // not same
return 0;
@@ -719,7 +719,7 @@ CORBA_TypeCode::private_equal_struct (CORBA::TypeCode_ptr tc,
if (env.exception ())
return 0;
- if (ACE_OS::strlen (my_member_name) > 1
+ if (ACE_OS::strlen (my_member_name) > 1
&& ACE_OS::strlen (tc_member_name) > 1
&& ACE_OS::strcmp (my_member_name, tc_member_name)) // not same
return 0;
@@ -765,13 +765,13 @@ CORBA_TypeCode::private_equal_union (CORBA::TypeCode_ptr tc,
return 0;
// compare repoIDs if they exist
- if (ACE_OS::strlen (my_id) > 1
+ if (ACE_OS::strlen (my_id) > 1
&& ACE_OS::strlen (tc_id) > 1
&& ACE_OS::strcmp (my_id, tc_id)) // not same
return 0;
// compare names if they exist
- if (ACE_OS::strlen (my_name) > 1
+ if (ACE_OS::strlen (my_name) > 1
&& ACE_OS::strlen (tc_name) > 1
&& ACE_OS::strcmp (my_name, tc_name)) // not same
return 0;
@@ -1370,7 +1370,7 @@ CORBA_TypeCode::private_member_type (CORBA::ULong index,
// Always big enough because labels can only be of a
// few different types of which "long" has the
// largest size.
- CORBA::Long scratch;
+ CORBA::Long scratch;
// get the typecode for the discriminator
tc = this->discriminator_type (env);
@@ -1690,7 +1690,6 @@ CORBA_TypeCode::private_member_label (CORBA::ULong n,
{ // 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 (CORBA::COMPLETED_NO));
return 0;
}
diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp
index c49b780c8d8..739a300de78 100644
--- a/TAO/tao/decode.cpp
+++ b/TAO/tao/decode.cpp
@@ -154,23 +154,23 @@ TAO_Marshal_Any::decode (CORBA::TypeCode_ptr,
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 = 0;
CORBA::Boolean continue_decoding = CORBA::B_TRUE;
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
// Status of encode operation.
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
// Decode the typecode description for the element.
if (stream->decode (CORBA::_tc_TypeCode,
&elem_tc,
- this,
+ 0,
env) == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
ACE_NEW_RETURN (value,
@@ -201,7 +201,7 @@ TAO_Marshal_Any::decode (CORBA::TypeCode_ptr,
case CORBA::tk_double:
case CORBA::tk_longlong:
case CORBA::tk_ulonglong:
- continue_decoding =
+ continue_decoding =
stream->get_longlong (*(CORBA::LongLong *) value);
break;
case CORBA::tk_boolean:
@@ -272,16 +272,16 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
CORBA::Boolean continue_decoding = CORBA::B_TRUE;
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
// Typecode to be decoded.
- CORBA::TypeCode_ptr *tcp;
+ CORBA::TypeCode_ptr *tcp;
// Typecode kind.
- CORBA::ULong kind;
+ CORBA::ULong kind;
// TypeCode for the parent.
- CORBA::TypeCode_ptr parent = (CORBA::TypeCode_ptr) parent_typecode;
+ CORBA::TypeCode_ptr parent = (CORBA::TypeCode_ptr) parent_typecode;
// Decode the "kind" field of the typecode from the stream
continue_decoding = stream->get_ulong (kind);
@@ -289,7 +289,7 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
if (continue_decoding == CORBA::B_TRUE)
{
// The data has to be a TypeCode_ptr *.
- tcp = (CORBA::TypeCode_ptr *) data;
+ tcp = (CORBA::TypeCode_ptr *) data;
// Typecodes with empty parameter lists all have preallocated
// constants. We use those to reduce memory consumption and
@@ -304,7 +304,7 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
{
// Need special handling for all kinds of typecodes that
// have nonempty parameter lists ...
- default:
+ default:
// Error: missed a case!
env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
@@ -332,9 +332,6 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
*tcp = new CORBA::TypeCode ((CORBA::TCKind) kind,
bound, 0, CORBA::B_FALSE,
parent);
- // @@ Andy, is the following still necessary?
- // If not, can we please remove it?
- // (*tcp)->parent_ = parent;
}
}
}
@@ -502,7 +499,7 @@ TAO_Marshal_Principal::decode (CORBA::TypeCode_ptr,
CORBA::Boolean continue_decoding = CORBA::B_TRUE;
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
CORBA::Principal_ptr *pp = (CORBA::Principal_ptr *) data;
CORBA::ULong len;
@@ -548,7 +545,7 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr,
CORBA::Boolean continue_decoding = CORBA::B_TRUE;
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
CORBA::String type_hint;
@@ -610,13 +607,13 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr,
str.setup_encapsulation (ACE_reinterpret_cast(char*,buf), tmp);
- // @@ (CJC) Does IIOP_Object duplicate 'type_hint' below so
+ // XXXTAO Does IIOP_Object duplicate 'type_hint' below so
// that we can safely free it? It does now!
ACE_NEW_RETURN (objdata,
IIOP_Object (type_hint),
CORBA::TypeCode::TRAVERSE_STOP);
- // @@ (coryan) The IIOP_Object created here has a String_var
+ // XXXTAO The IIOP_Object created here has a String_var
// member to keep the string, this member is constructed using
// type_hint, at that time a plain (char*). Hence the string
// is *not* copied and it cannot be released, so the following
@@ -686,7 +683,7 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr,
// Create a new CORBA_Object and give it the IIOP_Object just
// created.
CORBA_Object *corba_proxy;
-
+
ACE_NEW_RETURN (corba_proxy,
CORBA_Object (objdata),
CORBA::TypeCode::TRAVERSE_CONTINUE);
@@ -772,7 +769,7 @@ TAO_Marshal_Struct::decode (CORBA::TypeCode_ptr tc,
case CORBA::tk_double:
case CORBA::tk_longlong:
case CORBA::tk_ulonglong:
- continue_decoding =
+ continue_decoding =
stream->get_longlong (*(CORBA::LongLong *) data);
break;
case CORBA::tk_boolean:
@@ -843,7 +840,7 @@ TAO_Marshal_Union::decode (CORBA::TypeCode_ptr tc,
CORBA::Environment &env)
{
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
CORBA::TypeCode::traverse_status retval =
CORBA::TypeCode::TRAVERSE_CONTINUE;
@@ -1003,7 +1000,7 @@ TAO_Marshal_String::decode (CORBA::TypeCode_ptr,
{
CORBA::Boolean continue_decoding = CORBA::B_TRUE;
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
CORBA::ULong len = 0;
CORBA::String str;
@@ -1058,11 +1055,11 @@ TAO_Marshal_Sequence::decode (CORBA::TypeCode_ptr tc,
TAO_Base_Sequence *seq = (TAO_Base_Sequence *)data;
// Return status.
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
// Typecode of the element.
CORBA::TypeCode_ptr tc2;
// Size of element.
- size_t size;
+ size_t size;
CORBA::ULong bounds;
char *value;
@@ -1094,7 +1091,7 @@ TAO_Marshal_Sequence::decode (CORBA::TypeCode_ptr tc,
// Allocate the buffer using the virtual
// _allocate_buffer method, hence the right
// constructors are invoked and size for the array
- // is OK. @@ Who will free this memory? (coryan):
+ // is OK. XXXTAO Who will free this memory? (coryan):
// the sequence will release it, since its release_
// field is 1.
seq->_allocate_buffer (bounds);
@@ -1261,13 +1258,13 @@ TAO_Marshal_Array::decode (CORBA::TypeCode_ptr tc,
// Return status.
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
// Typecode of the element.
CORBA::TypeCode_ptr tc2;
// Size of element.
- size_t size;
+ size_t size;
CORBA::ULong bounds;
char *value = (char *) data;
@@ -1436,15 +1433,15 @@ TAO_Marshal_Alias::decode (CORBA::TypeCode_ptr tc,
CORBA::Environment &env)
{
// Typecode of the aliased type.
- CORBA::TypeCode_ptr tc2;
+ CORBA::TypeCode_ptr tc2;
CORBA::Boolean continue_decoding = CORBA::B_TRUE;
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
// Status of decode operation.
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
char *value = (char *) data;
tc2 = tc->content_type (env);
@@ -1538,7 +1535,7 @@ TAO_Marshal_Except::decode (CORBA::TypeCode_ptr tc,
CORBA::Environment &env)
{
CDR *stream = (CDR *) context;
- CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::traverse_status retval =
CORBA::TypeCode::TRAVERSE_CONTINUE;
CORBA::Boolean continue_decoding = CORBA::B_TRUE;
CORBA::TypeCode_ptr param;
diff --git a/TAO/tao/deep_copy.cpp b/TAO/tao/deep_copy.cpp
index 0f77c2fe7ff..e92f8d6a601 100644
--- a/TAO/tao/deep_copy.cpp
+++ b/TAO/tao/deep_copy.cpp
@@ -2,7 +2,7 @@
//
// = LIBRARY
// TAO
-//
+//
// = FILENAME
// deep_copy.cpp
//
@@ -20,9 +20,9 @@
//
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems Inc.
-// and
+// and
// Aniruddha Gokhale
-//
+//
// ============================================================================
#include "tao/corba.h"
@@ -124,19 +124,14 @@ TAO_Marshal_Primitive::deep_copy (CORBA::TypeCode_ptr tc,
const void *dest,
CORBA::Environment &env)
{
- if (tc)
+ if (tc)
{
CORBA::TCKind mykind_ = tc->kind (env);
if (env.exception () == 0)
{
- switch (mykind_)
+ switch (mykind_)
{
- case CORBA::tk_null:
- case CORBA::tk_void:
- // @@ I assume this should be an error...
- break;
-
case CORBA::tk_char:
case CORBA::tk_octet:
*(CORBA::Octet *) dest = *(CORBA::Octet *) source;
@@ -206,14 +201,14 @@ TAO_Marshal_Principal::deep_copy (CORBA::TypeCode_ptr tc,
CORBA::TypeCode::TRAVERSE_STOP);
CORBA::Principal_ptr dst = *(CORBA::Principal_ptr *) dest;
-
+
if (dst)
{
// Principals are just opaque IDs ... copy them
assert (src->id.length <= UINT_MAX);
dst->id.length = dst->id.maximum = src->id.length;
- if (dst->id.length > 0)
+ if (dst->id.length > 0)
{
ACE_NEW_RETURN (dst->id.buffer,
CORBA::Octet [(u_int) dst->id.length],
@@ -231,7 +226,7 @@ TAO_Marshal_Principal::deep_copy (CORBA::TypeCode_ptr tc,
dmsg ("TAO_Marshal_Principal::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
+ }
else
{
dst->id.buffer = 0;
@@ -245,7 +240,7 @@ TAO_Marshal_Principal::deep_copy (CORBA::TypeCode_ptr tc,
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
- else
+ else
{
env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE) );
dmsg ("TAO_Marshal_Primitive::deep_copy detected error");
@@ -371,19 +366,19 @@ TAO_Marshal_Struct::deep_copy (CORBA::TypeCode_ptr tc,
} // end of switch
source = (char *) source + size;
dest = (char *) dest + size;
- }
- else // exception computing alignment
+ }
+ else // exception computing alignment
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
- else // exception computing size
+ }
+ else // exception computing size
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
+ }
else // exception computing typecode
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
@@ -398,8 +393,8 @@ TAO_Marshal_Struct::deep_copy (CORBA::TypeCode_ptr tc,
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
- else // exception getting member count
+ }
+ else // exception getting member count
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
@@ -440,7 +435,7 @@ TAO_Marshal_Union::deep_copy (CORBA::TypeCode_ptr tc,
CORBA::TypeCode_ptr default_tc = 0;
// Save the pointer to the discriminator.
- const void *discrim_val = data;
+ const void *discrim_val = data;
// value
// move the pointer to point to the actual value
@@ -462,7 +457,7 @@ TAO_Marshal_Union::deep_copy (CORBA::TypeCode_ptr tc,
// accordingly. Otherwise it is an error.
for (int i = 0; member_count-- != 0; i++)
{
- CORBA::Any_ptr member_label =
+ CORBA::Any_ptr member_label =
tc->member_label (i, env);
if (env.exception () == 0)
{
@@ -529,7 +524,7 @@ TAO_Marshal_Union::deep_copy (CORBA::TypeCode_ptr tc,
return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of while
-
+
// we are here only if there was no match
if (default_tc)
return DEEP_COPY (default_tc, data, data2, env);
@@ -577,13 +572,13 @@ TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc,
{
// Return status.
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
// Typecode of the element.
- CORBA::TypeCode_ptr tc2;
+ CORBA::TypeCode_ptr tc2;
// Size of element.
- size_t size;
+ size_t size;
CORBA::ULong bounds;
char *value1;
char *value2;
@@ -591,7 +586,7 @@ TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc,
CORBA::OctetSeq *dst;
// Used only to access the marshal_object factory.
- CDR stream;
+ CDR stream;
// Rely on binary format of sequences -- all are the same except for
// the type pointed to by "buffer."
@@ -605,7 +600,7 @@ TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc,
dst->length = dst->maximum = src->length;
// Get element typecode.
- tc2 = tc->content_type (env);
+ tc2 = tc->content_type (env);
if (env.exception () == 0)
{
// Get the size of the element.
@@ -651,7 +646,7 @@ TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc,
case CORBA::tk_any:
while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
- retval =
+ retval =
TAO_Marshal_Any::deep_copy (tc2, source, dest, env);
value1 = (char *) value1 + size;
value2 = (char *) value2 + size;
@@ -773,7 +768,7 @@ TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc,
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
- else
+ else
{
// error exit
// CORBA::release (tc2);
@@ -781,14 +776,14 @@ TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc,
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
+ }
else // exception computing size
{
// CORBA::release (tc2);
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
+ }
else // exception computing content type
{
dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error");
@@ -813,17 +808,17 @@ TAO_Marshal_Array::deep_copy (CORBA::TypeCode_ptr tc,
{
// Return status.
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
// Typecode of the element.
- CORBA::TypeCode_ptr tc2;
+ CORBA::TypeCode_ptr tc2;
// Size of element.
- size_t size;
+ size_t size;
CORBA::ULong bounds;
// Used only to access the marshal_object factory.
- CDR stream;
+ CDR stream;
// Rely on binary format of sequences -- all are the same except for
// the type pointed to by "buffer".
@@ -834,7 +829,7 @@ TAO_Marshal_Array::deep_copy (CORBA::TypeCode_ptr tc,
if (env.exception () == 0)
{
// get element typecode
- tc2 = tc->content_type (env);
+ tc2 = tc->content_type (env);
if (env.exception () == 0)
{
// Get the size of the element type.
@@ -931,7 +926,7 @@ TAO_Marshal_Array::deep_copy (CORBA::TypeCode_ptr tc,
source = (char *) source + size;
dest = (char *) dest + size;
}
- retval =
+ retval =
TAO_Marshal_String::deep_copy (tc2, source, dest, env);
break;
case CORBA::tk_sequence:
@@ -1020,12 +1015,12 @@ TAO_Marshal_Alias::deep_copy (CORBA::TypeCode_ptr tc,
CORBA::Environment &env)
{
// Typecode of the aliased type.
- CORBA::TypeCode_ptr tc2;
+ CORBA::TypeCode_ptr tc2;
// To access the marshal object.
- CDR stream;
+ CDR stream;
// Status of deep_copy operation.
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
if (tc)
{
@@ -1117,9 +1112,9 @@ TAO_Marshal_Alias::deep_copy (CORBA::TypeCode_ptr tc,
retval = CORBA::TypeCode::TRAVERSE_STOP;
}
// CORBA::release (tc2);
- if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Alias::decode detected error");
@@ -1147,7 +1142,7 @@ TAO_Marshal_Except::deep_copy (CORBA::TypeCode_ptr tc,
CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
CORBA::TypeCode_ptr param;
CORBA::Long size;
-
+
CDR stream;
if (tc)
@@ -1164,7 +1159,7 @@ TAO_Marshal_Except::deep_copy (CORBA::TypeCode_ptr tc,
if (env.exception () == 0)
{
for (int i = 0;
- i < member_count
+ i < member_count
&& retval == CORBA::TypeCode::TRAVERSE_CONTINUE;
i++)
{
@@ -1251,12 +1246,12 @@ TAO_Marshal_Except::deep_copy (CORBA::TypeCode_ptr tc,
source = (char *) source + size;
dest = (char *) dest + size;
}
- else // exception computing size
+ else // exception computing size
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
+ }
else // exception computing typecode
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
@@ -1271,8 +1266,8 @@ TAO_Marshal_Except::deep_copy (CORBA::TypeCode_ptr tc,
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
- else // exception getting member count
+ }
+ else // exception getting member count
{
dmsg ("TAO_Marshal_Struct::deep_copy detected error");
return CORBA::TypeCode::TRAVERSE_STOP;