String_TypeCode.h

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

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