Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / tao / DynamicAny / DynEnum_i.h
blob6d05d6d7fae4e1d35732bfa879fb684b8f153075
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file DynEnum_i.h
7 * @author Jeff Parsons <parsons@cs.wustl.edu>
8 */
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)
19 # 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)
29 #endif /* _MSC_VER */
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 /**
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
43 public:
44 /// Constructor.
45 TAO_DynEnum_i (CORBA::Boolean allow_truncation=true);
47 /// Destructor.
48 ~TAO_DynEnum_i ();
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 ();
81 private:
82 // Called by both versions of init().
83 void init_common ();
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);
89 private:
90 /// Current numeric value of the enum.
91 CORBA::ULong value_;
94 TAO_END_VERSIONED_NAMESPACE_DECL
96 #if defined(_MSC_VER)
97 # pragma warning(pop)
98 #endif /* _MSC_VER */
100 #include /**/ "ace/post.h"
101 #endif /* TAO_DYNENUM_I_H */