summaryrefslogtreecommitdiff
path: root/TAO/tao/DynamicAny/DynStruct_i.h
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-06-12 23:07:34 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-06-12 23:07:34 +0000
commit3ecf122190c80f9045aa5ebe738ec96ebae6ee02 (patch)
tree067b01ecb47b8f9923f931c0342c613c3768fd0e /TAO/tao/DynamicAny/DynStruct_i.h
parenta8805bcdd4e71fdb0986462f885c7189b919deea (diff)
downloadATCD-3ecf122190c80f9045aa5ebe738ec96ebae6ee02.tar.gz
ChangeLogTag: Tue Jun 12 17:53:45 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/DynamicAny/DynStruct_i.h')
-rw-r--r--TAO/tao/DynamicAny/DynStruct_i.h581
1 files changed, 56 insertions, 525 deletions
diff --git a/TAO/tao/DynamicAny/DynStruct_i.h b/TAO/tao/DynamicAny/DynStruct_i.h
index d9db39431ab..3d47595f445 100644
--- a/TAO/tao/DynamicAny/DynStruct_i.h
+++ b/TAO/tao/DynamicAny/DynStruct_i.h
@@ -4,7 +4,7 @@
// ========================================================================
//
// = LIBRARY
-// TAO
+// TAO_DynamicAny
//
// = FILENAME
// DynStruct_i.h
@@ -20,12 +20,13 @@
#include "DynamicAny.h"
-#include "ace/Containers.h"
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "DynCommon.h"
+#include "ace/Containers.h"
+
#if defined (_MSC_VER)
# if (_MSC_VER >= 1200)
# pragma warning(push)
@@ -33,7 +34,10 @@
# pragma warning (disable:4250)
#endif /* _MSC_VER */
-class TAO_DynamicAny_Export TAO_DynStruct_i : public virtual DynamicAny::DynStruct, public virtual TAO_Local_RefCounted_Object
+class TAO_DynamicAny_Export TAO_DynStruct_i
+ : public virtual DynamicAny::DynStruct,
+ public virtual TAO_DynCommon,
+ public virtual TAO_Local_RefCounted_Object
{
// = TITLE
// TAO_DynStruct_i
@@ -66,571 +70,101 @@ public:
// = Functions specific to DynStruct.
- DynamicAny::FieldName current_member_name (CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ())
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
- CORBA::TCKind current_member_kind (CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ())
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
- DynamicAny::NameValuePairSeq *get_members (CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ())
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- void set_members (const DynamicAny::NameValuePairSeq& value,
- CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ())
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
- virtual DynamicAny::NameDynAnyPairSeq * get_members_as_dyn_any (
- CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ()
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- virtual void set_members_as_dyn_any (
- const DynamicAny::NameDynAnyPairSeq & 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 (
+ virtual DynamicAny::FieldName current_member_name (
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
+ CORBA::SystemException,
+ DynamicAny::DynAny::TypeMismatch,
+ DynamicAny::DynAny::InvalidValue
+ ));
- virtual void insert_boolean (
- CORBA::Boolean value,
+ virtual CORBA::TCKind current_member_kind (
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
+ CORBA::SystemException,
+ DynamicAny::DynAny::TypeMismatch,
+ DynamicAny::DynAny::InvalidValue
+ ));
- virtual void insert_octet (
- CORBA::Octet value,
+ virtual DynamicAny::NameValuePairSeq *get_members (
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
+ CORBA::SystemException
+ ));
- virtual void insert_char (
- CORBA::Char value,
+ virtual void set_members (
+ const DynamicAny::NameValuePairSeq& value,
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
+ 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,
+ virtual DynamicAny::NameDynAnyPairSeq * get_members_as_dyn_any (
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
+ CORBA::SystemException
+ ));
- virtual void insert_wchar (
- CORBA::WChar value,
+ virtual void set_members_as_dyn_any (
+ const DynamicAny::NameDynAnyPairSeq & value,
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException,
- DynamicAny::DynAny::TypeMismatch,
- DynamicAny::DynAny::InvalidValue
- ));
+ 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
- ));
+ // = DynAny common functions not implemented in class TAO_DynCommon.
- virtual void insert_any (
+ 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 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
- ));
-#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
- ));
+ 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
- ));
-#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 (
+ virtual CORBA::Any * to_any (
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
+ CORBA::SystemException
+ ));
- virtual CORBA::Boolean next (
+ virtual CORBA::Boolean equal (
+ DynamicAny::DynAny_ptr dyn_any,
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
+ CORBA::SystemException
+ ));
- virtual CORBA::ULong component_count (
+ virtual void destroy (
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
+ CORBA::SystemException
+ ));
virtual DynamicAny::DynAny_ptr current_component (
CORBA::Environment &ACE_TRY_ENV =
@@ -642,21 +176,18 @@ public:
));
private:
+ // Check if the typecode is acceptable.
void check_typecode (CORBA::TypeCode_ptr tc,
CORBA::Environment &ACE_TRY_ENV);
- // Check if the typecode is acceptable.
+
+ // Called by both versions of init().
+ void init_common (void);
// = 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.
-
- CORBA::Long current_index_;
- // Index of the current component.
-
ACE_Array_Base<DynamicAny::DynAny_var> da_members_;
// Each component is also a DynAny.
};