DynSequence_i.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: DynSequence_i.h 77779 2007-03-23 11:48:02Z johnnyw $
00004 
00005 //=============================================================================
00006 /**
00007  *  @file    DynSequence_i.h
00008  *
00009  *  $Id: DynSequence_i.h 77779 2007-03-23 11:48:02Z johnnyw $
00010  *
00011  *  @author Jeff Parsons <parsons@cs.wustl.edu>
00012  */
00013 //=============================================================================
00014 
00015 
00016 #ifndef TAO_DYNSEQUENCE_I_H
00017 #define TAO_DYNSEQUENCE_I_H
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/DynamicAny/DynamicAny.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "tao/DynamicAny/DynCommon.h"
00027 #include "tao/LocalObject.h"
00028 #include "ace/Containers.h"
00029 
00030 #if defined (_MSC_VER)
00031 # pragma warning(push)
00032 # pragma warning (disable:4250)
00033 #endif /* _MSC_VER */
00034 
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036 
00037 /**
00038  * @class TAO_DynSequence_i
00039  *
00040  * Implementation of Dynamic Any type for Sequences.
00041  */
00042 class TAO_DynamicAny_Export TAO_DynSequence_i
00043   : public virtual DynamicAny::DynSequence,
00044     public virtual TAO_DynCommon,
00045     public virtual TAO_Local_RefCounted_Object
00046 {
00047 public:
00048   /// Constructor.
00049   TAO_DynSequence_i (void);
00050 
00051   /// Destructor.
00052   ~TAO_DynSequence_i (void);
00053 
00054   /// Initialize using just a TypeCode.
00055   void init (CORBA::TypeCode_ptr tc);
00056 
00057   /// Initialize using an Any.
00058   void init (const CORBA::Any& any);
00059 
00060   // = LocalObject methods.
00061   static TAO_DynSequence_i *_narrow (CORBA::Object_ptr obj);
00062 
00063   // = Functions specific to DynSequence.
00064 
00065   virtual CORBA::ULong get_length (void);
00066 
00067   virtual void set_length (CORBA::ULong len);
00068 
00069   virtual DynamicAny::AnySeq * get_elements (void);
00070 
00071   virtual void set_elements (const DynamicAny::AnySeq & value);
00072 
00073   virtual DynamicAny::DynAnySeq * get_elements_as_dyn_any (void);
00074 
00075   virtual void set_elements_as_dyn_any (const DynamicAny::DynAnySeq & value);
00076 
00077 
00078   // = DynAny common functions not implemented in class TAO_DynCommon.
00079 
00080   virtual void from_any (const CORBA::Any & value);
00081 
00082   virtual CORBA::Any * to_any (void);
00083 
00084   virtual CORBA::Boolean equal (DynamicAny::DynAny_ptr dyn_any);
00085 
00086   virtual void destroy (void);
00087 
00088   virtual DynamicAny::DynAny_ptr current_component (void);
00089 
00090 private:
00091   // Utility, turns the type of elements contained in the sequence.
00092   CORBA::TypeCode_ptr get_element_type (void);
00093 
00094   // Called by both versions of init().
00095   void init_common (void);
00096 
00097   // = Use copy() or assign() instead of these
00098   TAO_DynSequence_i (const TAO_DynSequence_i &src);
00099   TAO_DynSequence_i &operator= (const TAO_DynSequence_i &src);
00100 
00101 private:
00102   /// Each component is also a DynAny.
00103   ACE_Array_Base<DynamicAny::DynAny_var> da_members_;
00104 };
00105 
00106 TAO_END_VERSIONED_NAMESPACE_DECL
00107 
00108 #if defined(_MSC_VER)
00109 # pragma warning(pop)
00110 #endif /* _MSC_VER */
00111 
00112 #include /**/ "ace/post.h"
00113 #endif /* TAO_DYNSEQUENCE_I_H */

Generated on Sun Jan 27 13:36:29 2008 for TAO_DynamicAny by doxygen 1.3.6