diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-03-29 06:59:14 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-03-29 06:59:14 +0000 |
commit | 12c8a4fdd9e26a248094eab0efb9c2bd2b0aa7f9 (patch) | |
tree | 4162dbb7873a4ccb8b538c94e06383ec59db55ad | |
parent | 79eed81550d1139e1286e4ff4bf4e3210ddd9e02 (diff) | |
download | ATCD-12c8a4fdd9e26a248094eab0efb9c2bd2b0aa7f9.tar.gz |
ChangeLogTag:Mon Mar 28 22:49:58 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/tao/Alias_TypeCode.h | 2 | ||||
-rw-r--r-- | TAO/tao/Sequence_TypeCode.h | 2 | ||||
-rw-r--r-- | TAO/tao/TypeCode_Constants.cpp | 30 | ||||
-rw-r--r-- | TAO/tao/TypeCode_Constants.h | 2 | ||||
-rw-r--r-- | TAO/tao/Value_Box_TypeCode.h | 4 | ||||
-rw-r--r-- | TAO/tao/Value_TypeCode.h | 4 | ||||
-rw-r--r-- | TAO/tao/Value_TypeCode.inl | 2 | ||||
-rw-r--r-- | TAO/tao/Valuetype/ValueBase.cpp | 136 | ||||
-rw-r--r-- | TAO/tao/Valuetype/ValueBase.h | 7 | ||||
-rw-r--r-- | TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp | 3 |
11 files changed, 66 insertions, 133 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index eea5a684877..01830d3213d 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,4 +1,9 @@ -Mon Mar 28 22:36:14 2005 Ossama Othman <ossama@dre.vanderbilt.edu> +Mon Mar 28 22:49:58 2005 Ossama Othman <ossama@dre.vanderbilt.edu> + + * tao/Alias_TypeCode.h: + * tao/Sequence_TypeCode.h: + + Improved const-correctness. * tao/TypeCode_Constants.cpp: * tao/TypeCode_Constants.h: diff --git a/TAO/tao/Alias_TypeCode.h b/TAO/tao/Alias_TypeCode.h index 4d4357541b0..ba5f3969720 100644 --- a/TAO/tao/Alias_TypeCode.h +++ b/TAO/tao/Alias_TypeCode.h @@ -108,7 +108,7 @@ namespace TAO * @note This @c TypeCode is released upon destruction of this * @c TypeCode::Alias. */ - CORBA::TypeCode_ptr const * content_type_; + CORBA::TypeCode_ptr const * const content_type_; }; diff --git a/TAO/tao/Sequence_TypeCode.h b/TAO/tao/Sequence_TypeCode.h index cc7321bbc7f..7b96733f100 100644 --- a/TAO/tao/Sequence_TypeCode.h +++ b/TAO/tao/Sequence_TypeCode.h @@ -108,7 +108,7 @@ namespace TAO * @note This @c TypeCode is released upon destruction of this * @c TypeCode::Sequence. */ - CORBA::TypeCode_ptr const * content_type_; + CORBA::TypeCode_ptr const * const content_type_; /// Length of the @c sequence or array. A length of zero /// indicates an unbounded @c sequence. diff --git a/TAO/tao/TypeCode_Constants.cpp b/TAO/tao/TypeCode_Constants.cpp index 69771b39f6c..10145a8d6e7 100644 --- a/TAO/tao/TypeCode_Constants.cpp +++ b/TAO/tao/TypeCode_Constants.cpp @@ -13,7 +13,6 @@ ACE_RCSID (tao, #include "Empty_Param_TypeCode.h" #include "Objref_TypeCode.h" #include "String_TypeCode.h" -#include "Value_TypeCode.h" namespace TAO @@ -69,32 +68,6 @@ namespace TAO CORBA::tk_home, TAO::Null_RefCount_Policy> tc_Home (tc_home_id, tc_home_name); - // -------------- - - char const tc_value_base_id[] = "IDL:omg.org/CORBA/ValueBase:1.0"; - char const tc_value_base_name[] = "ValueBase"; - Value<char const *, - Value_Field<char const *> const *, - CORBA::tk_value, - TAO::Null_RefCount_Policy> tc_ValueBase (tc_value_base_id, - tc_value_base_name, - CORBA::VM_NONE, - 0, // Nil TypeCode - 0, // Field array - 0); // Field count - - char const tc_event_base_id[] = "IDL:omg.org/CORBA/EventBase:1.0"; - char const tc_event_base_name[] = "EventBase"; - Value<char const *, - Value_Field<char const *> const *, - CORBA::tk_event, - TAO::Null_RefCount_Policy> tc_EventBase (tc_event_base_id, - tc_event_base_name, - CORBA::VM_NONE, - 0, // Nil TypeCode - 0, // Field array - 0); // Field count - } // End TypeCode namespace } // End TAO namespace @@ -134,7 +107,4 @@ namespace CORBA TypeCode_ptr const _tc_Component = &TAO::TypeCode::tc_Component; TypeCode_ptr const _tc_Home = &TAO::TypeCode::tc_Home; - TypeCode_ptr const _tc_ValueBase = &TAO::TypeCode::tc_ValueBase; - TypeCode_ptr const _tc_EventBase = &TAO::TypeCode::tc_EventBase; - } diff --git a/TAO/tao/TypeCode_Constants.h b/TAO/tao/TypeCode_Constants.h index c498be0606d..aef854c680d 100644 --- a/TAO/tao/TypeCode_Constants.h +++ b/TAO/tao/TypeCode_Constants.h @@ -58,8 +58,6 @@ namespace CORBA extern TypeCode_ptr const _tc_Component; extern TypeCode_ptr const _tc_Home; - extern TypeCode_ptr const _tc_ValueBase; - extern TypeCode_ptr const _tc_EventBase; //@} } diff --git a/TAO/tao/Value_Box_TypeCode.h b/TAO/tao/Value_Box_TypeCode.h index fb359bf63e0..e556975e963 100644 --- a/TAO/tao/Value_Box_TypeCode.h +++ b/TAO/tao/Value_Box_TypeCode.h @@ -47,7 +47,7 @@ namespace TAO /// Constructor. Value_Box (char const * id, char const * name, - CORBA::TypeCode_ptr * tc); + CORBA::TypeCode_ptr const * tc); /// Destructor. ~Value_Box (void); @@ -105,7 +105,7 @@ namespace TAO * @note This @c TypeCode is released upon destruction of this * @c TypeCode::Value_Box. */ - CORBA::TypeCode_ptr * content_type_; + CORBA::TypeCode_ptr const * const content_type_; }; diff --git a/TAO/tao/Value_TypeCode.h b/TAO/tao/Value_TypeCode.h index b7f840dd192..9745f50e262 100644 --- a/TAO/tao/Value_TypeCode.h +++ b/TAO/tao/Value_TypeCode.h @@ -58,7 +58,7 @@ namespace TAO Value (char const * id, char const * name, CORBA::ValueModifier modifier, - CORBA::TypeCode_ptr * concrete_base, + CORBA::TypeCode_ptr const * concrete_base, Value_Field<StringType> const * fields, CORBA::ULong nfields); @@ -138,7 +138,7 @@ namespace TAO /// The @c TypeCode corresponding to the concrete base /// @c valuetype or @c eventtype. - CORBA::TypeCode_ptr * const concrete_base_; + CORBA::TypeCode_ptr const * const concrete_base_; /// The number of fields in the OMG IDL value. CORBA::ULong const nfields_; diff --git a/TAO/tao/Value_TypeCode.inl b/TAO/tao/Value_TypeCode.inl index e54295cc7e8..b0537d08e41 100644 --- a/TAO/tao/Value_TypeCode.inl +++ b/TAO/tao/Value_TypeCode.inl @@ -17,7 +17,7 @@ TAO::TypeCode::Value<StringType, FieldArrayType, Kind, RefCountPolicy>::Value ( char const * id, char const * name, CORBA::ValueModifier modifier, - CORBA::TypeCode_ptr * concrete_base, + CORBA::TypeCode_ptr const * concrete_base, Value_Field<StringType> const * fields, CORBA::ULong nfields) : base_attributes_ (id, name) diff --git a/TAO/tao/Valuetype/ValueBase.cpp b/TAO/tao/Valuetype/ValueBase.cpp index 337dcccc2df..f2e6623e705 100644 --- a/TAO/tao/Valuetype/ValueBase.cpp +++ b/TAO/tao/Valuetype/ValueBase.cpp @@ -6,7 +6,9 @@ #include "tao/ORB.h" #include "tao/ORB_Core.h" #include "tao/debug.h" -#include "tao/Typecode.h" +#include "tao/Null_RefCount_Policy.h" +#include "tao/Alias_TypeCode.h" +#include "tao/Value_TypeCode.h" #include "tao/CDR.h" #if !defined (__ACE_INLINE__) @@ -322,98 +324,54 @@ CORBA::ValueBase::_tao_unmarshal_post (TAO_InputCDR &) // ================== Typecode initializations ================== -static const CORBA::Long _oc_CORBA_ValueBase[] = - { - TAO_ENCAP_BYTE_ORDER, // byte order - 32, - ACE_NTOHL (0x49444c3a), - ACE_NTOHL (0x6f6d672e), - ACE_NTOHL (0x6f72672f), - ACE_NTOHL (0x434f5242), - ACE_NTOHL (0x412f5661), - ACE_NTOHL (0x6c756542), - ACE_NTOHL (0x6173653a), - ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/CORBA/ValueBase:1.0 - 10, - ACE_NTOHL (0x56616c75), - ACE_NTOHL (0x65426173), - ACE_NTOHL (0x65000000), // name = ValueBase - 0, // value modifier - CORBA::tk_null, // no stateful base valuetype - 0, // member count - }; - - -static const CORBA::Long _oc_CORBA_Visibility[] = - { - TAO_ENCAP_BYTE_ORDER, // byte order - 33, - ACE_NTOHL (0x49444c3a), - ACE_NTOHL (0x6f6d672e), - ACE_NTOHL (0x6f72672f), - ACE_NTOHL (0x434f5242), - ACE_NTOHL (0x412f5669), - ACE_NTOHL (0x73696269), - ACE_NTOHL (0x6c697479), - ACE_NTOHL (0x3a312e30), - ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA/Visibility:1.0 - 11, - ACE_NTOHL (0x56697369), - ACE_NTOHL (0x62696c69), - ACE_NTOHL (0x74790000), // name = Visibility - CORBA::tk_short, - }; - - -static const CORBA::Long _oc_CORBA_ValueModifier[] = + +namespace TAO +{ + namespace TypeCode { - TAO_ENCAP_BYTE_ORDER, // byte order - 36, - ACE_NTOHL (0x49444c3a), - ACE_NTOHL (0x6f6d672e), - ACE_NTOHL (0x6f72672f), - ACE_NTOHL (0x434f5242), - ACE_NTOHL (0x412f5661), - ACE_NTOHL (0x6c75654d), - ACE_NTOHL (0x6f646966), - ACE_NTOHL (0x6965723a), - ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/CORBA/ValueModifier:1.0 - 14, - ACE_NTOHL (0x56616c75), - ACE_NTOHL (0x654d6f64), - ACE_NTOHL (0x69666965), - ACE_NTOHL (0x72000000), // name = ValueModifier - CORBA::tk_short, - }; + char const tc_value_base_id[] = "IDL:omg.org/CORBA/ValueBase:1.0"; + char const tc_value_base_name[] = "ValueBase"; + Value<char const *, + Value_Field<char const *> const *, + CORBA::tk_value, + TAO::Null_RefCount_Policy> tc_ValueBase (tc_value_base_id, + tc_value_base_name, + CORBA::VM_NONE, + &CORBA::_tc_null, + 0, // Field array + 0); // Field count + + char const tc_event_base_id[] = "IDL:omg.org/CORBA/EventBase:1.0"; + char const tc_event_base_name[] = "EventBase"; + Value<char const *, + Value_Field<char const *> const *, + CORBA::tk_event, + TAO::Null_RefCount_Policy> tc_EventBase (tc_event_base_id, + tc_event_base_name, + CORBA::VM_NONE, + &CORBA::_tc_null, + 0, // Field array + 0); // Field count + + Alias<char const *, + TAO::Null_RefCount_Policy> tc_Visibility ( + "IDL:omg.org/CORBA/Visibility:1.0", + "Visibility", + &CORBA::_tc_short); + + Alias<char const *, + TAO::Null_RefCount_Policy> tc_ValueModifier ( + "IDL:omg.org/CORBA/ValueModifier:1.0", + "ValueModifier", + &CORBA::_tc_short); + } +} namespace CORBA { - static TypeCode _tao_valuetype_tk_val_tmp (CORBA::tk_value, - sizeof (_oc_CORBA_ValueBase), - (char *) &_oc_CORBA_ValueBase, - 0, - sizeof (CORBA::ValueBase)); - - - TypeCode_ptr _tc_ValueBase = &_tao_valuetype_tk_val_tmp; - - static TypeCode _tao_valuetype_tk_vis_tmp (CORBA::tk_alias, - sizeof (_oc_CORBA_Visibility), - (char *) &_oc_CORBA_Visibility, - 0, - sizeof (CORBA::Visibility)); - - TypeCode_ptr _tc_Visibility = - &_tao_valuetype_tk_vis_tmp; - - static TypeCode _tao_valuetype_tk_vm_tmp (CORBA::tk_alias, - sizeof (_oc_CORBA_ValueModifier), - (char *) &_oc_CORBA_ValueModifier, - 0, - sizeof (CORBA::ValueModifier)); - - TypeCode_ptr _tc_ValueModifier = - &_tao_valuetype_tk_vm_tmp; + TypeCode_ptr const _tc_ValueBase = &TAO::TypeCode::tc_ValueBase; + TypeCode_ptr const _tc_Visibility = &TAO::TypeCode::tc_Visibility; + TypeCode_ptr const _tc_ValueModifier = &TAO::TypeCode::tc_ValueModifier; } // member functions for CORBA::DefaultValueRefCountBase ============ diff --git a/TAO/tao/Valuetype/ValueBase.h b/TAO/tao/Valuetype/ValueBase.h index a883662270e..fccbccbb688 100644 --- a/TAO/tao/Valuetype/ValueBase.h +++ b/TAO/tao/Valuetype/ValueBase.h @@ -128,9 +128,10 @@ namespace CORBA }; // ValueBase /// Valuetype-related type codes. - extern TAO_Valuetype_Export TypeCode_ptr _tc_ValueBase; - extern TAO_Valuetype_Export TypeCode_ptr _tc_Visibility; - extern TAO_Valuetype_Export TypeCode_ptr _tc_ValueModifier; + extern TAO_Valuetype_Export TypeCode_ptr const _tc_ValueBase; + extern TAO_Valuetype_Export TypeCode_ptr const _tc_EventBase; + extern TAO_Valuetype_Export TypeCode_ptr const _tc_Visibility; + extern TAO_Valuetype_Export TypeCode_ptr const _tc_ValueModifier; /** * @class DefaultValueRefCountBase diff --git a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp index 776088351dc..279d75c5fc3 100644 --- a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp +++ b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp @@ -6,12 +6,13 @@ #include "ValueFactory_Map.h" #include "tao/ORB_Core.h" -#include "tao/Typecode.h" + ACE_RCSID (Valuetype, Valuetype_Adapter_Impl, "$Id$") + TAO_Valuetype_Adapter_Impl::TAO_Valuetype_Adapter_Impl (void) { |