diff options
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/.gitignore | 39 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/AnyTypeCode.mpc | 7 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/TypeCode_Constants.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/TypeCode_Constants.h | 2 | ||||
-rw-r--r-- | TAO/tao/Basic_Types.h | 18 | ||||
-rw-r--r-- | TAO/tao/Basic_Types_IDLv4.h | 42 | ||||
-rw-r--r-- | TAO/tao/Bounded_Sequence_CDR_T.h | 71 | ||||
-rw-r--r-- | TAO/tao/Bounded_Value_Sequence_T.h | 2 | ||||
-rw-r--r-- | TAO/tao/CDR.h | 2 | ||||
-rw-r--r-- | TAO/tao/Int8Seq.pidl | 11 | ||||
-rw-r--r-- | TAO/tao/UInt8Seq.pidl | 11 | ||||
-rw-r--r-- | TAO/tao/Unbounded_Sequence_CDR_T.h | 71 | ||||
-rw-r--r-- | TAO/tao/Unbounded_Value_Sequence_T.h | 2 | ||||
-rw-r--r-- | TAO/tao/tao.mpc | 12 |
14 files changed, 264 insertions, 28 deletions
diff --git a/TAO/tao/.gitignore b/TAO/tao/.gitignore index 03471db0e1c..2e8d674c148 100644 --- a/TAO/tao/.gitignore +++ b/TAO/tao/.gitignore @@ -1,13 +1,16 @@ +/AnyTypeCode/Int8SeqA.cpp +/AnyTypeCode/Int8SeqA.h +/AnyTypeCode/UInt8SeqA.cpp +/AnyTypeCode/UInt8SeqA.h /BooleanSeqC.cpp /BooleanSeqC.h /BooleanSeqS.h -/CharSeqC.cpp -/CharSeqC.h -/CharSeqS.h -/config.h.in /CONV_FRAMEC.cpp /CONV_FRAMEC.h /CONV_FRAMES.h +/CharSeqC.cpp +/CharSeqC.h +/CharSeqS.h /CurrentC.cpp /CurrentC.h /CurrentS.h @@ -21,15 +24,18 @@ /GIOPC.h /GIOPC.inl /GIOPS.h -/IIOP_EndpointsC.cpp -/IIOP_EndpointsC.h -/IIOP_EndpointsS.h /IIOPC.cpp /IIOPC.h /IIOPS.h +/IIOP_EndpointsC.cpp +/IIOP_EndpointsC.h +/IIOP_EndpointsS.h /IOPC.cpp /IOPC.h /IOPS.h +/Int8SeqC.cpp +/Int8SeqC.h +/Int8SeqS.h /LongDoubleSeqC.cpp /LongDoubleSeqC.h /LongDoubleSeqS.h @@ -51,15 +57,15 @@ /OctetSeqC.cpp /OctetSeqC.h /OctetSeqS.h -/orb_typesC.cpp -/orb_typesC.h -/orb_typesS.h -/ParameterModeC.cpp -/ParameterModeC.h -/ParameterModeS.h /PI_ForwardC.cpp /PI_ForwardC.h /PI_ForwardS.h +/ParameterModeC.cpp +/ParameterModeC.h +/ParameterModeS.h +/PolicyC.cpp +/PolicyC.h +/PolicyC.inl /Policy_CurrentC.cpp /Policy_CurrentC.h /Policy_CurrentS.h @@ -90,6 +96,9 @@ /TimeBaseC.cpp /TimeBaseC.h /TimeBaseS.h +/UInt8SeqC.cpp +/UInt8SeqC.h +/UInt8SeqS.h /ULongLongSeqC.cpp /ULongLongSeqC.h /ULongLongSeqS.h @@ -105,3 +114,7 @@ /WStringSeqC.cpp /WStringSeqC.h /WStringSeqS.h +/config.h.in +/orb_typesC.cpp +/orb_typesC.h +/orb_typesS.h diff --git a/TAO/tao/AnyTypeCode/AnyTypeCode.mpc b/TAO/tao/AnyTypeCode/AnyTypeCode.mpc index aab09a00a2f..6555efd66b7 100644 --- a/TAO/tao/AnyTypeCode/AnyTypeCode.mpc +++ b/TAO/tao/AnyTypeCode/AnyTypeCode.mpc @@ -58,9 +58,10 @@ project(AnyTypeCode) : taolib, tao_output, install, extra_anytypecode, taoidldef FloatSeqA.cpp GIOPA.cpp IIOPA.cpp - IOPA.cpp IIOP_EndpointsA.cpp + IOPA.cpp Indirected_Type_TypeCode.cpp + Int8SeqA.cpp LongDoubleSeqA.cpp LongLongSeqA.cpp LongSeqA.cpp @@ -93,6 +94,7 @@ project(AnyTypeCode) : taolib, tao_output, install, extra_anytypecode, taoidldef TypeCodeA.cpp TypeCode_CDR_Extraction.cpp TypeCode_Constants.cpp + UInt8SeqA.cpp ULongLongSeqA.cpp ULongSeqA.cpp Union_TypeCode_Static.cpp @@ -117,9 +119,9 @@ project(AnyTypeCode) : taolib, tao_output, install, extra_anytypecode, taoidldef DoubleSeqA.h FloatSeqA.h IIOPA.h - IOPA.h IIOP_EndpointsA.h IOPA.h + Int8SeqA.h LongDoubleSeqA.h LongLongSeqA.h LongSeqA.h @@ -139,6 +141,7 @@ project(AnyTypeCode) : taolib, tao_output, install, extra_anytypecode, taoidldef StringSeqA.h TAOA.h TimeBaseA.h + UInt8SeqA.h ULongLongSeqA.h ULongSeqA.h UShortSeqA.h diff --git a/TAO/tao/AnyTypeCode/TypeCode_Constants.cpp b/TAO/tao/AnyTypeCode/TypeCode_Constants.cpp index 45f10d386e2..da113fb0934 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_Constants.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode_Constants.cpp @@ -81,6 +81,8 @@ namespace CORBA TypeCode_ptr const _tc_wchar = &TAO::TypeCode::tc_wchar; TypeCode_ptr const _tc_short = &TAO::TypeCode::tc_short; TypeCode_ptr const _tc_ushort = &TAO::TypeCode::tc_ushort; + TypeCode_ptr const _tc_int8 = nullptr; + TypeCode_ptr const _tc_uint8 = nullptr; TypeCode_ptr const _tc_long = &TAO::TypeCode::tc_long; TypeCode_ptr const _tc_ulong = &TAO::TypeCode::tc_ulong; TypeCode_ptr const _tc_longlong = &TAO::TypeCode::tc_longlong; diff --git a/TAO/tao/AnyTypeCode/TypeCode_Constants.h b/TAO/tao/AnyTypeCode/TypeCode_Constants.h index 78520ca9669..0444ec9866f 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_Constants.h +++ b/TAO/tao/AnyTypeCode/TypeCode_Constants.h @@ -39,6 +39,8 @@ namespace CORBA extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_boolean; extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_char; extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_wchar; + extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_int8; + extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_uint8; extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_short; extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_ushort; extern TAO_AnyTypeCode_Export TypeCode_ptr const _tc_long; diff --git a/TAO/tao/Basic_Types.h b/TAO/tao/Basic_Types.h index 538332cdf93..facd7e59348 100644 --- a/TAO/tao/Basic_Types.h +++ b/TAO/tao/Basic_Types.h @@ -75,6 +75,24 @@ namespace CORBA typedef ACE_CDR::WChar WChar; typedef WChar &WChar_out; + + typedef ACE_CDR::Int16 Int16; + typedef Int16 &Int16_out; + + typedef ACE_CDR::UInt16 UInt16; + typedef UInt16 &UInt16_out; + + typedef ACE_CDR::Int32 Int32; + typedef Int32 &Int32_out; + + typedef ACE_CDR::UInt32 UInt32; + typedef UInt32 &UInt32_out; + + typedef ACE_CDR::Int64 Int64; + typedef Int64 &Int64_out; + + typedef ACE_CDR::UInt64 UInt64; + typedef UInt64 &UInt64_out; //@} typedef TAO::String_var<CORBA::Char> String_var; diff --git a/TAO/tao/Basic_Types_IDLv4.h b/TAO/tao/Basic_Types_IDLv4.h new file mode 100644 index 00000000000..e4966777daa --- /dev/null +++ b/TAO/tao/Basic_Types_IDLv4.h @@ -0,0 +1,42 @@ +#ifndef TAO_BASIC_TYPES_IDLV4_H +#define TAO_BASIC_TYPES_IDLV4_H + +#include /**/ "ace/pre.h" +#include "ace/CDR_Base.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Basic_Types.h" +#include "tao/orbconf.h" + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace CORBA +{ + namespace IDLv4 + { + /** + * @name IDL4 Explicit Integer Types + * + * These are for the corresponding types defined in IDL4, but they are not + * standard in CORBA. + */ + //@{ + typedef ACE_CDR::Int8 Int8; + typedef Int8 &Int8_out; + struct Int8_tag {}; + + typedef ACE_CDR::UInt8 UInt8; + typedef UInt8 &UInt8_out; + struct UInt8_tag {}; + //@} + } +} + +TAO_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" + +#endif /* TAO_BASIC_TYPES_IDLV4_H */ diff --git a/TAO/tao/Bounded_Sequence_CDR_T.h b/TAO/tao/Bounded_Sequence_CDR_T.h index 6c673bd1214..f2339ff8bbf 100644 --- a/TAO/tao/Bounded_Sequence_CDR_T.h +++ b/TAO/tao/Bounded_Sequence_CDR_T.h @@ -1,5 +1,5 @@ -#ifndef guard_bounded_sequence_cdr -#define guard_bounded_sequence_cdr +#ifndef TAO_BOUNDED_SEQUENCE_CDR_T_H +#define TAO_BOUNDED_SEQUENCE_CDR_T_H /** * @file * @@ -11,6 +11,7 @@ #include "tao/orbconf.h" #include "tao/SystemException.h" +#include "tao/Basic_Types_IDLv4.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -277,6 +278,48 @@ namespace TAO { return true; } + template <typename stream, CORBA::ULong MAX> + bool demarshal_sequence(stream & strm, + TAO::bounded_value_sequence <CORBA::IDLv4::UInt8, MAX, CORBA::IDLv4::UInt8_tag> & target) { + typedef TAO::bounded_value_sequence <CORBA::IDLv4::UInt8, MAX, CORBA::IDLv4::UInt8_tag> sequence; + ::CORBA::ULong new_length = 0; + if (!(strm >> new_length)) { + return false; + } + if ((new_length > strm.length()) || (new_length > target.maximum ())) { + return false; + } + sequence tmp; + tmp.length(new_length); + typename sequence::value_type * buffer = tmp.get_buffer(); + if (!strm.read_uint8_array (buffer, new_length)) { + return false; + } + tmp.swap(target); + return true; + } + + template <typename stream, CORBA::ULong MAX> + bool demarshal_sequence(stream & strm, + TAO::bounded_value_sequence <CORBA::IDLv4::Int8, MAX, CORBA::IDLv4::Int8_tag> & target) { + typedef TAO::bounded_value_sequence <CORBA::IDLv4::Int8, MAX, CORBA::IDLv4::Int8_tag> sequence; + ::CORBA::ULong new_length = 0; + if (!(strm >> new_length)) { + return false; + } + if ((new_length > strm.length()) || (new_length > target.maximum ())) { + return false; + } + sequence tmp; + tmp.length(new_length); + typename sequence::value_type * buffer = tmp.get_buffer(); + if (!strm.read_int8_array (buffer, new_length)) { + return false; + } + tmp.swap(target); + return true; + } + template <typename stream, typename value_t, CORBA::ULong MAX> bool demarshal_sequence(stream & strm, TAO::bounded_value_sequence <value_t, MAX> & target) { typedef TAO::bounded_value_sequence <value_t, MAX> sequence; @@ -382,9 +425,7 @@ namespace TAO { tmp.swap(target); return true; } -} -namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Short, MAX> & source) { ::CORBA::ULong const length = source.length (); @@ -504,6 +545,26 @@ namespace TAO { return strm.write_boolean_array (source.get_buffer (), length); } + template <typename stream, CORBA::ULong MAX> + bool marshal_sequence(stream & strm, + const TAO::bounded_value_sequence <CORBA::IDLv4::UInt8, MAX, CORBA::IDLv4::UInt8_tag> & source) { + ::CORBA::ULong const length = source.length (); + if (length > source.maximum () || !(strm << length)) { + return false; + } + return strm.write_uint8_array (source.get_buffer (), length); + } + + template <typename stream, CORBA::ULong MAX> + bool marshal_sequence(stream & strm, + const TAO::bounded_value_sequence <CORBA::IDLv4::Int8, MAX, CORBA::IDLv4::Int8_tag> & source) { + ::CORBA::ULong const length = source.length (); + if (length > source.maximum () || !(strm << length)) { + return false; + } + return strm.write_int8_array (source.get_buffer (), length); + } + template <typename stream, typename value_t, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <value_t, MAX> & source) { ::CORBA::ULong const length = source.length (); @@ -568,4 +629,4 @@ namespace TAO { TAO_END_VERSIONED_NAMESPACE_DECL -#endif /* guard_bounded_sequence_cdr */ +#endif /* TAO_BOUNDED_SEQUENCE_CDR_T_H */ diff --git a/TAO/tao/Bounded_Value_Sequence_T.h b/TAO/tao/Bounded_Value_Sequence_T.h index 8c766e1c1f7..a9e620aa42a 100644 --- a/TAO/tao/Bounded_Value_Sequence_T.h +++ b/TAO/tao/Bounded_Value_Sequence_T.h @@ -18,7 +18,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { -template<class T, CORBA::ULong MAX> +template<class T, CORBA::ULong MAX, class Tag=int> class bounded_value_sequence { public: diff --git a/TAO/tao/CDR.h b/TAO/tao/CDR.h index 1b1168c5cf2..c6b7d64b17f 100644 --- a/TAO/tao/CDR.h +++ b/TAO/tao/CDR.h @@ -48,7 +48,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include /**/ "tao/TAO_Export.h" -#include "tao/Basic_Types.h" +#include "tao/Basic_Types_IDLv4.h" #include "tao/GIOP_Message_Version.h" #include "tao/Message_Semantics.h" #include "tao/Intrusive_Ref_Count_Handle_T.h" diff --git a/TAO/tao/Int8Seq.pidl b/TAO/tao/Int8Seq.pidl new file mode 100644 index 00000000000..a970dcbf55e --- /dev/null +++ b/TAO/tao/Int8Seq.pidl @@ -0,0 +1,11 @@ +#ifndef TAO_CORBA_INT8_SEQ_IDL +#define TAO_CORBA_INT8_SEQ_IDL + +#pragma prefix "omg.org" + +module CORBA +{ + typedef sequence<int8> Int8Seq; +}; + +#endif /* TAO_CORBA_INT8_SEQ_IDL */ diff --git a/TAO/tao/UInt8Seq.pidl b/TAO/tao/UInt8Seq.pidl new file mode 100644 index 00000000000..e43b19c2656 --- /dev/null +++ b/TAO/tao/UInt8Seq.pidl @@ -0,0 +1,11 @@ +#ifndef TAO_CORBA_UINT8_SEQ_IDL +#define TAO_CORBA_UINT8_SEQ_IDL + +#pragma prefix "omg.org" + +module CORBA +{ + typedef sequence<uint8> UInt8Seq; +}; + +#endif /* TAO_CORBA_UINT8_SEQ_IDL */ diff --git a/TAO/tao/Unbounded_Sequence_CDR_T.h b/TAO/tao/Unbounded_Sequence_CDR_T.h index 0c8d5308970..ab4fb8aca9e 100644 --- a/TAO/tao/Unbounded_Sequence_CDR_T.h +++ b/TAO/tao/Unbounded_Sequence_CDR_T.h @@ -1,5 +1,5 @@ -#ifndef guard_unbounded_sequence_cdr -#define guard_unbounded_sequence_cdr +#ifndef TAO_UNBOUNDED_SEQUENCE_CDR_T_H +#define TAO_UNBOUNDED_SEQUENCE_CDR_T_H /** * @file * @@ -12,6 +12,7 @@ #include "tao/orbconf.h" #include "tao/CORBA_String.h" #include "tao/SystemException.h" +#include "tao/Basic_Types_IDLv4.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -313,6 +314,48 @@ namespace TAO { return true; } + template <typename stream> + bool demarshal_sequence(stream & strm, + TAO::unbounded_value_sequence <CORBA::IDLv4::UInt8, CORBA::IDLv4::UInt8_tag> & target) { + typedef TAO::unbounded_value_sequence <CORBA::IDLv4::UInt8, CORBA::IDLv4::UInt8_tag> sequence; + ::CORBA::ULong new_length = 0; + if (!(strm >> new_length)) { + return false; + } + if (new_length > strm.length()) { + return false; + } + sequence tmp(new_length); + tmp.length(new_length); + typename sequence::value_type * buffer = tmp.get_buffer(); + if (!strm.read_uint8_array (buffer, new_length)) { + return false; + } + tmp.swap(target); + return true; + } + + template <typename stream> + bool demarshal_sequence(stream & strm, + TAO::unbounded_value_sequence <CORBA::IDLv4::Int8, CORBA::IDLv4::Int8_tag> & target) { + typedef TAO::unbounded_value_sequence <CORBA::IDLv4::Int8, CORBA::IDLv4::Int8_tag> sequence; + ::CORBA::ULong new_length = 0; + if (!(strm >> new_length)) { + return false; + } + if (new_length > strm.length()) { + return false; + } + sequence tmp(new_length); + tmp.length(new_length); + typename sequence::value_type * buffer = tmp.get_buffer(); + if (!strm.read_int8_array (buffer, new_length)) { + return false; + } + tmp.swap(target); + return true; + } + template <typename stream, typename value_t> bool demarshal_sequence(stream & strm, TAO::unbounded_value_sequence <value_t> & target) { typedef TAO::unbounded_value_sequence <value_t> sequence; @@ -418,9 +461,7 @@ namespace TAO { tmp.swap(target); return true; } -} -namespace TAO { template <typename stream> bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Short> & source) { ::CORBA::ULong const length = source.length (); @@ -554,6 +595,26 @@ namespace TAO { return strm.write_boolean_array (source.get_buffer (), length); } + template <typename stream> + bool marshal_sequence(stream & strm, + const TAO::unbounded_value_sequence <CORBA::IDLv4::UInt8, CORBA::IDLv4::UInt8_tag> & source) { + ::CORBA::ULong const length = source.length (); + if (!(strm << length)) { + return false; + } + return strm.write_uint8_array (source.get_buffer (), length); + } + + template <typename stream> + bool marshal_sequence(stream & strm, + const TAO::unbounded_value_sequence <CORBA::IDLv4::Int8, CORBA::IDLv4::Int8_tag> & source) { + ::CORBA::ULong const length = source.length (); + if (!(strm << length)) { + return false; + } + return strm.write_int8_array (source.get_buffer (), length); + } + template <typename stream, typename value_t> bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <value_t> & source) { ::CORBA::ULong const length = source.length (); @@ -618,4 +679,4 @@ namespace TAO { TAO_END_VERSIONED_NAMESPACE_DECL -#endif /* guard_unbounded_sequence_cdr */ +#endif /* TAO_UNBOUNDED_SEQUENCE_CDR_T_H */ diff --git a/TAO/tao/Unbounded_Value_Sequence_T.h b/TAO/tao/Unbounded_Value_Sequence_T.h index a82aa26e6c4..3d6893254a3 100644 --- a/TAO/tao/Unbounded_Value_Sequence_T.h +++ b/TAO/tao/Unbounded_Value_Sequence_T.h @@ -18,7 +18,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { -template<class T> +template<class T, class Tag=int> class unbounded_value_sequence { public: diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc index a816e0ce154..fd742ddc17d 100644 --- a/TAO/tao/tao.mpc +++ b/TAO/tao/tao.mpc @@ -61,6 +61,12 @@ project(TAO_Core_idl) : tao_versioning_idl_defaults, gen_ostream, install, pidl_ } IDL_Files { + idlflags += -Sci -Gse -Gata --idl-version 4 + Int8Seq.pidl >> AnyTypeCode/Int8SeqA.h AnyTypeCode/Int8SeqA.cpp + UInt8Seq.pidl >> AnyTypeCode/UInt8SeqA.h AnyTypeCode/UInt8SeqA.cpp + } + + IDL_Files { idlflags += -GT -oS PortableServer -Gd \ -Wb,safe_include=tao/PolicyC.h \ -Wb,skel_export_macro=TAO_PortableServer_Export \ @@ -169,6 +175,7 @@ project(TAO) : acelib, install, tao_output, taodefaults, pidl, extra_core, taoid IIOPC.cpp Incoming_Message_Queue.cpp Incoming_Message_Stack.cpp + Int8SeqC.cpp Invocation_Adapter.cpp Invocation_Base.cpp Invocation_Endpoint_Selectors.cpp @@ -308,6 +315,7 @@ project(TAO) : acelib, install, tao_output, taodefaults, pidl, extra_core, taoid TSS_Resources.cpp TypeCodeFactory_Adapter.cpp Typecode_typesC.cpp + UInt8SeqC.cpp ULongLongSeqC.cpp ULongSeqC.cpp UserException.cpp @@ -453,6 +461,8 @@ project(TAO) : acelib, install, tao_output, taodefaults, pidl, extra_core, taoid IIOP_Transport.h Incoming_Message_Queue.h Incoming_Message_Stack.h + Int8SeqC.h + Int8SeqS.h Invocation_Adapter.h Invocation_Base.h Invocation_Endpoint_Selectors.h @@ -633,6 +643,8 @@ project(TAO) : acelib, install, tao_output, taodefaults, pidl, extra_core, taoid Typecode_typesS.h UB_String_Arguments.h UB_String_Argument_T.h + UInt8SeqC.h + UInt8SeqS.h ULongLongSeqC.h ULongLongSeqS.h ULongSeqC.h |