Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / tao / DynamicAny / DynAny_i.h
blob2488649d5b4a617ce072aedfed7a22058db59ade
1 // -*- C++ -*-
2 //=============================================================================
3 /**
4 * @file DynAny_i.h
6 * @author Jeff Parsons <parsons@cs.wustl.edu>
7 */
8 //=============================================================================
11 #ifndef TAO_DYNANY_I_H
12 #define TAO_DYNANY_I_H
13 #include /**/ "ace/pre.h"
15 #include "tao/DynamicAny/DynamicAny.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/DynamicAny/DynCommon.h"
22 #include "tao/LocalObject.h"
24 #if defined (_MSC_VER)
25 # pragma warning(push)
26 # pragma warning (disable:4250)
27 #endif /* _MSC_VER */
29 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 /**
32 * @class TAO_DynAny_i
34 * @brief Implementation of the basic Dynamic Any datatype.
36 class TAO_DynamicAny_Export TAO_DynAny_i
37 : public virtual DynamicAny::DynAny,
38 public virtual TAO_DynCommon,
39 public virtual ::CORBA::LocalObject
41 public:
42 /// Constructor.
43 TAO_DynAny_i (CORBA::Boolean allow_truncation=true);
45 /// Destructor.
46 ~TAO_DynAny_i (void);
48 /// Initialize using just a TypeCode
49 void init (CORBA::TypeCode_ptr tc);
51 /// Initialize using an Any.
52 void init (const CORBA::Any& any);
54 // = LocalObject methods.
55 static TAO_DynAny_i *_narrow (CORBA::Object_ptr obj);
57 // = DynAny common functions not implemented in class TAO_DynCommon.
59 virtual void from_any (const CORBA::Any & value);
61 virtual CORBA::Any * to_any (void);
63 virtual CORBA::Boolean equal (DynamicAny::DynAny_ptr dyn_any);
65 virtual void destroy (void);
67 virtual DynamicAny::DynAny_ptr current_component (void);
69 private:
70 /// Check if the typecode is acceptable.
71 void check_typecode (CORBA::TypeCode_ptr tc);
73 /// Used when we are created from a typecode.
74 void set_to_default_value (CORBA::TypeCode_ptr tc);
76 /// Called by both versions of init().
77 void init_common (void);
79 // Use copy() or assign() instead of these.
80 TAO_DynAny_i (const TAO_DynAny_i &src);
81 TAO_DynAny_i &operator= (const TAO_DynAny_i &src);
84 TAO_END_VERSIONED_NAMESPACE_DECL
86 #if defined(_MSC_VER)
87 # pragma warning(pop)
88 #endif /* _MSC_VER */
90 #include /**/ "ace/post.h"
91 #endif /* TAO_DYNANY_I_H */