diff options
author | jp4 <jp4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-18 19:22:26 +0000 |
---|---|---|
committer | jp4 <jp4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-18 19:22:26 +0000 |
commit | 77b783e27b9f4e148b4228a519c536da6cc30fc2 (patch) | |
tree | 6e9ed4483f3e772b40954259e48d273041ca1268 /TAO/tao/DynUnion_i.h | |
parent | 5ada5c0075d391ec52ec8dd305d8ceb09745c8f9 (diff) | |
download | ATCD-77b783e27b9f4e148b4228a519c536da6cc30fc2.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao/DynUnion_i.h')
-rw-r--r-- | TAO/tao/DynUnion_i.h | 248 |
1 files changed, 130 insertions, 118 deletions
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 */ |