Value_TypeCode_Static.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Value_TypeCode_Static.h
00006  *
00007  *  $Id: Value_TypeCode_Static.h 77779 2007-03-23 11:48:02Z johnnyw $
00008  *
00009  *  Header file for static @c tk_value and @c tk_event
00010  *  @c CORBA::TypeCodes.
00011  *
00012  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef TAO_VALUE_TYPECODE_STATIC_H
00017 #define TAO_VALUE_TYPECODE_STATIC_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "tao/AnyTypeCode/TypeCode.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "tao/AnyTypeCode/TypeCode_Base_Attributes.h"
00028 #include "tao/AnyTypeCode/ValueModifierC.h"
00029 #include "tao/AnyTypeCode/VisibilityC.h"
00030 #include "tao/AnyTypeCode/Null_RefCount_Policy.h"
00031 
00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00033 
00034 namespace TAO
00035 {
00036   namespace TypeCode
00037   {
00038     template<typename StringType, typename TypeCodeType> struct Value_Field;
00039     template <typename StringType,
00040               typename TypeCodeType,
00041               class FieldArrayType,
00042               class RefCountPolicy> class Value;
00043 
00044     /**
00045      * @class Value
00046      *
00047      * @brief @c CORBA::TypeCode implementation for an OMG IDL
00048      *        @c valuetype or @c event.
00049      *
00050      * This class implements a @c CORBA::TypeCode for an OMG IDL
00051      * @c valuetype or @c event.
00052      */
00053     template<>
00054     class TAO_AnyTypeCode_Export Value<char const *,
00055                            CORBA::TypeCode_ptr const *,
00056                            Value_Field<char const *,
00057                                        CORBA::TypeCode_ptr const *> const *,
00058                            TAO::Null_RefCount_Policy>
00059       : public CORBA::TypeCode,
00060         private TAO::Null_RefCount_Policy
00061     {
00062     public:
00063 
00064       /// Constructor.
00065       Value (CORBA::TCKind kind,
00066              char const * id,
00067              char const * name,
00068              CORBA::ValueModifier modifier,
00069              CORBA::TypeCode_ptr const * concrete_base,
00070              Value_Field<char const *,
00071                          CORBA::TypeCode_ptr const *> const * fields,
00072              CORBA::ULong nfields);
00073 
00074       /**
00075        * @name TAO-specific @c CORBA::TypeCode Methods
00076        *
00077        * Methods required by TAO's implementation of the
00078        * @c CORBA::TypeCode class.
00079        *
00080        * @see @c CORBA::TypeCode
00081        */
00082       //@{
00083       virtual bool tao_marshal (TAO_OutputCDR & cdr, CORBA::ULong offset) const;
00084       virtual void tao_duplicate (void);
00085       virtual void tao_release (void);
00086       //@}
00087 
00088     protected:
00089 
00090       /**
00091        * @name @c TAO CORBA::TypeCode Template Methods
00092        *
00093        * @c tk_value or @c tk_event @c CORBA::TypeCode -specific
00094        * template methods.
00095        *
00096        * @see @c CORBA::TypeCode
00097        */
00098       //@{
00099       virtual CORBA::Boolean equal_i (CORBA::TypeCode_ptr tc) const;
00100       virtual CORBA::Boolean equivalent_i (CORBA::TypeCode_ptr tc) const;
00101       virtual CORBA::TypeCode_ptr get_compact_typecode_i (void) const;
00102       virtual char const * id_i (void) const;
00103       virtual char const * name_i (void) const;
00104       virtual CORBA::ULong member_count_i (void) const;
00105       virtual char const * member_name_i (CORBA::ULong index) const;
00106       virtual CORBA::TypeCode_ptr member_type_i (CORBA::ULong index) const;
00107       virtual CORBA::Visibility member_visibility_i (CORBA::ULong index) const;
00108       virtual CORBA::ValueModifier type_modifier_i (void) const;
00109       virtual CORBA::TypeCode_ptr concrete_base_type_i (void) const;
00110       //@}
00111 
00112     private:
00113 
00114       /**
00115        * @c Valuetype Attributes
00116        *
00117        * Attributes representing the structure of an OMG IDL
00118        * @c valuetype or @c event.
00119        *
00120        * @note These attributes are declared in the order in which
00121        *       they are marshaled into a CDR stream in order to
00122        *       increase cache hits by improving spatial locality.
00123        */
00124       //@{
00125 
00126       /// Base attributes containing repository ID and name of
00127       /// @c valuetype.
00128       Base_Attributes<char const *> const base_attributes_;
00129 
00130       /// The @c ValueModifier of the @c valuetype of @c eventtype
00131       /// represented by this @c TypeCode.
00132       CORBA::ValueModifier const type_modifier_;
00133 
00134       /// The @c TypeCode corresponding to the concrete base
00135       /// @c valuetype or @c eventtype.
00136       CORBA::TypeCode_ptr const * const concrete_base_;
00137 
00138       /// The number of fields in the OMG IDL value.
00139       CORBA::ULong const nfields_;
00140 
00141       /// Array of @c TAO::TypeCode fields representing structure of the
00142       /// OMG IDL defined @c value.
00143       Value_Field<char const *,
00144                   CORBA::TypeCode_ptr const *> const * const fields_;
00145 
00146       //@}
00147 
00148     };
00149 
00150   }  // End namespace TypeCode
00151 }  // End namespace TAO
00152 
00153 TAO_END_VERSIONED_NAMESPACE_DECL
00154 
00155 #ifdef __ACE_INLINE__
00156 # include "tao/AnyTypeCode/Value_TypeCode_Static.inl"
00157 #endif  /* __ACE_INLINE__ */
00158 
00159 #include /**/ "ace/post.h"
00160 
00161 #endif /* TAO_VALUE_TYPECODE_STATIC_H */

Generated on Sun Jan 27 13:21:07 2008 for TAO_AnyTypeCode by doxygen 1.3.6