summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-03-07 10:09:45 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-03-07 10:09:45 +0000
commitf73c0ddd7045c1cb6bf9d5b410fdda9fea4a2cce (patch)
treedc8fc6c2933e1c6603a087ce39e4a6f8d89a603b
parentfad49cd1342877dcc4a59b4850d37131ff04d690 (diff)
downloadATCD-f73c0ddd7045c1cb6bf9d5b410fdda9fea4a2cce.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/TypeCode/Objref_TypeCode.cpp13
-rw-r--r--TAO/tao/TypeCode/Sequence_TypeCode.cpp (renamed from TAO/tao/TypeCode/Array_TypeCode.cpp)39
-rw-r--r--TAO/tao/TypeCode/Sequence_TypeCode.h (renamed from TAO/tao/TypeCode/Array_TypeCode.h)42
-rw-r--r--TAO/tao/TypeCode/Sequence_TypeCode.inl (renamed from TAO/tao/TypeCode/Array_TypeCode.inl)0
4 files changed, 40 insertions, 54 deletions
diff --git a/TAO/tao/TypeCode/Objref_TypeCode.cpp b/TAO/tao/TypeCode/Objref_TypeCode.cpp
index 1f30ca609de..993dae36cd8 100644
--- a/TAO/tao/TypeCode/Objref_TypeCode.cpp
+++ b/TAO/tao/TypeCode/Objref_TypeCode.cpp
@@ -70,14 +70,7 @@ TAO::TypeCode::Objref<StringType, RefCountPolicy>::equivalent_i (
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- // Call kind_i() instead of using CORBA::tk_objref directly since a
- // subclass, such as Home_TypeCode, can use this equivalent_i()
- // implementation.
- CORBA::TCKind const this_kind =
- this->kind_i (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (tc_kind != this_kind)
+ if (tc_kind != Objref_Traits<Kind>::kind)
return 0;
char const * const this_id = this->attributes_.id ();
@@ -115,8 +108,8 @@ TAO::TypeCode::Objref<StringType, RefCountPolicy>::get_compact_typecode_i (
}
return
- Objref_Traits<Kind>::create_compact_typecode (this->attributes_.id (),
- "" /* empty name */
+ Objref_Traits<Kind>::create_compact_typecode (adapter,
+ this->attributes_.id (),
ACE_ENV_ARG_PARAMETER);
}
diff --git a/TAO/tao/TypeCode/Array_TypeCode.cpp b/TAO/tao/TypeCode/Sequence_TypeCode.cpp
index ecda1bde78f..491b5129ea5 100644
--- a/TAO/tao/TypeCode/Array_TypeCode.cpp
+++ b/TAO/tao/TypeCode/Sequence_TypeCode.cpp
@@ -1,16 +1,16 @@
// $Id$
-#ifndef TAO_ARRAY_TYPECODE_CPP
-#define TAO_ARRAY_TYPECODE_CPP
+#ifndef TAO_SEQUENCE_TYPECODE_CPP
+#define TAO_SEQUENCE_TYPECODE_CPP
-#include "Array_TypeCode.h"
+#include "Sequence_TypeCode.h"
#ifndef __ACE_INLINE__
-# include "tao/Array_TypeCode.inl"
+# include "tao/Sequence_TypeCode.inl"
#endif /* !__ACE_INLINE__ */
template <class RefCountPolicy>
-TAO::TypeCode::Array<RefCountPolicy>::~Array (void)
+TAO::TypeCode::Sequence<RefCountPolicy>::~Sequence (void)
{
if (this->content_type_)
CORBA::release (*this->content_type_);
@@ -18,7 +18,7 @@ TAO::TypeCode::Array<RefCountPolicy>::~Array (void)
template <class RefCountPolicy>
bool
-TAO::TypeCode::Array<RefCountPolicy>::tao_marshal (TAO_OutputCDR & cdr) const
+TAO::TypeCode::Sequence<RefCountPolicy>::tao_marshal (TAO_OutputCDR & cdr) const
{
// A tk_array or tk_sequence TypeCode has a "complex" parameter list
// type (see Table 15-2 in Section 15.3.5.1 "TypeCode" in the CDR
@@ -34,21 +34,21 @@ TAO::TypeCode::Array<RefCountPolicy>::tao_marshal (TAO_OutputCDR & cdr) const
template <class RefCountPolicy>
void
-TAO::TypeCode::Array<RefCountPolicy>::tao_duplicate (void)
+TAO::TypeCode::Sequence<RefCountPolicy>::tao_duplicate (void)
{
this->RefCountPolicy::add_ref (void);
}
template <class RefCountPolicy>
void
-TAO::TypeCode::Array<RefCountPolicy>::tao_release (void)
+TAO::TypeCode::Sequence<RefCountPolicy>::tao_release (void)
{
this->RefCountPolicy::remove_ref (void);
}
template <class RefCountPolicy>
CORBA::Boolean
-TAO::TypeCode::Array<RefCountPolicy>::equal_i (CORBA::TypeCode_ptr tc
+TAO::TypeCode::Sequence<RefCountPolicy>::equal_i (CORBA::TypeCode_ptr tc
ACE_ENV_ARG_DECL) const
{
// The following calls won't throw since CORBA::TypeCode::equal()
@@ -69,7 +69,7 @@ TAO::TypeCode::Array<RefCountPolicy>::equal_i (CORBA::TypeCode_ptr tc
template <class RefCountPolicy>
CORBA::Boolean
-TAO::TypeCode::Array<RefCountPolicy>::equivalent_i (CORBA::TypeCode_ptr tc
+TAO::TypeCode::Sequence<RefCountPolicy>::equivalent_i (CORBA::TypeCode_ptr tc
ACE_ENV_ARG_DECL) const
{
// We could refactor this code to the CORBA::TypeCode::equivalent()
@@ -83,14 +83,7 @@ TAO::TypeCode::Array<RefCountPolicy>::equivalent_i (CORBA::TypeCode_ptr tc
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- // Call kind_i() instead of using CORBA::tk_array directly since a
- // subclass, such as WArray_TypeCode, can use this equivalent_i()
- // implementation.
- CORBA::TCKind const this_kind =
- this->kind_i (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (tc_kind != this_kind)
+ if (tc_kind != this->kind_)
return 0;
CORBA::TypeCode_var rhs_content_type =
@@ -103,7 +96,7 @@ TAO::TypeCode::Array<RefCountPolicy>::equivalent_i (CORBA::TypeCode_ptr tc
template <class RefCountPolicy>
CORBA::TCKind
-TAO::TypeCode::Array<RefCountPolicy>::kind_i (
+TAO::TypeCode::Sequence<RefCountPolicy>::kind_i (
ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
{
return this->kind_;
@@ -111,10 +104,10 @@ TAO::TypeCode::Array<RefCountPolicy>::kind_i (
template <class RefCountPolicy>
CORBA::TypeCode_ptr
-TAO::TypeCode::Array<RefCountPolicy>::get_compact_typecode_i (
+TAO::TypeCode::Sequence<RefCountPolicy>::get_compact_typecode_i (
ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
{
- // Already compact since tk_array TypeCodes have no name or member
+ // Already compact since tk_sequence TypeCodes have no name or member
// names, meaning that we can simply call _duplicate() on this
// TypeCode.
return CORBA::TypeCode::_duplicate (this);
@@ -122,11 +115,11 @@ TAO::TypeCode::Array<RefCountPolicy>::get_compact_typecode_i (
template <class RefCountPolicy>
CORBA::TypeCode_ptr
-TAO::TypeCode::Array<RefCountPolicy>::length_i (
+TAO::TypeCode::Sequence<RefCountPolicy>::length_i (
ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
{
return this->length_;
}
-#endif /* TAO_ARRAY_TYPECODE_CPP */
+#endif /* TAO_SEQUENCE_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Array_TypeCode.h b/TAO/tao/TypeCode/Sequence_TypeCode.h
index 0628bc1d0a9..7d39dc115a5 100644
--- a/TAO/tao/TypeCode/Array_TypeCode.h
+++ b/TAO/tao/TypeCode/Sequence_TypeCode.h
@@ -2,18 +2,18 @@
//=============================================================================
/**
- * @file Array_TypeCode.h
+ * @file Sequence_TypeCode.h
*
* $Id$
*
- * Header file for @c CORBA::tk_array @c CORBA::TypeCodes.
+ * Header file for @c tk_sequence and @c tk_array @c CORBA::TypeCodes.
*
* @author Ossama Othman <ossama@dre.vanderbilt.edu>
*/
//=============================================================================
-#ifndef TAO_ARRAY_TYPECODE_H
-#define TAO_ARRAY_TYPECODE_H
+#ifndef TAO_SEQUENCE_TYPECODE_H
+#define TAO_SEQUENCE_TYPECODE_H
#include /**/ "ace/pre.h"
@@ -29,27 +29,27 @@ namespace TAO
{
/**
- * @class Array
+ * @class Sequence
*
- * @brief @c CORBA::TypeCode implementation for OMG IDL array
- * types.
+ * @brief @c CORBA::TypeCode implementation for OMG IDL
+ * @c sequence and @c array types.
*
- * This class implements a @c CORBA::TypeCode for OMG IDL array
- * types, including @c warray.
+ * This class implements a @c CORBA::TypeCode for OMG IDL
+ * @c sequence and array types.
*/
template <class RefCountPolicy>
- class Array : public CORBA::TypeCode
+ class Sequence : public CORBA::TypeCode
: private RefCountPolicy
{
public:
/// Constructor.
- Array (CORBA::TCKind kind,
+ Sequence (CORBA::TCKind kind,
CORBA::ULong length,
CORBA::TypeCode_ptr * tc);
/// Destructor.
- ~Array (void);
+ ~Sequence (void);
/**
* @name TAO-specific @c CORBA::TypeCode Methods
@@ -70,7 +70,7 @@ namespace TAO
/**
* @name @c TAO CORBA::TypeCode Template Methods
*
- * @c CORBA::TypeCode template methods specific to @c tk_array
+ * @c CORBA::TypeCode template methods specific to @c tk_sequence
* @c TypeCodes.
*
* @see @c CORBA::TypeCode
@@ -90,12 +90,12 @@ namespace TAO
/// The kind of this @c TypeCode.
/**
- * @c kind_ is either @c CORBA::tk_array or
- * @c CORBA::tk_warray.
+ * @c kind_ is either @c CORBA::tk_sequence or
+ * @c CORBA::tk_array.
*/
CORBA::TCKind const kind_;
- /// Element type of the array.
+ /// Element type of the sequence.
/**
* A pointer to the @c CORBA::TypeCode_ptr rather than the
* @c CORBA::TypeCode_ptr itself is stored since that address is
@@ -104,12 +104,12 @@ namespace TAO
* compile-time, hence the indirection.
*
* @note This @c TypeCode is released upon destruction of this
- * @c TypeCode::Array.
+ * @c TypeCode::Sequence.
*/
CORBA::TypeCode_ptr * content_type_;
- /// Length of the @c array. A length of zero indicates an
- /// unbounded @c array.
+ /// Length of the @c sequence or array. A length of zero
+ /// indicates an unbounded @c sequence.
CORBA::ULong const length_;
};
@@ -119,9 +119,9 @@ namespace TAO
#ifdef __ACE_INLINE__
-# include "tao/Array_TypeCode.inl"
+# include "tao/Sequence_TypeCode.inl"
#endif /* __ACE_INLINE__ */
#include /**/ "ace/post.h"
-#endif /* TAO_ARRAY_TYPECODE_H */
+#endif /* TAO_SEQUENCE_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/Array_TypeCode.inl b/TAO/tao/TypeCode/Sequence_TypeCode.inl
index 68ce65f660b..68ce65f660b 100644
--- a/TAO/tao/TypeCode/Array_TypeCode.inl
+++ b/TAO/tao/TypeCode/Sequence_TypeCode.inl