summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjp4 <jp4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-18 19:22:26 +0000
committerjp4 <jp4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-18 19:22:26 +0000
commitf3630bc0b737f13886ab13d7a3187431b7ecd7b0 (patch)
tree6e9ed4483f3e772b40954259e48d273041ca1268
parent6b132f041c80aadc7ec7eecb65312e889a093dea (diff)
downloadATCD-f3630bc0b737f13886ab13d7a3187431b7ecd7b0.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c11
-rw-r--r--TAO/tao/DynAny_i.h220
-rw-r--r--TAO/tao/DynArray_i.h193
-rw-r--r--TAO/tao/DynEnum_i.h197
-rw-r--r--TAO/tao/DynSequence_i.h197
-rw-r--r--TAO/tao/DynStruct_i.h194
-rw-r--r--TAO/tao/DynUnion_i.h248
-rw-r--r--TAO/tao/DynUnion_i_T.h32
8 files changed, 684 insertions, 608 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 1426d7b49bc..ace4f610585 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,14 @@
+Sun Oct 18 14:20:35 1998 Jeff Parsons <jp4@cs.wustl.edu>
+
+ * tao/DynAny_i.h:
+ * tao/DynArray_i.h:
+ * tao/DynEnum_i.h:
+ * tao/DynSequence_i.h:
+ * tao/DynStruct_i.h:
+ * tao/DynUnion_i.h:
+ * tao/DynUnion_i_T.h:
+ Edited files to conform to TAO layout style.
+
Sun Oct 18 09:32:38 1998 David L. Levine <levine@cs.wustl.edu>
* orbsvcs/tests/Event_Latency/Event_Latency.cpp (push,
diff --git a/TAO/tao/DynAny_i.h b/TAO/tao/DynAny_i.h
index 6c605b9a058..25929e6e430 100644
--- a/TAO/tao/DynAny_i.h
+++ b/TAO/tao/DynAny_i.h
@@ -20,164 +20,168 @@
class TAO_Export TAO_DynAny_i : public POA_CORBA::DynAny
{
+ // = TITLE
+ // TAO_DynAny_i
+ //
+ // = DESCRIPTION
+ // Implementation of the basic Dynamic Any datatype.
+ //
public:
- TAO_DynAny_i (CORBA_TypeCode_ptr tc);
+ TAO_DynAny_i (CORBA_TypeCode_ptr tc);
+ // constructor with TypeCode argument
+
+ TAO_DynAny_i (const CORBA_Any& any);
+ // constructor with Any argument
- TAO_DynAny_i (const CORBA_Any& any);
+ ~TAO_DynAny_i (void);
+ // destructor
- ~TAO_DynAny_i (void);
+ // Functions common to all Dynamic Any types
- // Common fuctions
+ void assign (CORBA_DynAny_ptr dyn_any,
+ CORBA::Environment &env);
+ // Sets the value of the receiver to the value of the argument
- void assign (CORBA_DynAny_ptr dyn_any,
- CORBA::Environment &env);
+ CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Creates a copy
- CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ void destroy (CORBA::Environment &env);
+ // Makes sure the contents are disposed of correctly
- void destroy (CORBA::Environment &env);
+ void from_any (const CORBA::Any& any,
+ CORBA::Environment &env);
+ // Assigns value from an Any argument
- void from_any (const CORBA::Any& any,
- CORBA::Environment &env);
+ CORBA::Any_ptr to_any (CORBA::Environment &env);
+ // Outputs contents as an Any
- CORBA::Any_ptr to_any (CORBA::Environment &env);
+ CORBA::TypeCode_ptr type (CORBA::Environment &);
+ // Returns the (constant) type
- CORBA::TypeCode_ptr type (CORBA::Environment &);
+ CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ // In this class, there is only one
- CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ CORBA::Boolean next (CORBA::Environment &);
+ // Returns next component, again here there is only one
- CORBA::Boolean next (CORBA::Environment &);
+ CORBA::Boolean seek (CORBA::Long index,
+ CORBA::Environment &);
+ // In this class, returns true only for index of 0
- CORBA::Boolean seek (CORBA::Long index,
- CORBA::Environment &);
-
- void rewind (CORBA::Environment &);
+ void rewind (CORBA::Environment &);
+ // Makes first component the current one
// Insert and get functions
- void insert_boolean (CORBA::Boolean value,
- CORBA::Environment &env);
-
- void insert_octet (CORBA::Octet value,
- CORBA::Environment &env);
-
- void insert_char (CORBA::Char value,
- CORBA::Environment &env);
-
- void insert_short (CORBA::Short value,
- CORBA::Environment &env);
-
- void insert_ushort (CORBA::UShort value,
- CORBA::Environment &env);
-
- void insert_long (CORBA::Long value,
- CORBA::Environment &env);
-
- void insert_ulong (CORBA::ULong value,
- CORBA::Environment &env);
- void insert_float (CORBA::Float value,
- CORBA::Environment &env);
-
- void insert_double (CORBA::Double value,
- CORBA::Environment &env);
-
- void insert_string (const char * value,
- CORBA::Environment &env);
-
- void insert_reference (CORBA::Object_ptr value,
- CORBA::Environment &env);
-
- void insert_typecode (CORBA::TypeCode_ptr value,
- CORBA::Environment &env);
-
- void insert_longlong (CORBA::LongLong value,
- CORBA::Environment &env);
-
- void insert_ulonglong (CORBA::ULongLong value,
- CORBA::Environment &env);
-
- void insert_wchar (CORBA::WChar value,
- CORBA::Environment &env);
-
- void insert_any (const CORBA::Any& value,
- CORBA::Environment &env);
-
- CORBA::Boolean get_boolean (CORBA::Environment &env);
+ void insert_boolean (CORBA::Boolean value,
+ CORBA::Environment &env);
+ void insert_octet (CORBA::Octet value,
+ CORBA::Environment &env);
+ void insert_char (CORBA::Char value,
+ CORBA::Environment &env);
+ void insert_short (CORBA::Short value,
+ CORBA::Environment &env);
+ void insert_ushort (CORBA::UShort value,
+ CORBA::Environment &env);
+ void insert_long (CORBA::Long value,
+ CORBA::Environment &env);
+ void insert_ulong (CORBA::ULong value,
+ CORBA::Environment &env);
+ void insert_float (CORBA::Float value,
+ CORBA::Environment &env);
+ void insert_double (CORBA::Double value,
+ CORBA::Environment &env);
+ void insert_string (const char * value,
+ CORBA::Environment &env);
+ void insert_reference (CORBA::Object_ptr value,
+ CORBA::Environment &env);
+ void insert_typecode (CORBA::TypeCode_ptr value,
+ CORBA::Environment &env);
+ void insert_longlong (CORBA::LongLong value,
+ CORBA::Environment &env);
+ void insert_ulonglong (CORBA::ULongLong value,
+ CORBA::Environment &env);
+ void insert_wchar (CORBA::WChar value,
+ CORBA::Environment &env);
+ void insert_any (const CORBA::Any& value,
+ CORBA::Environment &env);
+ CORBA::Boolean get_boolean (CORBA::Environment &env);
- CORBA::Octet get_octet (CORBA::Environment &env);
+ CORBA::Octet get_octet (CORBA::Environment &env);
- CORBA::Char get_char (CORBA::Environment &env);
+ CORBA::Char get_char (CORBA::Environment &env);
- CORBA::Short get_short (CORBA::Environment &env);
+ CORBA::Short get_short (CORBA::Environment &env);
- CORBA::UShort get_ushort (CORBA::Environment &env);
+ CORBA::UShort get_ushort (CORBA::Environment &env);
- CORBA::Long get_long (CORBA::Environment &env);
+ CORBA::Long get_long (CORBA::Environment &env);
- CORBA::ULong get_ulong (CORBA::Environment &env);
+ CORBA::ULong get_ulong (CORBA::Environment &env);
- CORBA::Float get_float (CORBA::Environment &env);
+ CORBA::Float get_float (CORBA::Environment &env);
- CORBA::Double get_double (CORBA::Environment &env);
+ CORBA::Double get_double (CORBA::Environment &env);
- char * get_string (CORBA::Environment &env);
+ char * get_string (CORBA::Environment &env);
- CORBA::Object_ptr get_reference (CORBA::Environment &env);
+ CORBA::Object_ptr get_reference (CORBA::Environment &env);
- CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
+ CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
- CORBA::LongLong get_longlong (CORBA::Environment &env);
+ CORBA::LongLong get_longlong (CORBA::Environment &env);
- CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
+ CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
- CORBA::WChar get_wchar (CORBA::Environment &env);
+ CORBA::WChar get_wchar (CORBA::Environment &env);
- CORBA::Any_ptr get_any (CORBA::Environment &env);
+ CORBA::Any_ptr get_any (CORBA::Environment &env);
-/////////////////////////////////////////////////////////////////////////////
// The ORB DynAny-factory functions will call these so we don't need to
// keep an orb pointer in each DynAny object.
- static CORBA_DynAny_ptr create_dyn_any (const CORBA_Any& any,
- CORBA::Environment& env);
+ static CORBA_DynAny_ptr create_dyn_any (const CORBA_Any& any,
+ CORBA::Environment& env);
- static CORBA_DynAny_ptr create_basic_dyn_any (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA_DynAny_ptr create_basic_dyn_any (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
- static CORBA_DynStruct_ptr create_dyn_struct (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA_DynStruct_ptr create_dyn_struct (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
- static CORBA_DynSequence_ptr create_dyn_sequence (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA_DynSequence_ptr create_dyn_sequence (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
- static CORBA_DynArray_ptr create_dyn_array (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA_DynArray_ptr create_dyn_array (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
- static CORBA_DynUnion_ptr create_dyn_union (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA_DynUnion_ptr create_dyn_union (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
- static CORBA_DynEnum_ptr create_dyn_enum (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA_DynEnum_ptr create_dyn_enum (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
- // An extra generic one that calls one of the above passing a typecode.
+ // And an extra generic one (not required in the spec)
+ // that calls one of the above passing a typecode.
// Comes in handy in implementing some versions of current_component().
- static CORBA_DynAny_ptr create_dyn_any (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA_DynAny_ptr create_dyn_any (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
-////////////////////////////////////////////////////////////////////////////
- // In case we have tk_alias.
- static CORBA::TCKind unalias (CORBA_TypeCode_ptr tc,
- CORBA::Environment& env);
+ static CORBA::TCKind unalias (CORBA_TypeCode_ptr tc,
+ CORBA::Environment& env);
+ // Utility, in case we have tk_alias.
private:
- CORBA_Any value_;
+ CORBA_Any value_;
+ // contents
+ TAO_DynAny_i (void);
// Must be instantiated with at least a typecode
- TAO_DynAny_i (void);
- // Use copy() or assign()
- TAO_DynAny_i (const TAO_DynAny_i &src);
- TAO_DynAny_i & operator= (const TAO_DynAny_i &src);
+ // Use copy() or assign() instead of these
+ TAO_DynAny_i (const TAO_DynAny_i &src);
+ TAO_DynAny_i &operator= (const TAO_DynAny_i &src);
};
#endif /* TAO_DYNANY_I_H */
diff --git a/TAO/tao/DynArray_i.h b/TAO/tao/DynArray_i.h
index 15e8ceb1305..7b0e124e7e0 100644
--- a/TAO/tao/DynArray_i.h
+++ b/TAO/tao/DynArray_i.h
@@ -21,144 +21,155 @@
class TAO_Export TAO_DynArray_i : public POA_CORBA::DynArray
{
+ // = TITLE
+ // TAO_DynArray_i
+ //
+ // = DESCRIPTION
+ // Implementation of Dynamic Any type for arrays
+ //
public:
TAO_DynArray_i (const CORBA_Any& any);
- TAO_DynArray_i (CORBA_TypeCode_ptr tc);
- ~TAO_DynArray_i (void);
+ // constructor taking an Any argument
- // = Functions specific to DynArray
+ TAO_DynArray_i (CORBA_TypeCode_ptr tc);
+ // constructor taking a typecode argument
- AnySeq_ptr get_elements (CORBA::Environment& env);
+ ~TAO_DynArray_i (void);
+ // destructor
- void set_elements (const AnySeq& value,
- CORBA::Environment& env);
- // = Common functions
+ // Functions specific to DynArray
- void assign (CORBA_DynAny_ptr dyn_any,
- CORBA::Environment &env);
+ // Assign/dump elements using IDL defined type AnySeq
- CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ AnySeq_ptr get_elements (CORBA::Environment& env);
- void destroy (CORBA::Environment &env);
+ void set_elements (const AnySeq& value,
+ CORBA::Environment& env);
- void from_any (const CORBA::Any& any,
- CORBA::Environment &env);
+ // Functions common to all Dynamic Any types
- CORBA::Any_ptr to_any (CORBA::Environment &env);
+ void assign (CORBA_DynAny_ptr dyn_any,
+ CORBA::Environment &env);
+ // Sets the value of the receiver to the value of the argument
- CORBA::TypeCode_ptr type (CORBA::Environment &);
+ CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Creates a copy
- CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ void destroy (CORBA::Environment &env);
+ // Makes sure the contents are disposed of correctly
- CORBA::Boolean next (CORBA::Environment &);
+ void from_any (const CORBA::Any& any,
+ CORBA::Environment &env);
+ // Assigns value from an Any argument
- CORBA::Boolean seek (CORBA::Long index,
- CORBA::Environment &);
+ CORBA::Any_ptr to_any (CORBA::Environment &env);
+ // Outputs contents as an Any
- void rewind (CORBA::Environment &);
+ CORBA::TypeCode_ptr type (CORBA::Environment &);
+ // Returns the (constant) type
- // The insert and get functions.
+ CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ // Used in iterating through the contents
- void insert_boolean (CORBA::Boolean value,
- CORBA::Environment &env);
+ CORBA::Boolean next (CORBA::Environment &);
+ // Returns next component
- void insert_octet (CORBA::Octet value,
- CORBA::Environment &env);
+ CORBA::Boolean seek (CORBA::Long index,
+ CORBA::Environment &);
+ // Jump to component at <index>
- void insert_char (CORBA::Char value,
- CORBA::Environment &env);
+ void rewind (CORBA::Environment &);
+ // Makes first component the current one
- void insert_short (CORBA::Short value,
- CORBA::Environment &env);
+ // Insert and get functions
- void insert_ushort (CORBA::UShort value,
- CORBA::Environment &env);
+ void insert_boolean (CORBA::Boolean value,
+ CORBA::Environment &env);
+ void insert_octet (CORBA::Octet value,
+ CORBA::Environment &env);
+ void insert_char (CORBA::Char value,
+ CORBA::Environment &env);
+ void insert_short (CORBA::Short value,
+ CORBA::Environment &env);
+ void insert_ushort (CORBA::UShort value,
+ CORBA::Environment &env);
+ void insert_long (CORBA::Long value,
+ CORBA::Environment &env);
+ void insert_ulong (CORBA::ULong value,
+ CORBA::Environment &env);
+ void insert_float (CORBA::Float value,
+ CORBA::Environment &env);
+ void insert_double (CORBA::Double value,
+ CORBA::Environment &env);
+ void insert_string (const char * value,
+ CORBA::Environment &env);
+ void insert_reference (CORBA::Object_ptr value,
+ CORBA::Environment &env);
+ void insert_typecode (CORBA::TypeCode_ptr value,
+ CORBA::Environment &env);
+ void insert_longlong (CORBA::LongLong value,
+ CORBA::Environment &env);
+ void insert_ulonglong (CORBA::ULongLong value,
+ CORBA::Environment &env);
+ void insert_wchar (CORBA::WChar value,
+ CORBA::Environment &env);
+ void insert_any (const CORBA::Any& value,
+ CORBA::Environment &env);
+ CORBA::Boolean get_boolean (CORBA::Environment &env);
- void insert_long (CORBA::Long value,
- CORBA::Environment &env);
+ CORBA::Octet get_octet (CORBA::Environment &env);
- void insert_ulong (CORBA::ULong value,
- CORBA::Environment &env);
+ CORBA::Char get_char (CORBA::Environment &env);
- void insert_float (CORBA::Float value,
- CORBA::Environment &env);
+ CORBA::Short get_short (CORBA::Environment &env);
- void insert_double (CORBA::Double value,
- CORBA::Environment &env);
+ CORBA::UShort get_ushort (CORBA::Environment &env);
- void insert_string (const char * value,
- CORBA::Environment &env);
+ CORBA::Long get_long (CORBA::Environment &env);
- void insert_reference (CORBA::Object_ptr value,
- CORBA::Environment &env);
+ CORBA::ULong get_ulong (CORBA::Environment &env);
- void insert_typecode (CORBA::TypeCode_ptr value,
- CORBA::Environment &env);
+ CORBA::Float get_float (CORBA::Environment &env);
- void insert_longlong (CORBA::LongLong value,
- CORBA::Environment &env);
+ CORBA::Double get_double (CORBA::Environment &env);
- void insert_ulonglong (CORBA::ULongLong value,
- CORBA::Environment &env);
+ char * get_string (CORBA::Environment &env);
- void insert_wchar (CORBA::WChar value,
- CORBA::Environment &env);
+ CORBA::Object_ptr get_reference (CORBA::Environment &env);
- void insert_any (const CORBA::Any& value,
- CORBA::Environment &env);
+ CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
- CORBA::Boolean get_boolean (CORBA::Environment &env);
+ CORBA::LongLong get_longlong (CORBA::Environment &env);
- CORBA::Octet get_octet (CORBA::Environment &env);
+ CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
- CORBA::Char get_char (CORBA::Environment &env);
+ CORBA::WChar get_wchar (CORBA::Environment &env);
- CORBA::Short get_short (CORBA::Environment &env);
-
- CORBA::UShort get_ushort (CORBA::Environment &env);
-
- CORBA::Long get_long (CORBA::Environment &env);
-
- CORBA::ULong get_ulong (CORBA::Environment &env);
-
- CORBA::Float get_float (CORBA::Environment &env);
-
- CORBA::Double get_double (CORBA::Environment &env);
-
- char * get_string (CORBA::Environment &env);
-
- CORBA::Object_ptr get_reference (CORBA::Environment &env);
-
- CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
-
- CORBA::LongLong get_longlong (CORBA::Environment &env);
-
- CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
-
- CORBA::WChar get_wchar (CORBA::Environment &env);
-
- CORBA::Any_ptr get_any (CORBA::Environment &env);
+ CORBA::Any_ptr get_any (CORBA::Environment &env);
private:
+ CORBA::TypeCode_ptr get_element_type (CORBA::Environment &env);
// Returns the type of elements contained in the array.
- CORBA::TypeCode_ptr get_element_type (CORBA::Environment &env);
+ CORBA::ULong get_arg_length (CORBA::TypeCode_ptr tc,
+ CORBA::Environment &env);
// Gets the length of the array from the typecode
- CORBA::ULong get_arg_length (CORBA::TypeCode_ptr tc,
- CORBA::Environment &env);
- CORBA::TypeCode_var type_;
+ CORBA::TypeCode_var type_;
+ // Holds the typecode of the array
- CORBA::Long index_;
+ CORBA::Long index_;
+ // Index of the current component
- ACE_Array<CORBA_DynAny_var> da_members_;
+ ACE_Array<CORBA_DynAny_var> da_members_;
+ // Each component is also a DynAny
+ TAO_DynArray_i (void);
// Must be instantiated with at least a typecode
- TAO_DynArray_i (void);
- // Use copy() or assign()
- TAO_DynArray_i (const TAO_DynArray_i &src);
- TAO_DynArray_i & operator= (const TAO_DynArray_i &src);
+ // Use copy() or assign() instead of these
+ TAO_DynArray_i (const TAO_DynArray_i &src);
+ TAO_DynArray_i &operator= (const TAO_DynArray_i &src);
};
#endif /* TAO_DYNARRAY_I_H */
diff --git a/TAO/tao/DynEnum_i.h b/TAO/tao/DynEnum_i.h
index ef435a86f69..8f65b184d15 100644
--- a/TAO/tao/DynEnum_i.h
+++ b/TAO/tao/DynEnum_i.h
@@ -21,145 +21,152 @@
class TAO_Export TAO_DynEnum_i : public POA_CORBA::DynEnum
{
+ // = TITLE
+ // TAO_DynEnum_i
+ //
+ // = DESCRIPTION
+ // Implementation of Dynamic Any type for enums
+ //
public:
- TAO_DynEnum_i (const CORBA_Any& any);
+ TAO_DynEnum_i (const CORBA_Any& any);
+ // constructor taking an Any argument
- TAO_DynEnum_i (CORBA_TypeCode_ptr tc);
+ TAO_DynEnum_i (CORBA_TypeCode_ptr tc);
+ // constructor taking a typecode argument
- ~TAO_DynEnum_i (void);
+ ~TAO_DynEnum_i (void);
+ // destructor
// Functions specific to DynEnum
+ // Get and set methods for enum's string and numeric value
- char* value_as_string (CORBA::Environment& env);
+ char* value_as_string (CORBA::Environment& env);
- void value_as_string (const char* value_as_string,
- CORBA::Environment& env);
+ void value_as_string (const char* value_as_string,
+ CORBA::Environment& env);
- CORBA::ULong value_as_ulong (CORBA::Environment&);
+ CORBA::ULong value_as_ulong (CORBA::Environment&);
- void value_as_ulong (CORBA::ULong value_as_ulong,
- CORBA::Environment& env);
+ void value_as_ulong (CORBA::ULong value_as_ulong,
+ CORBA::Environment& env);
- // Common functions
+ // Functions common to all Dynamic Any types
- void assign (CORBA_DynAny_ptr dyn_any,
- CORBA::Environment &env);
+ void assign (CORBA_DynAny_ptr dyn_any,
+ CORBA::Environment &env);
+ // Sets the value of the receiver to the value of the argument
- CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Creates a copy
- void destroy (CORBA::Environment &env);
+ void destroy (CORBA::Environment &env);
+ // Makes sure the contents are disposed of correctly
- void from_any (const CORBA::Any& any,
- CORBA::Environment &env);
+ void from_any (const CORBA::Any& any,
+ CORBA::Environment &env);
+ // Assigns value from an Any argument
- CORBA::Any_ptr to_any (CORBA::Environment &env);
+ CORBA::Any_ptr to_any (CORBA::Environment &env);
+ // Outputs contents as an Any
- CORBA::TypeCode_ptr type (CORBA::Environment &);
+ CORBA::TypeCode_ptr type (CORBA::Environment &);
+ // Returns the (constant) type
- CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ // Used in iterating through the contents
- CORBA::Boolean next (CORBA::Environment &);
+ CORBA::Boolean next (CORBA::Environment &);
+ // Returns next component
- CORBA::Boolean seek (CORBA::Long index,
- CORBA::Environment &);
+ CORBA::Boolean seek (CORBA::Long index,
+ CORBA::Environment &);
+ // Jump to component at <index>
- void rewind (CORBA::Environment &);
+ void rewind (CORBA::Environment &);
+ // Makes first component the current one
- // The insert and get functions.
- // In DynEnum, these should never be called, so all they'll do is
- // throw a wrist-slapping exception.
+ // Insert and get functions
- void insert_boolean (CORBA::Boolean value,
- CORBA::Environment &env);
+ // In DynEnum, these have no pertinence, so since spec requires
+ // their presence, they will just throw an exception
- void insert_octet (CORBA::Octet value,
- CORBA::Environment &env);
+ void insert_boolean (CORBA::Boolean value,
+ CORBA::Environment &env);
+ void insert_octet (CORBA::Octet value,
+ CORBA::Environment &env);
+ void insert_char (CORBA::Char value,
+ CORBA::Environment &env);
+ void insert_short (CORBA::Short value,
+ CORBA::Environment &env);
+ void insert_ushort (CORBA::UShort value,
+ CORBA::Environment &env);
+ void insert_long (CORBA::Long value,
+ CORBA::Environment &env);
+ void insert_ulong (CORBA::ULong value,
+ CORBA::Environment &env);
+ void insert_float (CORBA::Float value,
+ CORBA::Environment &env);
+ void insert_double (CORBA::Double value,
+ CORBA::Environment &env);
+ void insert_string (const char * value,
+ CORBA::Environment &env);
+ void insert_reference (CORBA::Object_ptr value,
+ CORBA::Environment &env);
+ void insert_typecode (CORBA::TypeCode_ptr value,
+ CORBA::Environment &env);
+ void insert_longlong (CORBA::LongLong value,
+ CORBA::Environment &env);
+ void insert_ulonglong (CORBA::ULongLong value,
+ CORBA::Environment &env);
+ void insert_wchar (CORBA::WChar value,
+ CORBA::Environment &env);
+ void insert_any (const CORBA::Any& value,
+ CORBA::Environment &env);
+ CORBA::Boolean get_boolean (CORBA::Environment &env);
- void insert_char (CORBA::Char value,
- CORBA::Environment &env);
+ CORBA::Octet get_octet (CORBA::Environment &env);
- void insert_short (CORBA::Short value,
- CORBA::Environment &env);
+ CORBA::Char get_char (CORBA::Environment &env);
- void insert_ushort (CORBA::UShort value,
- CORBA::Environment &env);
+ CORBA::Short get_short (CORBA::Environment &env);
- void insert_long (CORBA::Long value,
- CORBA::Environment &env);
+ CORBA::UShort get_ushort (CORBA::Environment &env);
- void insert_ulong (CORBA::ULong value,
- CORBA::Environment &env);
+ CORBA::Long get_long (CORBA::Environment &env);
- void insert_float (CORBA::Float value,
- CORBA::Environment &env);
+ CORBA::ULong get_ulong (CORBA::Environment &env);
- void insert_double (CORBA::Double value,
- CORBA::Environment &env);
+ CORBA::Float get_float (CORBA::Environment &env);
- void insert_string (const char * value,
- CORBA::Environment &env);
+ CORBA::Double get_double (CORBA::Environment &env);
- void insert_reference (CORBA::Object_ptr value,
- CORBA::Environment &env);
+ char * get_string (CORBA::Environment &env);
- void insert_typecode (CORBA::TypeCode_ptr value,
- CORBA::Environment &env);
+ CORBA::Object_ptr get_reference (CORBA::Environment &env);
- void insert_longlong (CORBA::LongLong value,
- CORBA::Environment &env);
+ CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
- void insert_ulonglong (CORBA::ULongLong value,
- CORBA::Environment &env);
+ CORBA::LongLong get_longlong (CORBA::Environment &env);
- void insert_wchar (CORBA::WChar value,
- CORBA::Environment &env);
+ CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
- void insert_any (const CORBA::Any& value,
- CORBA::Environment &env);
+ CORBA::WChar get_wchar (CORBA::Environment &env);
- CORBA::Boolean get_boolean (CORBA::Environment &env);
-
- CORBA::Octet get_octet (CORBA::Environment &env);
-
- CORBA::Char get_char (CORBA::Environment &env);
-
- CORBA::Short get_short (CORBA::Environment &env);
-
- CORBA::UShort get_ushort (CORBA::Environment &env);
-
- CORBA::Long get_long (CORBA::Environment &env);
-
- CORBA::ULong get_ulong (CORBA::Environment &env);
-
- CORBA::Float get_float (CORBA::Environment &env);
-
- CORBA::Double get_double (CORBA::Environment &env);
-
- char * get_string (CORBA::Environment &env);
-
- CORBA::Object_ptr get_reference (CORBA::Environment &env);
-
- CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
-
- CORBA::LongLong get_longlong (CORBA::Environment &env);
-
- CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
-
- CORBA::WChar get_wchar (CORBA::Environment &env);
-
- CORBA::Any_ptr get_any (CORBA::Environment &env);
+ CORBA::Any_ptr get_any (CORBA::Environment &env);
private:
- CORBA::TypeCode_var type_;
+ CORBA::TypeCode_var type_;
+ // Holds the typecode of the enum
- CORBA::ULong value_;
+ CORBA::ULong value_;
+ // Current numeric value of the enum
+ TAO_DynEnum_i (void);
// Must be instantiated with at least a typecode
- TAO_DynEnum_i (void);
- // Use copy() or assign()
- TAO_DynEnum_i (const TAO_DynEnum_i &src);
- TAO_DynEnum_i & operator= (const TAO_DynEnum_i &src);
+ // Use copy() or assign() instead of these
+ TAO_DynEnum_i (const TAO_DynEnum_i &src);
+ TAO_DynEnum_i &operator= (const TAO_DynEnum_i &src);
};
#endif /* TAO_DYNENUM_I_H */
diff --git a/TAO/tao/DynSequence_i.h b/TAO/tao/DynSequence_i.h
index d8958ffe97f..a65bd5c240b 100644
--- a/TAO/tao/DynSequence_i.h
+++ b/TAO/tao/DynSequence_i.h
@@ -21,147 +21,158 @@
class TAO_Export TAO_DynSequence_i : public POA_CORBA::DynSequence
{
+ // = TITLE
+ // TAO_DynSequence_i
+ //
+ // = DESCRIPTION
+ // Implementation of Dynamic Any type for Sequences
+ //
public:
- TAO_DynSequence_i (const CORBA_Any& any);
+ TAO_DynSequence_i (const CORBA_Any& any);
+ // constructor taking an Any argument
- TAO_DynSequence_i (CORBA_TypeCode_ptr tc);
+ TAO_DynSequence_i (CORBA_TypeCode_ptr tc);
+ // constructor taking a typecode argument
- ~TAO_DynSequence_i (void);
+ ~TAO_DynSequence_i (void);
+ // destructor
// Functions specific to DynSequence
- CORBA::ULong length (CORBA::Environment &);
+ // Get and set length of sequence
- void length (CORBA::ULong length,
- CORBA::Environment& env);
+ CORBA::ULong length (CORBA::Environment &);
- AnySeq_ptr get_elements (CORBA::Environment& env);
+ void length (CORBA::ULong length,
+ CORBA::Environment& env);
- void set_elements (const AnySeq& value,
- CORBA::Environment& env);
+ // Assign and dump elements using IDL defined type AnySeq
- // Common functions
+ AnySeq_ptr get_elements (CORBA::Environment& env);
- void assign (CORBA_DynAny_ptr dyn_any,
- CORBA::Environment &env);
+ void set_elements (const AnySeq& value,
+ CORBA::Environment& env);
- CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Functions common to all Dynamic Any types
- void destroy (CORBA::Environment &env);
+ void assign (CORBA_DynAny_ptr dyn_any,
+ CORBA::Environment &env);
+ // Sets the value of the receiver to the value of the argument
- void from_any (const CORBA::Any& any,
- CORBA::Environment &env);
+ CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Creates a copy
- CORBA::Any_ptr to_any (CORBA::Environment &env);
+ void destroy (CORBA::Environment &env);
+ // Makes sure the contents are disposed of correctly
- CORBA::TypeCode_ptr type (CORBA::Environment &);
- CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ void from_any (const CORBA::Any& any,
+ CORBA::Environment &env);
+ // Assigns value from an Any argument
- CORBA::Boolean next (CORBA::Environment &);
+ CORBA::Any_ptr to_any (CORBA::Environment &env);
+ // Outputs contents as an Any
- CORBA::Boolean seek (CORBA::Long index,
- CORBA::Environment &);
+ CORBA::TypeCode_ptr type (CORBA::Environment &);
+ // Returns the (constant) type
- void rewind (CORBA::Environment &);
+ CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ // Used in iterating through the contents
- // The insert and get functions
+ CORBA::Boolean next (CORBA::Environment &);
+ // Returns next component
- void insert_boolean (CORBA::Boolean value,
- CORBA::Environment &env);
+ CORBA::Boolean seek (CORBA::Long index,
+ CORBA::Environment &);
+ // Jump to component at <index>
- void insert_octet (CORBA::Octet value,
- CORBA::Environment &env);
+ void rewind (CORBA::Environment &);
+ // Makes first component the current one
- void insert_char (CORBA::Char value,
- CORBA::Environment &env);
+ // Insert and get functions
- void insert_short (CORBA::Short value,
- CORBA::Environment &env);
+ void insert_boolean (CORBA::Boolean value,
+ CORBA::Environment &env);
+ void insert_octet (CORBA::Octet value,
+ CORBA::Environment &env);
+ void insert_char (CORBA::Char value,
+ CORBA::Environment &env);
+ void insert_short (CORBA::Short value,
+ CORBA::Environment &env);
+ void insert_ushort (CORBA::UShort value,
+ CORBA::Environment &env);
+ void insert_long (CORBA::Long value,
+ CORBA::Environment &env);
+ void insert_ulong (CORBA::ULong value,
+ CORBA::Environment &env);
+ void insert_float (CORBA::Float value,
+ CORBA::Environment &env);
+ void insert_double (CORBA::Double value,
+ CORBA::Environment &env);
+ void insert_string (const char * value,
+ CORBA::Environment &env);
+ void insert_reference (CORBA::Object_ptr value,
+ CORBA::Environment &env);
+ void insert_typecode (CORBA::TypeCode_ptr value,
+ CORBA::Environment &env);
+ void insert_longlong (CORBA::LongLong value,
+ CORBA::Environment &env);
+ void insert_ulonglong (CORBA::ULongLong value,
+ CORBA::Environment &env);
+ void insert_wchar (CORBA::WChar value,
+ CORBA::Environment &env);
+ void insert_any (const CORBA::Any& value,
+ CORBA::Environment &env);
+ CORBA::Boolean get_boolean (CORBA::Environment &env);
- void insert_ushort (CORBA::UShort value,
- CORBA::Environment &env);
+ CORBA::Octet get_octet (CORBA::Environment &env);
- void insert_long (CORBA::Long value,
- CORBA::Environment &env);
+ CORBA::Char get_char (CORBA::Environment &env);
- void insert_ulong (CORBA::ULong value,
- CORBA::Environment &env);
+ CORBA::Short get_short (CORBA::Environment &env);
- void insert_float (CORBA::Float value,
- CORBA::Environment &env);
+ CORBA::UShort get_ushort (CORBA::Environment &env);
- void insert_double (CORBA::Double value,
- CORBA::Environment &env);
+ CORBA::Long get_long (CORBA::Environment &env);
- void insert_string (const char * value,
- CORBA::Environment &env);
+ CORBA::ULong get_ulong (CORBA::Environment &env);
- void insert_reference (CORBA::Object_ptr value,
- CORBA::Environment &env);
+ CORBA::Float get_float (CORBA::Environment &env);
- void insert_typecode (CORBA::TypeCode_ptr value,
- CORBA::Environment &env);
+ CORBA::Double get_double (CORBA::Environment &env);
- void insert_longlong (CORBA::LongLong value,
- CORBA::Environment &env);
+ char * get_string (CORBA::Environment &env);
- void insert_ulonglong (CORBA::ULongLong value,
- CORBA::Environment &env);
+ CORBA::Object_ptr get_reference (CORBA::Environment &env);
- void insert_wchar (CORBA::WChar value,
- CORBA::Environment &env);
+ CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
- void insert_any (const CORBA::Any& value,
- CORBA::Environment &env);
+ CORBA::LongLong get_longlong (CORBA::Environment &env);
- CORBA::Boolean get_boolean (CORBA::Environment &env);
+ CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
- CORBA::Octet get_octet (CORBA::Environment &env);
+ CORBA::WChar get_wchar (CORBA::Environment &env);
- CORBA::Char get_char (CORBA::Environment &env);
-
- CORBA::Short get_short (CORBA::Environment &env);
-
- CORBA::UShort get_ushort (CORBA::Environment &env);
-
- CORBA::Long get_long (CORBA::Environment &env);
-
- CORBA::ULong get_ulong (CORBA::Environment &env);
-
- CORBA::Float get_float (CORBA::Environment &env);
-
- CORBA::Double get_double (CORBA::Environment &env);
-
- char * get_string (CORBA::Environment &env);
-
- CORBA::Object_ptr get_reference (CORBA::Environment &env);
-
- CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
-
- CORBA::LongLong get_longlong (CORBA::Environment &env);
-
- CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
-
- CORBA::WChar get_wchar (CORBA::Environment &env);
-
- CORBA::Any_ptr get_any (CORBA::Environment &env);
+ CORBA::Any_ptr get_any (CORBA::Environment &env);
private:
- // Returns the type of elements contained in the sequence.
- CORBA::TypeCode_ptr get_element_type (CORBA::Environment& env);
+ CORBA::TypeCode_ptr get_element_type (CORBA::Environment& env);
+ // Utility, turns the type of elements contained in the sequence.
- CORBA::TypeCode_var type_;
+ CORBA::TypeCode_var type_;
+ // Holds the typecode of the Sequence
- CORBA::Long index_;
+ CORBA::Long index_;
+ // Index of the current component
ACE_Array<CORBA_DynAny_var> da_members_;
+ // Each component is also a DynAny
+ TAO_DynSequence_i (void);
// Must be instantiated with at least a typecode
- TAO_DynSequence_i (void);
- // Use copy() or assign()
- TAO_DynSequence_i (const TAO_DynSequence_i &src);
- TAO_DynSequence_i & operator= (const TAO_DynSequence_i &src);
+ // Use copy() or assign() instead of these
+ TAO_DynSequence_i (const TAO_DynSequence_i &src);
+ TAO_DynSequence_i &operator= (const TAO_DynSequence_i &src);
};
#endif /* TAO_DYNSEQUENCE_I_H */
diff --git a/TAO/tao/DynStruct_i.h b/TAO/tao/DynStruct_i.h
index 07140668c3d..7764e8c36bb 100644
--- a/TAO/tao/DynStruct_i.h
+++ b/TAO/tao/DynStruct_i.h
@@ -21,143 +21,153 @@
class TAO_Export TAO_DynStruct_i : public POA_CORBA::DynStruct
{
+ // = TITLE
+ // TAO_DynStruct_i
+ //
+ // = DESCRIPTION
+ // Implementation of Dynamic Any type for Structs
+ //
public:
- TAO_DynStruct_i (const CORBA_Any& any);
+ TAO_DynStruct_i (const CORBA_Any& any);
+ // constructor taking an Any argument
- TAO_DynStruct_i (CORBA_TypeCode_ptr tc);
+ TAO_DynStruct_i (CORBA_TypeCode_ptr tc);
+ // constructor taking a typecode argument
- ~TAO_DynStruct_i (void);
+ ~TAO_DynStruct_i (void);
+ // destructor
// Functions specific to DynStruct
- FieldName current_member_name (CORBA::Environment& env);
+ FieldName current_member_name (CORBA::Environment& env);
+ // FieldName is IDL typedef for string
- CORBA::TCKind current_member_kind (CORBA::Environment& env);
- NameValuePairSeq* get_members (CORBA::Environment& env);
+ CORBA::TCKind current_member_kind (CORBA::Environment& env);
- void set_members (const NameValuePairSeq& value,
- CORBA::Environment& env);
+ // Assign and dump elements using IDL defined type NameValuePairSeq
- // Common functions
+ NameValuePairSeq* get_members (CORBA::Environment& env);
- void assign (CORBA_DynAny_ptr dyn_any,
- CORBA::Environment &env);
+ void set_members (const NameValuePairSeq& value,
+ CORBA::Environment& env);
- CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Functions common to all Dynamic Any types
- void destroy (CORBA::Environment &env);
- void from_any (const CORBA::Any& any,
+ void assign (CORBA_DynAny_ptr dyn_any,
+ CORBA::Environment &env);
+ // Sets the value of the receiver to the value of the argument
- CORBA::Environment &env);
+ CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Creates a copy
- CORBA::Any_ptr to_any (CORBA::Environment &env);
+ void destroy (CORBA::Environment &env);
+ // Makes sure the contents are disposed of correctly
- CORBA::TypeCode_ptr type (CORBA::Environment &);
+ void from_any (const CORBA::Any& any,
+ CORBA::Environment &env);
+ // Assigns value from an Any argument
- CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ CORBA::Any_ptr to_any (CORBA::Environment &env);
+ // Outputs contents as an Any
- CORBA::Boolean next (CORBA::Environment &);
+ CORBA::TypeCode_ptr type (CORBA::Environment &);
+ // Returns the (constant) type
- CORBA::Boolean seek (CORBA::Long index,
- CORBA::Environment &);
+ CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ // Used in iterating through the contents
- void rewind (CORBA::Environment &);
+ CORBA::Boolean next (CORBA::Environment &);
+ // Returns next component
- // The insert and get functions.
+ CORBA::Boolean seek (CORBA::Long index,
+ CORBA::Environment &);
+ // Jump to component at <index>
- void insert_boolean (CORBA::Boolean value,
- CORBA::Environment &env);
+ void rewind (CORBA::Environment &);
+ // Makes first component the current one
- void insert_octet (CORBA::Octet value,
- CORBA::Environment &env);
+ // Insert and get functions
- void insert_char (CORBA::Char value,
- CORBA::Environment &env);
+ void insert_boolean (CORBA::Boolean value,
+ CORBA::Environment &env);
+ void insert_octet (CORBA::Octet value,
+ CORBA::Environment &env);
+ void insert_char (CORBA::Char value,
+ CORBA::Environment &env);
+ void insert_short (CORBA::Short value,
+ CORBA::Environment &env);
+ void insert_ushort (CORBA::UShort value,
+ CORBA::Environment &env);
+ void insert_long (CORBA::Long value,
+ CORBA::Environment &env);
+ void insert_ulong (CORBA::ULong value,
+ CORBA::Environment &env);
+ void insert_float (CORBA::Float value,
+ CORBA::Environment &env);
+ void insert_double (CORBA::Double value,
+ CORBA::Environment &env);
+ void insert_string (const char * value,
+ CORBA::Environment &env);
+ void insert_reference (CORBA::Object_ptr value,
+ CORBA::Environment &env);
+ void insert_typecode (CORBA::TypeCode_ptr value,
+ CORBA::Environment &env);
+ void insert_longlong (CORBA::LongLong value,
+ CORBA::Environment &env);
+ void insert_ulonglong (CORBA::ULongLong value,
+ CORBA::Environment &env);
+ void insert_wchar (CORBA::WChar value,
+ CORBA::Environment &env);
+ void insert_any (const CORBA::Any& value,
+ CORBA::Environment &env);
+ CORBA::Boolean get_boolean (CORBA::Environment &env);
- void insert_short (CORBA::Short value,
- CORBA::Environment &env);
+ CORBA::Octet get_octet (CORBA::Environment &env);
- void insert_ushort (CORBA::UShort value,
- CORBA::Environment &env);
+ CORBA::Char get_char (CORBA::Environment &env);
- void insert_long (CORBA::Long value,
- CORBA::Environment &env);
+ CORBA::Short get_short (CORBA::Environment &env);
- void insert_ulong (CORBA::ULong value,
- CORBA::Environment &env);
+ CORBA::UShort get_ushort (CORBA::Environment &env);
- void insert_float (CORBA::Float value,
- CORBA::Environment &env);
+ CORBA::Long get_long (CORBA::Environment &env);
- void insert_double (CORBA::Double value,
- CORBA::Environment &env);
+ CORBA::ULong get_ulong (CORBA::Environment &env);
- void insert_string (const char * value,
- CORBA::Environment &env);
+ CORBA::Float get_float (CORBA::Environment &env);
- void insert_reference (CORBA::Object_ptr value,
- CORBA::Environment &env);
+ CORBA::Double get_double (CORBA::Environment &env);
- void insert_typecode (CORBA::TypeCode_ptr value,
- CORBA::Environment &env);
+ char * get_string (CORBA::Environment &env);
- void insert_longlong (CORBA::LongLong value,
- CORBA::Environment &env);
+ CORBA::Object_ptr get_reference (CORBA::Environment &env);
- void insert_ulonglong (CORBA::ULongLong value,
- CORBA::Environment &env);
+ CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
- void insert_wchar (CORBA::WChar value,
- CORBA::Environment &env);
+ CORBA::LongLong get_longlong (CORBA::Environment &env);
- void insert_any (const CORBA::Any& value,
- CORBA::Environment &env);
+ CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
- CORBA::Boolean get_boolean (CORBA::Environment &env);
+ CORBA::WChar get_wchar (CORBA::Environment &env);
- CORBA::Octet get_octet (CORBA::Environment &env);
-
- CORBA::Char get_char (CORBA::Environment &env);
-
- CORBA::Short get_short (CORBA::Environment &env);
-
- CORBA::UShort get_ushort (CORBA::Environment &env);
-
- CORBA::Long get_long (CORBA::Environment &env);
-
- CORBA::ULong get_ulong (CORBA::Environment &env);
-
- CORBA::Float get_float (CORBA::Environment &env);
-
- CORBA::Double get_double (CORBA::Environment &env);
-
- char * get_string (CORBA::Environment &env);
-
- CORBA::Object_ptr get_reference (CORBA::Environment &env);
-
- CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
-
- CORBA::LongLong get_longlong (CORBA::Environment &env);
-
- CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
-
- CORBA::WChar get_wchar (CORBA::Environment &env);
-
- CORBA::Any_ptr get_any (CORBA::Environment &env);
+ CORBA::Any_ptr get_any (CORBA::Environment &env);
private:
- CORBA::TypeCode_var type_;
+ CORBA::TypeCode_var type_;
+ // Holds the typecode of the Struct
- CORBA::Long index_;
+ CORBA::Long index_;
+ // Index of the current component
- ACE_Array<CORBA_DynAny_var> da_members_;
+ ACE_Array<CORBA_DynAny_var> da_members_;
+ // Each component is also a DynAny
+ TAO_DynStruct_i (void);
// Must be instantiated with at least a typecode
- TAO_DynStruct_i (void);
- // Use copy() or assign()
- TAO_DynStruct_i (const TAO_DynStruct_i &src);
- TAO_DynStruct_i & operator= (const TAO_DynStruct_i &src);
+ // Use copy() or assign() instead of these
+ TAO_DynStruct_i (const TAO_DynStruct_i &src);
+ TAO_DynStruct_i &operator= (const TAO_DynStruct_i &src);
};
#endif /* TAO_DYNSTRUCT_I_H */
diff --git a/TAO/tao/DynUnion_i.h b/TAO/tao/DynUnion_i.h
index 4ad9286235d..98a8d559799 100644
--- a/TAO/tao/DynUnion_i.h
+++ b/TAO/tao/DynUnion_i.h
@@ -21,188 +21,200 @@
class TAO_Export TAO_DynUnion_i : public POA_CORBA::DynUnion
{
+ // = TITLE
+ // TAO_DynUnion_i
+ //
+ // = DESCRIPTION
+ // Implementation of Dynamic Any type for Unions
+ //
public:
- TAO_DynUnion_i (const CORBA_Any& any);
+ TAO_DynUnion_i (const CORBA_Any& any);
+ // constructor taking an Any argument
- TAO_DynUnion_i (CORBA_TypeCode_ptr tc);
+ TAO_DynUnion_i (CORBA_TypeCode_ptr tc);
+ // constructor taking a typecode argument
- ~TAO_DynUnion_i (void);
+ ~TAO_DynUnion_i (void);
+ // destructor
// Functions specific to DynUnion
- CORBA::Boolean set_as_default (CORBA::Environment& env);
+ CORBA::Boolean set_as_default (CORBA::Environment& env);
+ // Does union have a default member?
- void set_as_default (CORBA::Boolean set_as_default,
- CORBA::Environment&);
+ void set_as_default (CORBA::Boolean set_as_default,
+ CORBA::Environment&);
+ // Makes default member (if any) the active menber
- CORBA_DynAny_ptr discriminator (CORBA::Environment&);
+ CORBA_DynAny_ptr discriminator (CORBA::Environment&);
+ // Returns the discriminator (which is a DynAny)
- CORBA::TCKind discriminator_kind (CORBA::Environment& env);
+ CORBA::TCKind discriminator_kind (CORBA::Environment& env);
+ // Returns TCKind of discriminator
- CORBA_DynAny_ptr member (CORBA::Environment& env);
+ CORBA_DynAny_ptr member (CORBA::Environment& env);
+ // Returns active member
- char* member_name (CORBA::Environment& env);
+ // Get and set for member name
- void member_name (const char* member_name,
- CORBA::Environment& env);
+ char* member_name (CORBA::Environment& env);
- CORBA::TCKind member_kind (CORBA::Environment& env);
+ void member_name (const char* member_name,
+ CORBA::Environment& env);
- // Common functions
+ CORBA::TCKind member_kind (CORBA::Environment& env);
+ // Returns TCKind of active member
- void assign (CORBA_DynAny_ptr dyn_any,
- CORBA::Environment &env);
+ // Functions common to all Dynamic Any types
- CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ void assign (CORBA_DynAny_ptr dyn_any,
+ CORBA::Environment &env);
+ // Sets the value of the receiver to the value of the argument
- void destroy (CORBA::Environment &env);
+ CORBA_DynAny_ptr copy (CORBA::Environment &env);
+ // Creates a copy
- void from_any (const CORBA::Any& any,
- CORBA::Environment &env);
+ void destroy (CORBA::Environment &env);
+ // Makes sure the contents are disposed of correctly
- CORBA::Any_ptr to_any (CORBA::Environment &env);
+ void from_any (const CORBA::Any& any,
+ CORBA::Environment &env);
+ // Assigns value from an Any argument
- CORBA::TypeCode_ptr type (CORBA::Environment &);
+ CORBA::Any_ptr to_any (CORBA::Environment &env);
+ // Outputs contents as an Any
- CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ CORBA::TypeCode_ptr type (CORBA::Environment &);
+ // Returns the (constant) type
- CORBA::Boolean next (CORBA::Environment &env);
+ CORBA_DynAny_ptr current_component (CORBA::Environment &env);
+ // Used in iterating through the contents
- CORBA::Boolean seek (CORBA::Long index,
- CORBA::Environment &env);
+ CORBA::Boolean next (CORBA::Environment &);
+ // Returns next component
- void rewind (CORBA::Environment &env);
+ CORBA::Boolean seek (CORBA::Long index,
+ CORBA::Environment &);
+ // Jump to component at <index>
- // The insert and get functions.
+ void rewind (CORBA::Environment &);
+ // Makes first component the current one
- void insert_boolean (CORBA::Boolean value,
- CORBA::Environment &env);
+ // Insert and get functions
- void insert_octet (CORBA::Octet value,
- CORBA::Environment &env);
+ void insert_boolean (CORBA::Boolean value,
+ CORBA::Environment &env);
+ void insert_octet (CORBA::Octet value,
+ CORBA::Environment &env);
+ void insert_char (CORBA::Char value,
+ CORBA::Environment &env);
+ void insert_short (CORBA::Short value,
+ CORBA::Environment &env);
+ void insert_ushort (CORBA::UShort value,
+ CORBA::Environment &env);
+ void insert_long (CORBA::Long value,
+ CORBA::Environment &env);
+ void insert_ulong (CORBA::ULong value,
+ CORBA::Environment &env);
+ void insert_float (CORBA::Float value,
+ CORBA::Environment &env);
+ void insert_double (CORBA::Double value,
+ CORBA::Environment &env);
+ void insert_string (const char * value,
+ CORBA::Environment &env);
+ void insert_reference (CORBA::Object_ptr value,
+ CORBA::Environment &env);
+ void insert_typecode (CORBA::TypeCode_ptr value,
+ CORBA::Environment &env);
+ void insert_longlong (CORBA::LongLong value,
+ CORBA::Environment &env);
+ void insert_ulonglong (CORBA::ULongLong value,
+ CORBA::Environment &env);
+ void insert_wchar (CORBA::WChar value,
+ CORBA::Environment &env);
+ void insert_any (const CORBA::Any& value,
+ CORBA::Environment &env);
+ CORBA::Boolean get_boolean (CORBA::Environment &env);
- void insert_char (CORBA::Char value,
- CORBA::Environment &env);
+ CORBA::Octet get_octet (CORBA::Environment &env);
- void insert_short (CORBA::Short value,
- CORBA::Environment &env);
+ CORBA::Char get_char (CORBA::Environment &env);
- void insert_ushort (CORBA::UShort value,
- CORBA::Environment &env);
+ CORBA::Short get_short (CORBA::Environment &env);
- void insert_long (CORBA::Long value,
- CORBA::Environment &env);
+ CORBA::UShort get_ushort (CORBA::Environment &env);
- void insert_ulong (CORBA::ULong value,
- CORBA::Environment &env);
+ CORBA::Long get_long (CORBA::Environment &env);
- void insert_float (CORBA::Float value,
- CORBA::Environment &env);
+ CORBA::ULong get_ulong (CORBA::Environment &env);
- void insert_double (CORBA::Double value,
- CORBA::Environment &env);
+ CORBA::Float get_float (CORBA::Environment &env);
- void insert_string (const char * value,
- CORBA::Environment &env);
+ CORBA::Double get_double (CORBA::Environment &env);
- void insert_reference (CORBA::Object_ptr value,
- CORBA::Environment &env);
+ char * get_string (CORBA::Environment &env);
- void insert_typecode (CORBA::TypeCode_ptr value,
- CORBA::Environment &env);
+ CORBA::Object_ptr get_reference (CORBA::Environment &env);
- void insert_longlong (CORBA::LongLong value,
- CORBA::Environment &env);
+ CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
- void insert_ulonglong (CORBA::ULongLong value,
- CORBA::Environment &env);
+ CORBA::LongLong get_longlong (CORBA::Environment &env);
- void insert_wchar (CORBA::WChar value,
- CORBA::Environment &env);
+ CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
- void insert_any (const CORBA::Any& value,
- CORBA::Environment &env);
+ CORBA::WChar get_wchar (CORBA::Environment &env);
- CORBA::Boolean get_boolean (CORBA::Environment &env);
-
- CORBA::Octet get_octet (CORBA::Environment &env);
-
- CORBA::Char get_char (CORBA::Environment &env);
-
- CORBA::Short get_short (CORBA::Environment &env);
-
- CORBA::UShort get_ushort (CORBA::Environment &env);
-
- CORBA::Long get_long (CORBA::Environment &env);
-
- CORBA::ULong get_ulong (CORBA::Environment &env);
-
- CORBA::Float get_float (CORBA::Environment &env);
-
- CORBA::Double get_double (CORBA::Environment &env);
-
- char * get_string (CORBA::Environment &env);
-
- CORBA::Object_ptr get_reference (CORBA::Environment &env);
-
- CORBA::TypeCode_ptr get_typecode (CORBA::Environment &env);
-
- CORBA::LongLong get_longlong (CORBA::Environment &env);
-
- CORBA::ULongLong get_ulonglong (CORBA::Environment &env);
-
- CORBA::WChar get_wchar (CORBA::Environment &env);
-
- CORBA::Any_ptr get_any (CORBA::Environment &env);
+ CORBA::Any_ptr get_any (CORBA::Environment &env);
private:
- CORBA::TypeCode_var type_;
+ CORBA_DynAny_var member_;
- CORBA_DynAny_var discriminator_;
+ CORBA_DynAny_var discriminator_;
- CORBA::ULong index_;
-
- CORBA_DynAny_var member_;
+ CORBA::TypeCode_var type_;
+ // Holds the typecode of the Union
+ CORBA::ULong index_;
+ // Index of the active member
+ TAO_DynUnion_i (void);
// Must be instantiated with at least a typecode
- TAO_DynUnion_i (void);
- // Use copy() or assign()
- TAO_DynUnion_i (const TAO_DynUnion_i &src);
- TAO_DynUnion_i & operator= (const TAO_DynUnion_i &src);
-
- // Some specialized instantiations of template class defined in this
- // file at global scope.
+ // Use copy() or assign() instead of these
+ TAO_DynUnion_i (const TAO_DynUnion_i &src);
+ TAO_DynUnion_i &operator= (const TAO_DynUnion_i &src);
+
+ // Some specialized instantiations of template class (defined in
+ // DynUnion_i_T.h)
- class WChar_extractor : public ::DU_Extractor_base
+ class WChar_extractor : public DU_Extractor_base
{
public:
- CORBA::Boolean check_match (const CORBA_Any& inside_any,
- const CORBA_Any& outside_any);
+ CORBA::Boolean check_match (const CORBA_Any& inside_any,
+ const CORBA_Any& outside_any);
private:
- CORBA::WChar arg_index_,
- member_index_;
+ CORBA::WChar arg_index_;
+ CORBA::WChar member_index_;
};
- class Enum_extractor : public ::DU_Extractor_base
+ class Enum_extractor : public DU_Extractor_base
{
public:
- CORBA::Boolean check_match (const CORBA_Any& inside_any,
- const CORBA_Any& outside_any);
+ CORBA::Boolean check_match (const CORBA_Any& inside_any,
+ const CORBA_Any& outside_any);
private:
- CORBA::ULong arg_index_,
- member_index_;
+ CORBA::ULong arg_index_;
+ CORBA::ULong member_index_;
};
- // Returns a pointer to the correctr extractor class.
- ::DU_Extractor_base* get_extractor (CORBA::TCKind kind,
- CORBA::Environment &env);
+ DU_Extractor_base* get_extractor (CORBA::TCKind kind,
+ CORBA::Environment &env);
+ // Returns a pointer to the correct extractor class.
+ void set_from_any(const CORBA_Any& any,
+ CORBA::Environment &env);
// Code common to the constructor from an Any arg and the member
// function from_any().
- void set_from_any (const CORBA_Any& any,
- CORBA::Environment &env);
};
#endif /* TAO_DYNUNION_I_H */
diff --git a/TAO/tao/DynUnion_i_T.h b/TAO/tao/DynUnion_i_T.h
index 3d39a05389f..421da84d973 100644
--- a/TAO/tao/DynUnion_i_T.h
+++ b/TAO/tao/DynUnion_i_T.h
@@ -18,28 +18,38 @@
#include "tao/corba.h"
-// Template class functor to compare Anys in TAO_DynUnion_i
-// constructor with an Any arg and member function from_any().
-// Some compilers won't accept these eclarations inside
-// TAO_DynUnion_i or even at global scope in the same file.
-
class DU_Extractor_base
{
+ // = TITLE
+ // DU_Extractor_base
+ //
+ // = DESCRIPTION
+ // Base class of template class below
+ //
public:
virtual
- CORBA::Boolean check_match (const CORBA_Any& inside_any,
- const CORBA_Any& outside_any) = 0;
+ CORBA::Boolean check_match (const CORBA_Any& inside_any,
+ const CORBA_Any& outside_any) = 0;
};
template <class Type>
class DU_Extractor : public DU_Extractor_base
{
+ // = TITLE
+ // DU_Extractor
+ //
+ // = DESCRIPTION
+ // Template class functor to compare Anys in TAO_DynUnion_i
+ // constructor with an Any arg and member function from_any().
+ // Some compilers won't accept these eclarations inside
+ // TAO_DynUnion_i or even at global scope in the same file.
+ //
public:
- CORBA::Boolean check_match (const CORBA_Any& inside_any,
- const CORBA_Any& outside_any);
+ CORBA::Boolean check_match (const CORBA_Any& inside_any,
+ const CORBA_Any& outside_any);
private:
- Type arg_index_,
- member_index_;
+ Type arg_index_;
+ Type member_index_;
};
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)