summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2004-09-23 04:03:04 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2004-09-23 04:03:04 +0000
commitbeb7fc025e1ad90642e14fc5f91704dd5d165894 (patch)
treea10ce511aee898daa51b4121d54af691f5e9c885
parent828d439908e24737540a466f819bc5743d02d533 (diff)
downloadATCD-beb7fc025e1ad90642e14fc5f91704dd5d165894.tar.gz
Various enhancements
-rw-r--r--TAO/tao/TypeCode/Alias_TypeCode.cpp3
-rw-r--r--TAO/tao/TypeCode/Array_TypeCode.h8
-rw-r--r--TAO/tao/TypeCode/Array_TypeCode.inl6
-rw-r--r--TAO/tao/TypeCode/Enum_TypeCode.h18
-rw-r--r--TAO/tao/TypeCode/Enum_TypeCode.inl6
-rw-r--r--TAO/tao/TypeCode/Struct_TypeCode.cpp2
-rw-r--r--TAO/tao/TypeCode/Struct_TypeCode.h18
-rw-r--r--TAO/tao/TypeCode/Struct_TypeCode.inl6
-rw-r--r--TAO/tao/TypeCode/TypeCode_Field.cpp2
-rw-r--r--TAO/tao/TypeCode/TypeCode_Field.h2
10 files changed, 46 insertions, 25 deletions
diff --git a/TAO/tao/TypeCode/Alias_TypeCode.cpp b/TAO/tao/TypeCode/Alias_TypeCode.cpp
index eca1c0ca1c3..d153733b6eb 100644
--- a/TAO/tao/TypeCode/Alias_TypeCode.cpp
+++ b/TAO/tao/TypeCode/Alias_TypeCode.cpp
@@ -32,9 +32,6 @@ TAO::TypeCode::Alias<StringType, RefCountPolicy>::tao_marshal (
(cdr << TAO_ENCAP_BYTE_ORDER)
&& (cdr << this->attributes_.id ())
&& (cdr << this->attributes_.name ())
-
- // @@ Is recursion an issue for typedefs/aliases?
-
&& (cdr << *(this->content_type_.in ()));
}
diff --git a/TAO/tao/TypeCode/Array_TypeCode.h b/TAO/tao/TypeCode/Array_TypeCode.h
index 5f20e296a1d..0628bc1d0a9 100644
--- a/TAO/tao/TypeCode/Array_TypeCode.h
+++ b/TAO/tao/TypeCode/Array_TypeCode.h
@@ -95,10 +95,6 @@ namespace TAO
*/
CORBA::TCKind const kind_;
- /// Length of the @c array. A length of zero indicates an
- /// unbounded @c array.
- CORBA::ULong const length_;
-
/// Element type of the array.
/**
* A pointer to the @c CORBA::TypeCode_ptr rather than the
@@ -112,6 +108,10 @@ namespace TAO
*/
CORBA::TypeCode_ptr * content_type_;
+ /// Length of the @c array. A length of zero indicates an
+ /// unbounded @c array.
+ CORBA::ULong const length_;
+
};
} // End namespace TypeCode
diff --git a/TAO/tao/TypeCode/Array_TypeCode.inl b/TAO/tao/TypeCode/Array_TypeCode.inl
index 07d318ed907..68ce65f660b 100644
--- a/TAO/tao/TypeCode/Array_TypeCode.inl
+++ b/TAO/tao/TypeCode/Array_TypeCode.inl
@@ -7,9 +7,9 @@ ACE_INLINE
TAO::TypeCode::Array<RefCountPolicy::Array (CORBA::TCKind kind,
CORBA::ULong length,
CORBA::TypeCode_ptr * content_type)
- : kind_ (kind),
- length_ (length),
- content_type_ (content_type);
+ : kind_ (kind)
+ , content_type_ (content_type)
+ , length_ (length)
{
// ACE_ASSERT (kind == CORBA::tk_array || kind == CORBA::tk_sequence);
}
diff --git a/TAO/tao/TypeCode/Enum_TypeCode.h b/TAO/tao/TypeCode/Enum_TypeCode.h
index fa5c438d03e..f4030cd7409 100644
--- a/TAO/tao/TypeCode/Enum_TypeCode.h
+++ b/TAO/tao/TypeCode/Enum_TypeCode.h
@@ -100,17 +100,29 @@ namespace TAO
private:
+ /**
+ * @c Enum Attributes
+ *
+ * Attributes representing the structure of an OMG IDL
+ * @c enum.
+ *
+ * @note These attributes are declared in the order in which
+ * they are marshaled into a CDR stream in order to
+ * increase cache hits by improving spatial locality.
+ */
+ //@{
+
/// Base attributes containing repository ID and name of
/// structure type.
Base_Attributes base_attributes_;
+ /// The number of enumerators in the OMG IDL enumeration.
+ CORBA::ULong const nenumerators_;
+
/// Array of @c TAO::TypeCode enumerators representing
/// enumerators in the OMG IDL defined @c enum.
EnumeratorArrayType const enumerators_;
- /// The number of enumerators in the OMG IDL enumeration.
- CORBA::ULong const nenumerators_;
-
};
} // End namespace TypeCode
diff --git a/TAO/tao/TypeCode/Enum_TypeCode.inl b/TAO/tao/TypeCode/Enum_TypeCode.inl
index f10d5a465ac..a55f91dbada 100644
--- a/TAO/tao/TypeCode/Enum_TypeCode.inl
+++ b/TAO/tao/TypeCode/Enum_TypeCode.inl
@@ -9,8 +9,8 @@ TAO::TypeCode::Enum<StringType, AttrType, RefCountPolicy>::Enum (
char const * name,
Enumerator<StringType> const * enumerators,
CORBA::ULong nenumerators)
- : base_attributes_ (id, name),
- enumerators_ (enumerators),
- nenumerators_ (nenumerators)
+ : base_attributes_ (id, name)
+ , nenumerators_ (nenumerators)
+ , enumerators_ (enumerators)
{
}
diff --git a/TAO/tao/TypeCode/Struct_TypeCode.cpp b/TAO/tao/TypeCode/Struct_TypeCode.cpp
index a0504b79b59..ca160d08dea 100644
--- a/TAO/tao/TypeCode/Struct_TypeCode.cpp
+++ b/TAO/tao/TypeCode/Struct_TypeCode.cpp
@@ -4,7 +4,7 @@
#define TAO_STRUCT_TYPECODE_CPP
#include "tao/Struct_TypeCode.h"
-#include "tao/TypeCode_Fields.h"
+#include "tao/TypeCode_Field.h"
#ifndef __ACE_INLINE__
# include "tao/Struct_TypeCode.inl"
diff --git a/TAO/tao/TypeCode/Struct_TypeCode.h b/TAO/tao/TypeCode/Struct_TypeCode.h
index 849c743a838..5c2edeff449 100644
--- a/TAO/tao/TypeCode/Struct_TypeCode.h
+++ b/TAO/tao/TypeCode/Struct_TypeCode.h
@@ -101,17 +101,29 @@ namespace TAO
private:
+ /**
+ * @c Struct Attributes
+ *
+ * Attributes representing the structure of an OMG IDL
+ * @c struct.
+ *
+ * @note These attributes are declared in the order in which
+ * they are marshaled into a CDR stream in order to
+ * increase cache hits by improving spatial locality.
+ */
+ //@{
+
/// Base attributes containing repository ID and name of
/// structure type.
Base_Attributes<StringType> const base_attributes_;
+ /// The number of fields in the OMG IDL structure.
+ CORBA::ULong const nfields_;
+
/// Array of @c TAO::TypeCode fields representing structure of the
/// OMG IDL defined @c struct.
FieldArrayType const fields_;
- /// The number of fields in the OMG IDL structure.
- CORBA::ULong const nfields_;
-
};
} // End namespace TypeCode
diff --git a/TAO/tao/TypeCode/Struct_TypeCode.inl b/TAO/tao/TypeCode/Struct_TypeCode.inl
index e1c3d5b6452..34a8eec85e4 100644
--- a/TAO/tao/TypeCode/Struct_TypeCode.inl
+++ b/TAO/tao/TypeCode/Struct_TypeCode.inl
@@ -9,9 +9,9 @@ TAO::TypeCode::Struct<StringType, FieldArrayType, RefCountPolicy>::Struct (
char const * name,
Field<StringType> const * fields,
CORBA::ULong nfields)
- : base_attributes_ (id, name),
- fields_ (fields),
- nfields_ (nfields)
+ : base_attributes_ (id, name)
+ , nfields_ (nfields)
+ , fields_ (fields)
{
}
diff --git a/TAO/tao/TypeCode/TypeCode_Field.cpp b/TAO/tao/TypeCode/TypeCode_Field.cpp
index 2ff579019af..283d01c57a2 100644
--- a/TAO/tao/TypeCode/TypeCode_Field.cpp
+++ b/TAO/tao/TypeCode/TypeCode_Field.cpp
@@ -11,7 +11,7 @@
template <typename STRING_TYPE>
-ACE_INLINE char const *
+char const *
TAO::TypeCode::Field<STRING_TYPE>::~Field (void)
{
if (this->type)
diff --git a/TAO/tao/TypeCode/TypeCode_Field.h b/TAO/tao/TypeCode/TypeCode_Field.h
index 21f301284fa..553d02b8c16 100644
--- a/TAO/tao/TypeCode/TypeCode_Field.h
+++ b/TAO/tao/TypeCode/TypeCode_Field.h
@@ -87,7 +87,7 @@ namespace TAO
char const * get_name (void) const;
/// The name of the field.
- STRING_TYPE name;
+ STRING_TYPE const name;
/// Pointer to the @c CORBA::TypeCode of the field.
/**