Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

StringUtf8.hpp

00001 #if   !defined(__STRINGUTF8_HPP)
00002 #define  __STRINGUTF8_HPP
00003 
00004 /*
00005   CoreLinux++ 
00006   Copyright (C) 1999 CoreLinux Consortium
00007   
00008    The CoreLinux++ Library is free software; you can redistribute it and/or
00009    modify it under the terms of the GNU Library General Public License as
00010    published by the Free Software Foundation; either version 2 of the
00011    License, or (at your option) any later version.
00012 
00013    The CoreLinux++ Library Library is distributed in the hope that it will 
00014    be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Library General Public License for more details.
00017 
00018    You should have received a copy of the GNU Library General Public
00019    License along with the GNU C Library; see the file COPYING.LIB.  If not,
00020    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00021    Boston, MA 02111-1307, USA.  
00022 */   
00023 
00024 
00025 
00026 #if   !defined(__COMMON_HPP)
00027 #include <Common.hpp>
00028 #endif
00029 
00030 #include <string>
00031 
00032 namespace corelinux
00033 {
00034    DECLARE_CLASS(StringUtf8);
00035 
00041    class StringUtf8 : public AbstractString, public std::string
00042    {
00043    
00044    public:
00045    
00046       //
00047       // Constructors and destructors
00048       //
00049 
00050                // Default constructor
00051 
00052                StringUtf8( void );
00053 
00054                // Char * copy constructor
00055 
00056                StringUtf8( CharCptr );
00057 
00058                // std::string copy constructor
00059 
00060                StringUtf8( const std::string & );
00061 
00062                // Copy constructor
00063 
00064                StringUtf8( StringUtf8Cref );
00065 
00066                // Copy from base constructor, this
00067                // allows other Utf8 string implementations
00068                // to be copied to StringUtf8
00069 
00070                StringUtf8( AbstractStringCref ) 
00071                      throw (Exception);
00072 
00073                // Destructor
00074 
00075       virtual  ~StringUtf8( void );
00076 
00077       //
00078       // Accessors
00079       //
00080 
00081       virtual  Byte     getElementByteCount( void ) const ;
00082 
00083       virtual  bool     supportsStandardInterface( void ) const ;
00084 
00085       virtual  bool     isUtf8( void ) const ;
00086 
00087       virtual  bool     isUcs2( void ) const ;
00088 
00089       virtual  bool     isUcs4( void ) const ;
00090 
00091       //
00092       // Mutators
00093       //
00094 
00095       //
00096       // Factory methods and conversions
00097       //
00098                // Default (calls cloneUtf8)
00099 
00100       virtual  AbstractStringPtr clone( void ) const 
00101                         throw ( Exception );
00102 
00103                // Clone ones self to a Utf8 implementation
00104 
00105       virtual  AbstractStringPtr cloneUtf8( void ) const 
00106                         throw ( Exception );
00107 
00108                // Clone ones self to a Ucs2 implementation
00109 
00110       virtual  AbstractStringPtr cloneUcs2( void ) const 
00111                         throw ( Exception );
00112 
00113                // Clone ones self to a Ucs4 implementation
00114 
00115       virtual  AbstractStringPtr cloneUcs4( void ) const 
00116                         throw ( Exception );
00117 
00118    protected:
00119    
00120    private:
00121    
00122    };
00123 
00124 }
00125 
00126 #endif // #if !defined(__STRINGUTF8_HPP)
00127 
00128 /*
00129    Common rcs information do not modify
00130    $Author: prudhomm $
00131    $Revision: 1.1 $
00132    $Date: 2000/04/23 20:43:13 $
00133    $Locker:  $
00134 */
00135 

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium