3 //=============================================================================
7 * @author Jeff Parsons <parsons@cs.wustl.edu>
9 //=============================================================================
12 #ifndef TAO_DYNENUM_I_H
13 #define TAO_DYNENUM_I_H
14 #include /**/ "ace/pre.h"
16 #include "tao/DynamicAny/DynamicAny.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/DynamicAny/DynCommon.h"
23 #include "tao/LocalObject.h"
24 #include "ace/Containers.h"
26 #if defined (_MSC_VER)
27 # pragma warning(push)
28 # pragma warning (disable:4250)
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 * @class TAO_DynEnum_i
36 * Implementation of Dynamic Any type for enums
38 class TAO_DynamicAny_Export TAO_DynEnum_i
39 : public virtual DynamicAny::DynEnum
,
40 public virtual TAO_DynCommon
,
41 public virtual ::CORBA::LocalObject
45 TAO_DynEnum_i (CORBA::Boolean allow_truncation
=true);
50 /// Initialize using just a TypeCode.
51 void init (CORBA::TypeCode_ptr tc
);
53 /// Initialize using an Any.
54 void init (const CORBA::Any
& any
);
56 // = LocalObject methods.
57 static TAO_DynEnum_i
*_narrow (CORBA::Object_ptr obj
);
59 // = Functions specific to DynEnum.
61 virtual char * get_as_string ();
63 virtual void set_as_string (const char * value
);
65 virtual CORBA::ULong
get_as_ulong ();
67 virtual void set_as_ulong (CORBA::ULong value
);
69 // = DynAny common functions not implemented in class TAO_DynCommon.
71 virtual void from_any (const CORBA::Any
& value
);
73 virtual CORBA::Any
* to_any ();
75 virtual CORBA::Boolean
equal (DynamicAny::DynAny_ptr dyn_any
);
77 virtual void destroy ();
79 virtual DynamicAny::DynAny_ptr
current_component ();
82 // Called by both versions of init().
85 // = Use copy() or assign() instead of these.
86 TAO_DynEnum_i (const TAO_DynEnum_i
&src
);
87 TAO_DynEnum_i
&operator= (const TAO_DynEnum_i
&src
);
90 /// Current numeric value of the enum.
94 TAO_END_VERSIONED_NAMESPACE_DECL
100 #include /**/ "ace/post.h"
101 #endif /* TAO_DYNENUM_I_H */