2 //=============================================================================
4 * @file DynSequence_i.h
6 * @author Jeff Parsons <parsons@cs.wustl.edu>
8 //=============================================================================
11 #ifndef TAO_DYNSEQUENCE_I_H
12 #define TAO_DYNSEQUENCE_I_H
13 #include /**/ "ace/pre.h"
15 #include "tao/DynamicAny/DynamicAny.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/DynamicAny/DynCommon.h"
22 #include "tao/LocalObject.h"
23 #include "ace/Containers.h"
25 #if defined (_MSC_VER)
26 # pragma warning(push)
27 # pragma warning (disable:4250)
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 * @class TAO_DynSequence_i
35 * Implementation of Dynamic Any type for Sequences.
37 class TAO_DynamicAny_Export TAO_DynSequence_i
38 : public virtual DynamicAny::DynSequence
,
39 public virtual TAO_DynCommon
,
40 public virtual ::CORBA::LocalObject
44 TAO_DynSequence_i (CORBA::Boolean allow_truncation
=true);
47 ~TAO_DynSequence_i (void);
49 /// Initialize using just a TypeCode.
50 void init (CORBA::TypeCode_ptr tc
);
52 /// Initialize using an Any.
53 void init (const CORBA::Any
& any
);
55 // = LocalObject methods.
56 static TAO_DynSequence_i
*_narrow (CORBA::Object_ptr obj
);
58 // = Functions specific to DynSequence.
60 virtual CORBA::ULong
get_length (void);
62 virtual void set_length (CORBA::ULong len
);
64 virtual DynamicAny::AnySeq
* get_elements (void);
66 virtual void set_elements (const DynamicAny::AnySeq
& value
);
68 virtual DynamicAny::DynAnySeq
* get_elements_as_dyn_any (void);
70 virtual void set_elements_as_dyn_any (const DynamicAny::DynAnySeq
& value
);
73 // = DynAny common functions not implemented in class TAO_DynCommon.
75 virtual void from_any (const CORBA::Any
& value
);
77 virtual CORBA::Any
* to_any (void);
79 virtual CORBA::Boolean
equal (DynamicAny::DynAny_ptr dyn_any
);
81 virtual void destroy (void);
83 virtual DynamicAny::DynAny_ptr
current_component (void);
86 // Utility, turns the type of elements contained in the sequence.
87 CORBA::TypeCode_ptr
get_element_type (void);
89 // Called by both versions of init().
90 void init_common (void);
92 // = Use copy() or assign() instead of these
93 TAO_DynSequence_i (const TAO_DynSequence_i
&src
);
94 TAO_DynSequence_i
&operator= (const TAO_DynSequence_i
&src
);
97 /// Each component is also a DynAny.
98 ACE_Array_Base
<DynamicAny::DynAny_var
> da_members_
;
101 TAO_END_VERSIONED_NAMESPACE_DECL
103 #if defined(_MSC_VER)
104 # pragma warning(pop)
105 #endif /* _MSC_VER */
107 #include /**/ "ace/post.h"
108 #endif /* TAO_DYNSEQUENCE_I_H */