Enum_TypeCode_Static.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Enum_TypeCode_Static.h
00006  *
00007  *  $Id: Enum_TypeCode_Static.h 76551 2007-01-24 13:42:44Z johnnyw $
00008  *
00009  *  Header file for a static @c tk_enum CORBA::TypeCode.
00010  *
00011  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_ENUM_TYPECODE_STATIC_H
00016 #define TAO_ENUM_TYPECODE_STATIC_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/AnyTypeCode/TypeCode.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "tao/AnyTypeCode/TypeCode_Base_Attributes.h"
00027 #include "tao/AnyTypeCode/Null_RefCount_Policy.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 namespace TAO
00032 {
00033   namespace TypeCode
00034   {
00035     template <typename StringType,
00036               class EnumeratorArrayType,
00037               class RefCountPolicy> class Enum;
00038 
00039     /**
00040      * @class Enum
00041      *
00042      * @brief @c CORBA::TypeCode implementation for an OMG IDL
00043      *        @c enum.
00044      *
00045      * This class implements a @c CORBA::TypeCode for an OMG IDL
00046      * @c enum.
00047      */
00048     template<>
00049     class TAO_AnyTypeCode_Export Enum<char const *,
00050                           char const * const *,
00051                           TAO::Null_RefCount_Policy>
00052       : public CORBA::TypeCode,
00053         private TAO::Null_RefCount_Policy
00054     {
00055     public:
00056 
00057       /// Constructor.
00058       Enum (char const * id,
00059             char const * name,
00060             char const * const * enumerators,
00061             CORBA::ULong nenumerators);
00062 
00063       /**
00064        * @name TAO-specific @c CORBA::TypeCode Methods
00065        *
00066        * Methods required by TAO's implementation of the
00067        * @c CORBA::TypeCode class.
00068        *
00069        * @see @c CORBA::TypeCode
00070        */
00071       //@{
00072       virtual bool tao_marshal (TAO_OutputCDR & cdr,
00073                                 CORBA::ULong offset) const;
00074       virtual void tao_duplicate (void);
00075       virtual void tao_release (void);
00076       //@}
00077 
00078     protected:
00079 
00080       /**
00081        * @name @c TAO CORBA::TypeCode Template Methods
00082        *
00083        * @c tk_enum @c CORBA::TypeCode -specific template methods.
00084        *
00085        * @see @c CORBA::TypeCode
00086        */
00087       //@{
00088       virtual CORBA::Boolean equal_i (CORBA::TypeCode_ptr tc) const;
00089       virtual CORBA::Boolean equivalent_i (CORBA::TypeCode_ptr tc) const;
00090       virtual CORBA::TypeCode_ptr get_compact_typecode_i (void) const;
00091       virtual char const * id_i (void) const;
00092       virtual char const * name_i (void) const;
00093       virtual CORBA::ULong member_count_i (void) const;
00094       virtual char const * member_name_i (CORBA::ULong index) const;
00095       //@}
00096 
00097     private:
00098 
00099       /**
00100        * @c Enum Attributes
00101        *
00102        * Attributes representing the structure of an OMG IDL
00103        * @c enum.
00104        *
00105        * @note These attributes are declared in the order in which
00106        *       they are marshaled into a CDR stream in order to
00107        *       increase cache hits by improving spatial locality.
00108        */
00109       //@{
00110 
00111       /// Base attributes containing repository ID and name of
00112       /// structure type.
00113       Base_Attributes<char const *> base_attributes_;
00114 
00115       /// The number of enumerators in the OMG IDL enumeration.
00116       CORBA::ULong const nenumerators_;
00117 
00118       /// Array of @c TAO::TypeCode enumerators representing
00119       /// enumerators in the OMG IDL defined @c enum.
00120       char const * const * const enumerators_;
00121 
00122     };
00123 
00124   }  // End namespace TypeCode
00125 }  // End namespace TAO
00126 
00127 TAO_END_VERSIONED_NAMESPACE_DECL
00128 
00129 #ifdef __ACE_INLINE__
00130 # include "tao/AnyTypeCode/Enum_TypeCode_Static.inl"
00131 #endif  /* __ACE_INLINE__ */
00132 
00133 #include /**/ "ace/post.h"
00134 
00135 #endif /* TAO_ENUM_TYPECODE_STATIC_H */

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