diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-06-02 22:37:42 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-06-02 22:37:42 +0000 |
commit | 44c052fba306d451dd9626471b95a961c265bace (patch) | |
tree | c60c9e64b7875c8a17d30d3813bacf8d415d383a /TAO | |
parent | 95cd586c6704a7daad470b56158c13447af03efc (diff) | |
download | ATCD-44c052fba306d451dd9626471b95a961c265bace.tar.gz |
ChangeLogTag: Sat Jun 2 17:24:37 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/tao/DynamicAny/DynAnyFactory.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynAny_i.cpp | 85 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynAny_i.h | 1064 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynArray_i.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynArray_i.h | 1068 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynEnum_i.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynEnum_i.h | 1058 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynSequence_i.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynSequence_i.h | 1069 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynStruct_i.cpp | 15 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynStruct_i.h | 1064 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynUnion_i.cpp | 28 | ||||
-rw-r--r-- | TAO/tao/DynamicAny/DynUnion_i.h | 1065 |
13 files changed, 3327 insertions, 3210 deletions
diff --git a/TAO/tao/DynamicAny/DynAnyFactory.cpp b/TAO/tao/DynamicAny/DynAnyFactory.cpp index 6f9c8d1f674..6b5c963b77f 100644 --- a/TAO/tao/DynamicAny/DynAnyFactory.cpp +++ b/TAO/tao/DynamicAny/DynAnyFactory.cpp @@ -108,6 +108,7 @@ TAO_DynAnyFactory::make_dyn_any (const CORBA_Any &any, case CORBA::tk_TypeCode: case CORBA::tk_objref: case CORBA::tk_string: + case CORBA::tk_wstring: { TAO_DynAny_i *p; @@ -245,6 +246,7 @@ TAO_DynAnyFactory::make_dyn_any (CORBA::TypeCode_ptr tc, case CORBA::tk_TypeCode: case CORBA::tk_objref: case CORBA::tk_string: + case CORBA::tk_wstring: { TAO_DynAny_i *p; diff --git a/TAO/tao/DynamicAny/DynAny_i.cpp b/TAO/tao/DynamicAny/DynAny_i.cpp index f122844d624..d916978f82a 100644 --- a/TAO/tao/DynamicAny/DynAny_i.cpp +++ b/TAO/tao/DynamicAny/DynAny_i.cpp @@ -34,10 +34,10 @@ TAO_DynAny_i::check_typecode (CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV) { // Check to see if it's a simple type. - int tk = TAO_DynAnyFactory::unalias (tc, ACE_TRY_ENV); + CORBA::TCKind tk = TAO_DynAnyFactory::unalias (tc, ACE_TRY_ENV); ACE_CHECK; switch (tk) - { + { case CORBA::tk_null: case CORBA::tk_void: case CORBA::tk_short: @@ -60,18 +60,88 @@ TAO_DynAny_i::check_typecode (CORBA::TypeCode_ptr tc, break; default: ACE_THROW (DynamicAny::DynAnyFactory::InconsistentTypeCode ()); - } + } +} + +void +TAO_DynAny_i::set_to_default_value (CORBA::TypeCode_ptr tc, + CORBA::Environment &ACE_TRY_ENV) +{ + CORBA::TCKind tk = TAO_DynAnyFactory::unalias (tc, ACE_TRY_ENV); + ACE_CHECK; + switch (tk) + { + case CORBA::tk_null: + case CORBA::tk_void: + break; + case CORBA::tk_short: + this->any_ <<= ACE_static_cast (CORBA::Short, 0); + break; + case CORBA::tk_long: + this->any_ <<= ACE_static_cast (CORBA::Long, 0); + break; + case CORBA::tk_longlong: + this->any_ <<= ACE_static_cast (CORBA::LongLong, 0); + break; + case CORBA::tk_ushort: + this->any_ <<= ACE_static_cast (CORBA::UShort, 0); + break; + case CORBA::tk_ulong: + this->any_ <<= ACE_static_cast (CORBA::ULong, 0); + break; + case CORBA::tk_ulonglong: + this->any_ <<= ACE_static_cast (CORBA::ULongLong, 0); + break; + case CORBA::tk_boolean: + this->any_ <<= CORBA::Any::from_boolean (0); + break; + case CORBA::tk_octet: + this->any_ <<= CORBA::Any::from_octet (0); + break; + case CORBA::tk_char: + this->any_ <<= CORBA::Any::from_char (0); + break; + case CORBA::tk_wchar: + this->any_ <<= CORBA::Any::from_wchar (0); + break; + case CORBA::tk_float: + this->any_ <<= ACE_static_cast (CORBA::Float, 0); + break; + case CORBA::tk_double: + this->any_ <<= ACE_static_cast (CORBA::Double, 0); + break; + case CORBA::tk_any: + this->any_ <<= CORBA::Any (CORBA::_tc_null); + break; + case CORBA::tk_TypeCode: + this->any_ <<= &CORBA::TypeCode (CORBA::tk_null); + break; + case CORBA::tk_objref: + this->any_ <<= CORBA::Object::_nil (); + break; + case CORBA::tk_string: + this->any_ <<= ""; + break; + case CORBA::tk_wstring: + this->any_ <<= L""; + break; + default: + // Should never get here - check_typecode() has already been called. + break; + } } void TAO_DynAny_i::init (CORBA_TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV) { - this->check_typecode (tc, ACE_TRY_ENV); + this->check_typecode (tc, + ACE_TRY_ENV); ACE_CHECK; - this->any_ = CORBA::Any (CORBA::TypeCode::_duplicate (tc)); - + this->set_to_default_value (tc, + ACE_TRY_ENV); + ACE_CHECK; } void @@ -79,7 +149,8 @@ TAO_DynAny_i::init (const CORBA_Any& any, CORBA::Environment &ACE_TRY_ENV) { CORBA::TypeCode_var tc = any.type (); - this->check_typecode (tc.in (), ACE_TRY_ENV); + this->check_typecode (tc.in (), + ACE_TRY_ENV); ACE_CHECK; this->any_ = any; diff --git a/TAO/tao/DynamicAny/DynAny_i.h b/TAO/tao/DynamicAny/DynAny_i.h index bdaeeffe6dc..aa403b9c31f 100644 --- a/TAO/tao/DynamicAny/DynAny_i.h +++ b/TAO/tao/DynamicAny/DynAny_i.h @@ -33,7 +33,9 @@ # pragma warning (disable:4250) #endif /* _MSC_VER */ -class TAO_DynamicAny_Export TAO_DynAny_i : public virtual DynamicAny::DynAny, public virtual TAO_Local_RefCounted_Object +class TAO_DynamicAny_Export TAO_DynAny_i + : public virtual DynamicAny::DynAny, + public virtual TAO_Local_RefCounted_Object { // = TITLE // TAO_DynAny_i @@ -42,10 +44,10 @@ class TAO_DynamicAny_Export TAO_DynAny_i : public virtual DynamicAny::DynAny, pu // Implementation of the basic Dynamic Any datatype. public: TAO_DynAny_i (void); - // Constructor + // Constructor. ~TAO_DynAny_i (void); - // destructor + // Destructor. void init (CORBA_TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); @@ -53,9 +55,9 @@ public: void init (const CORBA_Any& any, CORBA::Environment &ACE_TRY_ENV); - // Initialize using an Any + // Initialize using an Any. - // = LocalObject methods + // = LocalObject methods. static TAO_DynAny_i *_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV = @@ -63,548 +65,552 @@ public: ); virtual void *_tao_QueryInterface (ptr_arith_t type); - // = Functions common to all Dynamic Any types - - virtual CORBA::TypeCode_ptr type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void assign ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); - - virtual void from_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * to_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean equal ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void insert_boolean ( - CORBA::Boolean value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_octet ( - CORBA::Octet value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_char ( - CORBA::Char value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_short ( - CORBA::Short value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ushort ( - CORBA::UShort value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_long ( - CORBA::Long value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulong ( - CORBA::ULong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_float ( - CORBA::Float value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_double ( - CORBA::Double value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_string ( - const char * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_reference ( - CORBA::Object_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_typecode ( - CORBA::TypeCode_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longlong ( - CORBA::LongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulonglong ( - CORBA::ULongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longdouble ( - CORBA::LongDouble value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wchar ( - CORBA::WChar value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wstring ( - const CORBA::WChar * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_dyn_any ( - DynamicAny::DynAny_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + // = Functions common to all Dynamic Any types. + + virtual CORBA::TypeCode_ptr type ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void assign ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); + + virtual void from_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * to_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean equal ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr copy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void insert_boolean ( + CORBA::Boolean value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_octet ( + CORBA::Octet value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_char ( + CORBA::Char value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_short ( + CORBA::Short value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ushort ( + CORBA::UShort value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_long ( + CORBA::Long value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulong ( + CORBA::ULong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_float ( + CORBA::Float value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_double ( + CORBA::Double value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_string ( + const char * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_reference ( + CORBA::Object_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_typecode ( + CORBA::TypeCode_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longlong ( + CORBA::LongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulonglong ( + CORBA::ULongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longdouble ( + CORBA::LongDouble value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wchar ( + CORBA::WChar value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wstring ( + const CORBA::WChar * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_dyn_any ( + DynamicAny::DynAny_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual void insert_val ( - CORBA::ValueBase_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual void insert_val ( + CORBA::ValueBase_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean get_boolean ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Octet get_octet ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Char get_char ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Short get_short ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::UShort get_ushort ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Long get_long ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULong get_ulong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Float get_float ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Double get_double ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual char * get_string ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Object_ptr get_reference ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::TypeCode_ptr get_typecode ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongLong get_longlong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULongLong get_ulonglong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongDouble get_longdouble ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar get_wchar ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar * get_wstring ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * get_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual DynamicAny::DynAny_ptr get_dyn_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::Boolean get_boolean ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Octet get_octet ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Char get_char ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Short get_short ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::UShort get_ushort ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Long get_long ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULong get_ulong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Float get_float ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Double get_double ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual char * get_string ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Object_ptr get_reference ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::TypeCode_ptr get_typecode ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongLong get_longlong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULongLong get_ulonglong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongDouble get_longdouble ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar get_wchar ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar * get_wstring ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * get_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual DynamicAny::DynAny_ptr get_dyn_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual CORBA::ValueBase_ptr get_val ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::ValueBase_ptr get_val ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean seek ( - CORBA::Long index, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void rewind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean next ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::ULong component_count ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr current_component ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); + virtual CORBA::Boolean seek ( + CORBA::Long index, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void rewind ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean next ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::ULong component_count ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr current_component ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); private: void check_typecode (CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // Check if the typecode is acceptable + // Check if the typecode is acceptable. + + void set_to_default_value (CORBA::TypeCode_ptr tc, + CORBA::Environment &ACE_TRY_ENV); + // Used when we are created from a typecode. - // Use copy() or assign() instead of these + // Use copy() or assign() instead of these. TAO_DynAny_i (const TAO_DynAny_i &src); TAO_DynAny_i &operator= (const TAO_DynAny_i &src); private: CORBA_Any any_; - // contents + // Contents. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/tao/DynamicAny/DynArray_i.cpp b/TAO/tao/DynamicAny/DynArray_i.cpp index 70b64de4ad5..b788690415f 100644 --- a/TAO/tao/DynamicAny/DynArray_i.cpp +++ b/TAO/tao/DynamicAny/DynArray_i.cpp @@ -107,12 +107,20 @@ TAO_DynArray_i::init (CORBA_TypeCode_ptr tc, CORBA::ULong numfields = this->get_arg_length (tc, ACE_TRY_ENV); ACE_CHECK; + // Resize the array. this->da_members_.size (numfields); + CORBA::TypeCode_var elemtype = tc->content_type (ACE_TRY_ENV); + ACE_CHECK; + for (CORBA::ULong i = 0; i < numfields; i++) - // With a typecode arg, we just create the top level. - this->da_members_[i] = 0; + { + // Initialize each element. + this->da_members_[i] = TAO_DynAnyFactory::make_dyn_any (elemtype.in (), + ACE_TRY_ENV); + ACE_CHECK; + } } CORBA::TypeCode_ptr diff --git a/TAO/tao/DynamicAny/DynArray_i.h b/TAO/tao/DynamicAny/DynArray_i.h index b248e70aaf2..07fa270ddc4 100644 --- a/TAO/tao/DynamicAny/DynArray_i.h +++ b/TAO/tao/DynamicAny/DynArray_i.h @@ -33,7 +33,9 @@ # pragma warning (disable:4250) #endif /* _MSC_VER */ -class TAO_DynamicAny_Export TAO_DynArray_i : public virtual DynamicAny::DynArray, public virtual TAO_Local_RefCounted_Object +class TAO_DynamicAny_Export TAO_DynArray_i + : public virtual DynamicAny::DynArray, + public virtual TAO_Local_RefCounted_Object { // = TITLE // TAO_DynArray_i @@ -43,18 +45,18 @@ class TAO_DynamicAny_Export TAO_DynArray_i : public virtual DynamicAny::DynArray // public: TAO_DynArray_i (void); - // Must be instantiated with at least a typecode + // Must be instantiated with at least a typecode. ~TAO_DynArray_i (void); - // destructor + // Destructor. void init (CORBA_TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // Initialize using just a TypeCode + // Initialize using just a TypeCode. void init (const CORBA_Any& any, CORBA::Environment &ACE_TRY_ENV); - // Initialize using an Any + // Initialize using an Any. // = LocalObject methods static TAO_DynArray_i *_narrow ( @@ -64,7 +66,7 @@ public: ); virtual void *_tao_QueryInterface (ptr_arith_t type); - // = Functions specific to DynArray + // = Functions specific to DynArray. virtual DynamicAny::AnySeq * get_elements ( CORBA::Environment &ACE_TRY_ENV = @@ -104,536 +106,536 @@ public: DynamicAny::DynAny::InvalidValue )); - // = Functions common to all Dynamic Any types - - virtual CORBA::TypeCode_ptr type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void assign ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); - - virtual void from_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * to_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - - )); - - virtual CORBA::Boolean equal ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void insert_boolean ( - CORBA::Boolean value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_octet ( - CORBA::Octet value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_char ( - CORBA::Char value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_short ( - CORBA::Short value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ushort ( - CORBA::UShort value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_long ( - CORBA::Long value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulong ( - CORBA::ULong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_float ( - CORBA::Float value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_double ( - CORBA::Double value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_string ( - const char * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_reference ( - CORBA::Object_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_typecode ( - CORBA::TypeCode_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longlong ( - CORBA::LongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulonglong ( - CORBA::ULongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longdouble ( - CORBA::LongDouble value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wchar ( - CORBA::WChar value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wstring ( - const CORBA::WChar * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_dyn_any ( - DynamicAny::DynAny_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + // = Functions common to all Dynamic Any types. + + virtual CORBA::TypeCode_ptr type ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void assign ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); + + virtual void from_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * to_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + + )); + + virtual CORBA::Boolean equal ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr copy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void insert_boolean ( + CORBA::Boolean value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_octet ( + CORBA::Octet value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_char ( + CORBA::Char value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_short ( + CORBA::Short value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ushort ( + CORBA::UShort value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_long ( + CORBA::Long value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulong ( + CORBA::ULong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_float ( + CORBA::Float value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_double ( + CORBA::Double value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_string ( + const char * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_reference ( + CORBA::Object_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_typecode ( + CORBA::TypeCode_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longlong ( + CORBA::LongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulonglong ( + CORBA::ULongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longdouble ( + CORBA::LongDouble value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wchar ( + CORBA::WChar value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wstring ( + const CORBA::WChar * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_dyn_any ( + DynamicAny::DynAny_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual void insert_val ( - CORBA::ValueBase_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual void insert_val ( + CORBA::ValueBase_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean get_boolean ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Octet get_octet ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Char get_char ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Short get_short ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::UShort get_ushort ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Long get_long ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULong get_ulong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Float get_float ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Double get_double ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual char * get_string ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Object_ptr get_reference ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::TypeCode_ptr get_typecode ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongLong get_longlong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULongLong get_ulonglong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongDouble get_longdouble ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar get_wchar ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar * get_wstring ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * get_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual DynamicAny::DynAny_ptr get_dyn_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::Boolean get_boolean ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Octet get_octet ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Char get_char ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Short get_short ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::UShort get_ushort ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Long get_long ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULong get_ulong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Float get_float ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Double get_double ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual char * get_string ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Object_ptr get_reference ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::TypeCode_ptr get_typecode ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongLong get_longlong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULongLong get_ulonglong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongDouble get_longdouble ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar get_wchar ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar * get_wstring ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * get_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual DynamicAny::DynAny_ptr get_dyn_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual CORBA::ValueBase_ptr get_val ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::ValueBase_ptr get_val ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean seek ( - CORBA::Long index, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void rewind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean next ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::ULong component_count ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr current_component ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); + virtual CORBA::Boolean seek ( + CORBA::Long index, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void rewind ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean next ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::ULong component_count ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr current_component ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); private: CORBA::TypeCode_ptr get_element_type (CORBA::Environment &ACE_TRY_ENV = @@ -643,21 +645,21 @@ private: CORBA::ULong get_arg_length (CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Gets the length of the array from the typecode + // Gets the length of the array from the typecode. - // Use copy() or assign() instead of these + // Use copy() or assign() instead of these. TAO_DynArray_i (const TAO_DynArray_i &src); TAO_DynArray_i &operator= (const TAO_DynArray_i &src); private: CORBA::TypeCode_var type_; - // Holds the typecode of the array + // Holds the typecode of the array. CORBA::Long current_index_; - // Slot of the current component + // Slot of the current component. ACE_Array_Base<DynamicAny::DynAny_var> da_members_; - // Each component is also a DynAny + // Each component is also a DynAny. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/tao/DynamicAny/DynEnum_i.cpp b/TAO/tao/DynamicAny/DynEnum_i.cpp index 40ece7aae62..a671f9598fc 100644 --- a/TAO/tao/DynamicAny/DynEnum_i.cpp +++ b/TAO/tao/DynamicAny/DynEnum_i.cpp @@ -70,6 +70,8 @@ TAO_DynEnum_i::init (CORBA_TypeCode_ptr tc, } this->type_ = CORBA::TypeCode::_duplicate (tc); + + this->value_ = 0U; } // **************************************************************** diff --git a/TAO/tao/DynamicAny/DynEnum_i.h b/TAO/tao/DynamicAny/DynEnum_i.h index cb7f9e2e0ad..dfa43f0f37a 100644 --- a/TAO/tao/DynamicAny/DynEnum_i.h +++ b/TAO/tao/DynamicAny/DynEnum_i.h @@ -33,7 +33,9 @@ # pragma warning (disable:4250) #endif /* _MSC_VER */ -class TAO_DynamicAny_Export TAO_DynEnum_i : public virtual DynamicAny::DynEnum, public virtual TAO_Local_RefCounted_Object +class TAO_DynamicAny_Export TAO_DynEnum_i + : public virtual DynamicAny::DynEnum, + public virtual TAO_Local_RefCounted_Object { // = TITLE // TAO_DynEnum_i @@ -46,17 +48,17 @@ public: // Must be instantiated with at least a typecode. ~TAO_DynEnum_i (void); - // destructor + // Destructor. void init (CORBA_TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // Initialize using just a TypeCode + // Initialize using just a TypeCode. void init (const CORBA_Any& any, CORBA::Environment &ACE_TRY_ENV); - // Initialize using an Any + // Initialize using an Any. - // = LocalObject methods + // = LocalObject methods. static TAO_DynEnum_i *_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV = @@ -64,7 +66,7 @@ public: ); virtual void *_tao_QueryInterface (ptr_arith_t type); - // = Functions specific to DynEnum + // = Functions specific to DynEnum. virtual char * get_as_string ( CORBA::Environment &ACE_TRY_ENV = @@ -102,538 +104,538 @@ public: DynamicAny::DynAny::InvalidValue )); - // = Functions common to all Dynamic Any types - - virtual CORBA::TypeCode_ptr type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void assign ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); - - virtual void from_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * to_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean equal ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void insert_boolean ( - CORBA::Boolean value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_octet ( - CORBA::Octet value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_char ( - CORBA::Char value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_short ( - CORBA::Short value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ushort ( - CORBA::UShort value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_long ( - CORBA::Long value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulong ( - CORBA::ULong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_float ( - CORBA::Float value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_double ( - CORBA::Double value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_string ( - const char * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_reference ( - CORBA::Object_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_typecode ( - CORBA::TypeCode_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longlong ( - CORBA::LongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulonglong ( - CORBA::ULongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longdouble ( - CORBA::LongDouble value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wchar ( - CORBA::WChar value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wstring ( - const CORBA::WChar * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_dyn_any ( - DynamicAny::DynAny_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + // = Functions common to all Dynamic Any types. + + virtual CORBA::TypeCode_ptr type ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void assign ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); + + virtual void from_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * to_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean equal ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr copy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void insert_boolean ( + CORBA::Boolean value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_octet ( + CORBA::Octet value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_char ( + CORBA::Char value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_short ( + CORBA::Short value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ushort ( + CORBA::UShort value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_long ( + CORBA::Long value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulong ( + CORBA::ULong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_float ( + CORBA::Float value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_double ( + CORBA::Double value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_string ( + const char * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_reference ( + CORBA::Object_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_typecode ( + CORBA::TypeCode_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longlong ( + CORBA::LongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulonglong ( + CORBA::ULongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longdouble ( + CORBA::LongDouble value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wchar ( + CORBA::WChar value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wstring ( + const CORBA::WChar * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_dyn_any ( + DynamicAny::DynAny_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual void insert_val ( - CORBA::ValueBase_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual void insert_val ( + CORBA::ValueBase_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean get_boolean ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Octet get_octet ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Char get_char ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Short get_short ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::UShort get_ushort ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Long get_long ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULong get_ulong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Float get_float ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Double get_double ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual char * get_string ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Object_ptr get_reference ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::TypeCode_ptr get_typecode ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongLong get_longlong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULongLong get_ulonglong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongDouble get_longdouble ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar get_wchar ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar * get_wstring ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * get_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual DynamicAny::DynAny_ptr get_dyn_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::Boolean get_boolean ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Octet get_octet ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Char get_char ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Short get_short ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::UShort get_ushort ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Long get_long ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULong get_ulong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Float get_float ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Double get_double ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual char * get_string ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Object_ptr get_reference ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::TypeCode_ptr get_typecode ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongLong get_longlong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULongLong get_ulonglong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongDouble get_longdouble ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar get_wchar ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar * get_wstring ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * get_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual DynamicAny::DynAny_ptr get_dyn_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual CORBA::ValueBase_ptr get_val ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::ValueBase_ptr get_val ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean seek ( - CORBA::Long index, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void rewind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean next ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::ULong component_count ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr current_component ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); + virtual CORBA::Boolean seek ( + CORBA::Long index, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void rewind ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean next ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::ULong component_count ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr current_component ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); private: - // = Use copy() or assign() instead of these + // = Use copy() or assign() instead of these. TAO_DynEnum_i (const TAO_DynEnum_i &src); TAO_DynEnum_i &operator= (const TAO_DynEnum_i &src); diff --git a/TAO/tao/DynamicAny/DynSequence_i.cpp b/TAO/tao/DynamicAny/DynSequence_i.cpp index 1f3fd44f2dd..8ae08aba61f 100644 --- a/TAO/tao/DynamicAny/DynSequence_i.cpp +++ b/TAO/tao/DynamicAny/DynSequence_i.cpp @@ -106,8 +106,11 @@ TAO_DynSequence_i::init (CORBA_TypeCode_ptr tc, ACE_THROW (DynamicAny::DynAnyFactory::InconsistentTypeCode ()); } + // Empty sequence. + this->da_members_.size (0U); + this->type_ = CORBA::TypeCode::_duplicate (tc); - this->current_index_ = 0; + this->current_index_ = -1; } // **************************************************************** diff --git a/TAO/tao/DynamicAny/DynSequence_i.h b/TAO/tao/DynamicAny/DynSequence_i.h index 891dbb7addc..45eee92e499 100644 --- a/TAO/tao/DynamicAny/DynSequence_i.h +++ b/TAO/tao/DynamicAny/DynSequence_i.h @@ -35,30 +35,32 @@ # pragma warning (disable:4250) #endif /* _MSC_VER */ -class TAO_DynamicAny_Export TAO_DynSequence_i : public virtual DynamicAny::DynSequence, public virtual TAO_Local_RefCounted_Object +class TAO_DynamicAny_Export TAO_DynSequence_i + : public virtual DynamicAny::DynSequence, + public virtual TAO_Local_RefCounted_Object { // = TITLE // TAO_DynSequence_i // // = DESCRIPTION - // Implementation of Dynamic Any type for Sequences + // Implementation of Dynamic Any type for Sequences. // public: TAO_DynSequence_i (void); - // Constructor + // Constructor. ~TAO_DynSequence_i (void); - // destructor + // Destructor. void init (CORBA_TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // Initialize using just a TypeCode + // Initialize using just a TypeCode. void init (const CORBA_Any& any, CORBA::Environment &ACE_TRY_ENV); - // Initialize using an Any + // Initialize using an Any. - // = LocalObject methods + // = LocalObject methods. static TAO_DynSequence_i *_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV = @@ -66,7 +68,8 @@ public: ); virtual void *_tao_QueryInterface (ptr_arith_t type); - // = Functions specific to DynSequence + // = Functions specific to DynSequence. + virtual CORBA::ULong get_length ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -124,540 +127,540 @@ public: )); - // = Functions common to all Dynamic Any types - - virtual CORBA::TypeCode_ptr type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void assign ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); - - virtual void from_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * to_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean equal ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void insert_boolean ( - CORBA::Boolean value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_octet ( - CORBA::Octet value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_char ( - CORBA::Char value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_short ( - CORBA::Short value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ushort ( - CORBA::UShort value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_long ( - CORBA::Long value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulong ( - CORBA::ULong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_float ( - CORBA::Float value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_double ( - CORBA::Double value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_string ( - const char * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_reference ( - CORBA::Object_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_typecode ( - CORBA::TypeCode_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longlong ( - CORBA::LongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulonglong ( - CORBA::ULongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longdouble ( - CORBA::LongDouble value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wchar ( - CORBA::WChar value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wstring ( - const CORBA::WChar * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_dyn_any ( - DynamicAny::DynAny_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + // = Functions common to all Dynamic Any types. + + virtual CORBA::TypeCode_ptr type ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void assign ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); + + virtual void from_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * to_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean equal ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr copy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void insert_boolean ( + CORBA::Boolean value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_octet ( + CORBA::Octet value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_char ( + CORBA::Char value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_short ( + CORBA::Short value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ushort ( + CORBA::UShort value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_long ( + CORBA::Long value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulong ( + CORBA::ULong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_float ( + CORBA::Float value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_double ( + CORBA::Double value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_string ( + const char * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_reference ( + CORBA::Object_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_typecode ( + CORBA::TypeCode_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longlong ( + CORBA::LongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulonglong ( + CORBA::ULongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longdouble ( + CORBA::LongDouble value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wchar ( + CORBA::WChar value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wstring ( + const CORBA::WChar * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_dyn_any ( + DynamicAny::DynAny_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual void insert_val ( - CORBA::ValueBase_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual void insert_val ( + CORBA::ValueBase_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean get_boolean ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Octet get_octet ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Char get_char ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Short get_short ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::UShort get_ushort ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Long get_long ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULong get_ulong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Float get_float ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Double get_double ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual char * get_string ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Object_ptr get_reference ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::TypeCode_ptr get_typecode ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongLong get_longlong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULongLong get_ulonglong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongDouble get_longdouble ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar get_wchar ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar * get_wstring ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * get_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual DynamicAny::DynAny_ptr get_dyn_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::Boolean get_boolean ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Octet get_octet ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Char get_char ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Short get_short ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::UShort get_ushort ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Long get_long ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULong get_ulong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Float get_float ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Double get_double ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual char * get_string ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Object_ptr get_reference ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::TypeCode_ptr get_typecode ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongLong get_longlong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULongLong get_ulonglong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongDouble get_longdouble ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar get_wchar ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar * get_wstring ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * get_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual DynamicAny::DynAny_ptr get_dyn_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual CORBA::ValueBase_ptr get_val ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::ValueBase_ptr get_val ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean seek ( - CORBA::Long index, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void rewind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean next ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::ULong component_count ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr current_component ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); + virtual CORBA::Boolean seek ( + CORBA::Long index, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void rewind ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean next ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::ULong component_count ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr current_component ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); private: void check_typecode (CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // Check if the typecode is acceptable + // Check if the typecode is acceptable. CORBA::TypeCode_ptr get_element_type (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -669,13 +672,13 @@ private: private: CORBA::TypeCode_var type_; - // Holds the typecode of the Sequence + // Holds the typecode of the Sequence. CORBA::Long current_index_; - // Index of the current component + // Index of the current component. ACE_Array_Base<DynamicAny::DynAny_var> da_members_; - // Each component is also a DynAny + // Each component is also a DynAny. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/tao/DynamicAny/DynStruct_i.cpp b/TAO/tao/DynamicAny/DynStruct_i.cpp index 28d974b4e52..6f08f65bc66 100644 --- a/TAO/tao/DynamicAny/DynStruct_i.cpp +++ b/TAO/tao/DynamicAny/DynStruct_i.cpp @@ -104,18 +104,27 @@ TAO_DynStruct_i::init (CORBA_TypeCode_ptr tc, ACE_CHECK; this->type_ = CORBA::TypeCode::_duplicate (tc); - this->current_index_ = 0; CORBA::ULong numfields = tc->member_count (ACE_TRY_ENV); ACE_CHECK; + this->current_index_ = numfields ? 0 : -1; + // Resize the array. this->da_members_.size (numfields); + CORBA::TypeCode_var mtype; + for (CORBA::ULong i = 0; i < numfields; i++) { - // With a typecode arg, we just create the top level. - this->da_members_[i] = 0; + mtype = tc->member_type (i, + ACE_TRY_ENV); + ACE_CHECK; + + // Recursively initialize each member. + this->da_members_[i] = TAO_DynAnyFactory::make_dyn_any (mtype.in (), + ACE_TRY_ENV); + ACE_CHECK; } } diff --git a/TAO/tao/DynamicAny/DynStruct_i.h b/TAO/tao/DynamicAny/DynStruct_i.h index ee05f694092..d9db39431ab 100644 --- a/TAO/tao/DynamicAny/DynStruct_i.h +++ b/TAO/tao/DynamicAny/DynStruct_i.h @@ -43,20 +43,20 @@ class TAO_DynamicAny_Export TAO_DynStruct_i : public virtual DynamicAny::DynStru // public: TAO_DynStruct_i (void); - // Constructor + // Constructor. ~TAO_DynStruct_i (void); - // destructor + // Destructor. void init (CORBA_TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // Initialize using just a TypeCode + // Initialize using just a TypeCode. void init (const CORBA_Any& any, CORBA::Environment &ACE_TRY_ENV); - // Initialize using an Any + // Initialize using an Any. - // = LocalObject methods + // = LocalObject methods. static TAO_DynStruct_i *_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV = @@ -64,7 +64,7 @@ public: ); virtual void *_tao_QueryInterface (ptr_arith_t type); - // = Functions specific to DynStruct + // = Functions specific to DynStruct. DynamicAny::FieldName current_member_name (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) @@ -111,554 +111,554 @@ public: DynamicAny::DynAny::InvalidValue )); - // = Functions common to all Dynamic Any types - - virtual CORBA::TypeCode_ptr type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void assign ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); - - virtual void from_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * to_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean equal ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void insert_boolean ( - CORBA::Boolean value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_octet ( - CORBA::Octet value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_char ( - CORBA::Char value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_short ( - CORBA::Short value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ushort ( - CORBA::UShort value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_long ( - CORBA::Long value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulong ( - CORBA::ULong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_float ( - CORBA::Float value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_double ( - CORBA::Double value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_string ( - const char * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_reference ( - CORBA::Object_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_typecode ( - CORBA::TypeCode_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longlong ( - CORBA::LongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulonglong ( - CORBA::ULongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longdouble ( - CORBA::LongDouble value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wchar ( - CORBA::WChar value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wstring ( - const CORBA::WChar * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_dyn_any ( - DynamicAny::DynAny_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + // = Functions common to all Dynamic Any types. + + virtual CORBA::TypeCode_ptr type ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void assign ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); + + virtual void from_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * to_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean equal ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr copy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void insert_boolean ( + CORBA::Boolean value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_octet ( + CORBA::Octet value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_char ( + CORBA::Char value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_short ( + CORBA::Short value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ushort ( + CORBA::UShort value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_long ( + CORBA::Long value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulong ( + CORBA::ULong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_float ( + CORBA::Float value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_double ( + CORBA::Double value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_string ( + const char * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_reference ( + CORBA::Object_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_typecode ( + CORBA::TypeCode_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longlong ( + CORBA::LongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulonglong ( + CORBA::ULongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longdouble ( + CORBA::LongDouble value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wchar ( + CORBA::WChar value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wstring ( + const CORBA::WChar * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_dyn_any ( + DynamicAny::DynAny_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual void insert_val ( - CORBA::ValueBase_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual void insert_val ( + CORBA::ValueBase_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean get_boolean ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Octet get_octet ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Char get_char ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Short get_short ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::UShort get_ushort ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Long get_long ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULong get_ulong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Float get_float ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Double get_double ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual char * get_string ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Object_ptr get_reference ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::TypeCode_ptr get_typecode ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongLong get_longlong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULongLong get_ulonglong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongDouble get_longdouble ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar get_wchar ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar * get_wstring ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * get_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual DynamicAny::DynAny_ptr get_dyn_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::Boolean get_boolean ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Octet get_octet ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Char get_char ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Short get_short ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::UShort get_ushort ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Long get_long ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULong get_ulong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Float get_float ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Double get_double ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual char * get_string ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Object_ptr get_reference ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::TypeCode_ptr get_typecode ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongLong get_longlong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULongLong get_ulonglong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongDouble get_longdouble ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar get_wchar ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar * get_wstring ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * get_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual DynamicAny::DynAny_ptr get_dyn_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual CORBA::ValueBase_ptr get_val ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::ValueBase_ptr get_val ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean seek ( - CORBA::Long index, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void rewind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean next ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::ULong component_count ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr current_component ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); + virtual CORBA::Boolean seek ( + CORBA::Long index, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void rewind ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean next ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::ULong component_count ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr current_component ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); private: void check_typecode (CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // Check if the typecode is acceptable + // Check if the typecode is acceptable. - // = Use copy() or assign() instead of these + // = Use copy() or assign() instead of these. TAO_DynStruct_i (const TAO_DynStruct_i &src); TAO_DynStruct_i &operator= (const TAO_DynStruct_i &src); private: CORBA::TypeCode_var type_; - // Holds the typecode of the Struct + // Holds the typecode of the Struct. CORBA::Long current_index_; - // Index of the current component + // Index of the current component. ACE_Array_Base<DynamicAny::DynAny_var> da_members_; - // Each component is also a DynAny + // Each component is also a DynAny. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/tao/DynamicAny/DynUnion_i.cpp b/TAO/tao/DynamicAny/DynUnion_i.cpp index 72ac60a9d2b..494a8782049 100644 --- a/TAO/tao/DynamicAny/DynUnion_i.cpp +++ b/TAO/tao/DynamicAny/DynUnion_i.cpp @@ -70,7 +70,7 @@ TAO_DynUnion_i::init (const CORBA_Any& any, void TAO_DynUnion_i::init (CORBA_TypeCode_ptr tc, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &ACE_TRY_ENV) { CORBA::TCKind kind = TAO_DynAnyFactory::unalias (tc, ACE_TRY_ENV); @@ -81,22 +81,28 @@ TAO_DynUnion_i::init (CORBA_TypeCode_ptr tc, ACE_THROW (DynamicAny::DynAnyFactory::InconsistentTypeCode ()); } - // Initialize the typecode holder. - this->type_ = - CORBA::TypeCode::_duplicate (tc); + // Initialize the typecode holder and current index. + this->type_ = CORBA::TypeCode::_duplicate (tc); + this->current_index_ = 0U; - CORBA::TypeCode_var disc_tc = - tc->discriminator_type (ACE_TRY_ENV); + CORBA::Any_ptr first_label = tc->member_label (this->current_index_, + ACE_TRY_ENV); ACE_CHECK; - // Get a typecode into the discriminator holder. + // Initialize the discriminator to the label value of the first member. this->discriminator_ = - TAO_DynAnyFactory::make_dyn_any (disc_tc.in (), - ACE_TRY_ENV); + TAO_DynAnyFactory::make_dyn_any (*first_label, + ACE_TRY_ENV); ACE_CHECK; - // To be filled in by from_any() or assign(). - this->member_ = 0; + CORBA::TypeCode_var first_type = tc->member_type (this->current_index_, + ACE_TRY_ENV); + ACE_CHECK; + + // Recursively initialize the member to its default value. + this->member_ = TAO_DynAnyFactory::make_dyn_any (first_type.in (), + ACE_TRY_ENV); + ACE_CHECK; } // **************************************************************** diff --git a/TAO/tao/DynamicAny/DynUnion_i.h b/TAO/tao/DynamicAny/DynUnion_i.h index d3018046d3d..5fbe7055a81 100644 --- a/TAO/tao/DynamicAny/DynUnion_i.h +++ b/TAO/tao/DynamicAny/DynUnion_i.h @@ -33,7 +33,9 @@ # pragma warning (disable:4250) #endif /* _MSC_VER */ -class TAO_DynamicAny_Export TAO_DynUnion_i : public virtual DynamicAny::DynUnion, public virtual TAO_Local_RefCounted_Object +class TAO_DynamicAny_Export TAO_DynUnion_i + : public virtual DynamicAny::DynUnion, + public virtual TAO_Local_RefCounted_Object { // = TITLE // TAO_DynUnion_i @@ -42,17 +44,18 @@ class TAO_DynamicAny_Export TAO_DynUnion_i : public virtual DynamicAny::DynUnion // Implementation of Dynamic Any type for Unions. public: TAO_DynUnion_i (void); + // Constructor. ~TAO_DynUnion_i (void); - // destructor + // Destructor. void init (const CORBA_Any& any, CORBA::Environment &ACE_TRY_ENV); - // constructor taking an Any argument + // Constructor taking an Any argument. void init (CORBA_TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV); - // constructor taking a typecode argument + // Constructor taking a typecode argument. - // = LocalObject methods + // = LocalObject methods. static TAO_DynUnion_i *_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV = @@ -60,7 +63,7 @@ public: ); virtual void *_tao_QueryInterface (ptr_arith_t type); - // = Functions specific to DynUnion + // = Functions specific to DynUnion. virtual DynamicAny::DynAny_ptr get_discriminator ( CORBA::Environment &ACE_TRY_ENV = @@ -141,539 +144,539 @@ public: DynamicAny::DynAny::InvalidValue )); - // Functions common to all Dynamic Any types - - virtual CORBA::TypeCode_ptr type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void assign ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); - - virtual void from_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * to_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean equal ( - DynamicAny::DynAny_ptr dyn_any, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void insert_boolean ( - CORBA::Boolean value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_octet ( - CORBA::Octet value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_char ( - CORBA::Char value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_short ( - CORBA::Short value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ushort ( - CORBA::UShort value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_long ( - CORBA::Long value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulong ( - CORBA::ULong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_float ( - CORBA::Float value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_double ( - CORBA::Double value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_string ( - const char * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_reference ( - CORBA::Object_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_typecode ( - CORBA::TypeCode_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longlong ( - CORBA::LongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_ulonglong ( - CORBA::ULongLong value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_longdouble ( - CORBA::LongDouble value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wchar ( - CORBA::WChar value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_wstring ( - const CORBA::WChar * value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_any ( - const CORBA::Any & value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual void insert_dyn_any ( - DynamicAny::DynAny_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + // Functions common to all Dynamic Any types. + + virtual CORBA::TypeCode_ptr type ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void assign ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); + + virtual void from_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * to_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean equal ( + DynamicAny::DynAny_ptr dyn_any, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr copy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void insert_boolean ( + CORBA::Boolean value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_octet ( + CORBA::Octet value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_char ( + CORBA::Char value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_short ( + CORBA::Short value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ushort ( + CORBA::UShort value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_long ( + CORBA::Long value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulong ( + CORBA::ULong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_float ( + CORBA::Float value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_double ( + CORBA::Double value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_string ( + const char * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_reference ( + CORBA::Object_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_typecode ( + CORBA::TypeCode_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longlong ( + CORBA::LongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_ulonglong ( + CORBA::ULongLong value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_longdouble ( + CORBA::LongDouble value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wchar ( + CORBA::WChar value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_wstring ( + const CORBA::WChar * value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_any ( + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual void insert_dyn_any ( + DynamicAny::DynAny_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual void insert_val ( - CORBA::ValueBase_ptr value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual void insert_val ( + CORBA::ValueBase_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean get_boolean ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Octet get_octet ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Char get_char ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Short get_short ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::UShort get_ushort ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Long get_long ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULong get_ulong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Float get_float ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Double get_double ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual char * get_string ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Object_ptr get_reference ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::TypeCode_ptr get_typecode ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongLong get_longlong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::ULongLong get_ulonglong ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::LongDouble get_longdouble ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar get_wchar ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::WChar * get_wstring ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual CORBA::Any * get_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); - - virtual DynamicAny::DynAny_ptr get_dyn_any ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::Boolean get_boolean ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Octet get_octet ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Char get_char ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Short get_short ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::UShort get_ushort ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Long get_long ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULong get_ulong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Float get_float ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Double get_double ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual char * get_string ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Object_ptr get_reference ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::TypeCode_ptr get_typecode ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongLong get_longlong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::ULongLong get_ulonglong ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::LongDouble get_longdouble ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar get_wchar ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::WChar * get_wstring ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual CORBA::Any * get_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); + + virtual DynamicAny::DynAny_ptr get_dyn_any ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #ifdef TAO_HAS_VALUETYPE - virtual CORBA::ValueBase_ptr get_val ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch, - DynamicAny::DynAny::InvalidValue - )); + virtual CORBA::ValueBase_ptr get_val ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch, + DynamicAny::DynAny::InvalidValue + )); #endif /* TAO_HAS_VALUETYPE */ - virtual CORBA::Boolean seek ( - CORBA::Long index, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void rewind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean next ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::ULong component_count ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual DynamicAny::DynAny_ptr current_component ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - DynamicAny::DynAny::TypeMismatch - )); + virtual CORBA::Boolean seek ( + CORBA::Long index, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void rewind ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::Boolean next ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CORBA::ULong component_count ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual DynamicAny::DynAny_ptr current_component ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + DynamicAny::DynAny::TypeMismatch + )); private: // Some specialized instantiations of template class (defined in - // DynUnion_i_T.h) + // DynUnion_i_T.h). class Boolean_extractor : public DU_Extractor_base { @@ -726,7 +729,7 @@ private: // Code common to the constructor from an Any arg and the member // function from_any(). - // Use copy() or assign() instead of these + // Use copy() or assign() instead of these. TAO_DynUnion_i (const TAO_DynUnion_i &src); TAO_DynUnion_i &operator= (const TAO_DynUnion_i &src); @@ -736,10 +739,10 @@ private: DynamicAny::DynAny_var discriminator_; CORBA::TypeCode_var type_; - // Holds the typecode of the Union + // Holds the typecode of the Union. CORBA::ULong current_index_; - // Index of the active member + // Index of the active member. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) |