String_TypeCode_Static.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    String_TypeCode_Static.h
00006  *
00007  *  $Id: String_TypeCode_Static.h 76551 2007-01-24 13:42:44Z johnnyw $
00008  *
00009  *  Header file for static @c CORBA::tk_string or @c CORBA::tk_wstring
00010  *  @c CORBA::TypeCodes.
00011  *
00012  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef TAO_STRING_TYPECODE_STATIC_H
00017 #define TAO_STRING_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/Null_RefCount_Policy.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 namespace TAO
00032 {
00033   namespace TypeCode
00034   {
00035     template <class RefCountPolicy> class String;
00036 
00037     /**
00038      * @class String
00039      *
00040      * @brief @c CORBA::TypeCode implementation for OMG IDL string
00041      *        types.
00042      *
00043      * This class implements a @c CORBA::TypeCode for OMG IDL string
00044      * types, including @c wstring.
00045      */
00046     template<>
00047     class TAO_AnyTypeCode_Export String<TAO::Null_RefCount_Policy>
00048       : public CORBA::TypeCode,
00049         private TAO::Null_RefCount_Policy
00050     {
00051     public:
00052 
00053       /// Constructor.
00054       String (CORBA::TCKind kind, CORBA::ULong length);
00055 
00056       /**
00057        * @name TAO-specific @c CORBA::TypeCode Methods
00058        *
00059        * Methods required by TAO's implementation of the
00060        * @c CORBA::TypeCode class.
00061        *
00062        * @see @c CORBA::TypeCode
00063        */
00064       //@{
00065       virtual bool tao_marshal (TAO_OutputCDR & cdr,
00066                                 CORBA::ULong offset) const;
00067       virtual void tao_duplicate (void);
00068       virtual void tao_release (void);
00069       //@}
00070 
00071     protected:
00072 
00073       /**
00074        * @name @c TAO CORBA::TypeCode Template Methods
00075        *
00076        * @c CORBA::TypeCode template methods specific to @c tk_string
00077        * @c TypeCodes.
00078        *
00079        * @see @c CORBA::TypeCode
00080        */
00081       //@{
00082       virtual CORBA::Boolean equal_i (CORBA::TypeCode_ptr tc
00083                                       ) const;
00084       virtual CORBA::Boolean equivalent_i (CORBA::TypeCode_ptr tc
00085                                            ) const;
00086       virtual CORBA::TypeCode_ptr get_compact_typecode_i (
00087         void) const;
00088       virtual CORBA::ULong length_i (void) const;
00089 
00090     private:
00091 
00092       /// Length of the @c string.  A length of zero indicates an
00093       /// unbounded @c string.
00094       CORBA::ULong const length_;
00095 
00096     };
00097 
00098   }  // End namespace TypeCode
00099 }  // End namespace TAO
00100 
00101 TAO_END_VERSIONED_NAMESPACE_DECL
00102 
00103 
00104 #ifdef __ACE_INLINE__
00105 # include "tao/AnyTypeCode/String_TypeCode_Static.inl"
00106 #endif  /* __ACE_INLINE__ */
00107 
00108 #include /**/ "ace/post.h"
00109 
00110 #endif /* TAO_STRING_TYPECODE_STATIC_H */

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