CoreLinux++  0.4.32
StringUtf8.hpp
1 #if !defined(__STRINGUTF8_HPP)
2 #define __STRINGUTF8_HPP
3 
4 /*
5  CoreLinux++
6  Copyright (C) 1999 CoreLinux Consortium
7 
8  The CoreLinux++ Library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version.
12 
13  The CoreLinux++ Library Library is distributed in the hope that it will
14  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public
19  License along with the GNU C Library; see the file COPYING.LIB. If not,
20  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA 02111-1307, USA.
22 */
23 
24 
25 
26 #if !defined(__COMMON_HPP)
27 #include <Common.hpp>
28 #endif
29 
30 #include <string>
31 
32 namespace corelinux
33 {
34  DECLARE_CLASS(StringUtf8);
35 
41  class StringUtf8 : public AbstractString, public std::string
42  {
43 
44  public:
45 
46  //
47  // Constructors and destructors
48  //
49 
50  // Default constructor
51 
52  StringUtf8( void );
53 
54  // Char * copy constructor
55 
56  StringUtf8( CharCptr );
57 
58  // std::string copy constructor
59 
60  StringUtf8( const std::string & );
61 
62  // Copy constructor
63 
65 
66  // Copy from base constructor, this
67  // allows other Utf8 string implementations
68  // to be copied to StringUtf8
69 
71  throw (Exception);
72 
73  // Destructor
74 
75  virtual ~StringUtf8( void );
76 
77  //
78  // Accessors
79  //
80 
81  virtual Byte getElementByteCount( void ) const ;
82 
83  virtual bool supportsStandardInterface( void ) const ;
84 
85  virtual bool isUtf8( void ) const ;
86 
87  virtual bool isUcs2( void ) const ;
88 
89  virtual bool isUcs4( void ) const ;
90 
91  //
92  // Mutators
93  //
94 
95  //
96  // Factory methods and conversions
97  //
98  // Default (calls cloneUtf8)
99 
100  virtual AbstractStringPtr clone( void ) const
101  throw ( Exception );
102 
103  // Clone ones self to a Utf8 implementation
104 
105  virtual AbstractStringPtr cloneUtf8( void ) const
106  throw ( Exception );
107 
108  // Clone ones self to a Ucs2 implementation
109 
110  virtual AbstractStringPtr cloneUcs2( void ) const
111  throw ( Exception );
112 
113  // Clone ones self to a Ucs4 implementation
114 
115  virtual AbstractStringPtr cloneUcs4( void ) const
116  throw ( Exception );
117 
118  protected:
119 
120  private:
121 
122  };
123 
124 }
125 
126 #endif // #if !defined(__STRINGUTF8_HPP)
127 
128 /*
129  Common rcs information do not modify
130  $Author: prudhomm $
131  $Revision: 1.1 $
132  $Date: 2000/04/23 20:43:13 $
133  $Locker: $
134 */
135 
StringUtf8 is a temporary string implementation.
Definition: StringUtf8.hpp:41
Exception is the base exception class used in the CoreLinux++ libraries.
Definition: Exception.hpp:51
AbstractString is a temporary base abstraction.
Definition: AbstractString.hpp:38

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