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

AbstractString.hpp

00001 #if !defined(__ABSTRACTSTRING_HPP) 00002 #define __ABSTRACTSTRING_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 #if !defined IN_COMMON_HPP 00025 #error AbstractString.hpp is included by common.hpp only. 00026 #endif 00027 00028 namespace corelinux 00029 { 00030 DECLARE_CLASS( AbstractString ); 00031 00038 class AbstractString 00039 { 00040 public: 00041 00042 // 00043 // Constructors and destructors 00044 // 00045 00046 // Default Constructor 00047 00048 AbstractString( void ); 00049 00050 // Copy constructor 00051 00052 AbstractString( AbstractStringCref ); 00053 00054 // Destructor 00055 00056 virtual ~AbstractString( void ); 00057 00058 // 00059 // Operators 00060 // 00061 00062 // Assignment operator 00063 00064 AbstractStringRef operator=( AbstractStringCref ) ; 00065 00066 // Equality check 00067 00068 bool operator==( AbstractStringCref ) const; 00069 00070 00071 // 00072 // Accessors 00073 // 00074 00075 // Indicates mbcs or unicode based character count 00076 00077 virtual Byte getElementByteCount( void ) const = 0; 00078 00079 // Can it be casted to std::string ? 00080 00081 virtual bool supportsStandardInterface( void ) const = 0; 00082 00083 // Is a mbcs based string? 00084 00085 virtual bool isUtf8( void ) const = 0; 00086 00087 // Is a 16 bit character string? 00088 00089 virtual bool isUcs2( void ) const = 0; 00090 00091 // Is a 32 bit character string (Linux wchar_t) 00092 00093 virtual bool isUcs4( void ) const = 0; 00094 00095 // 00096 // Mutators 00097 // 00098 00099 // 00100 // Factory methods and conversions 00101 // 00102 00103 // Default clone method 00104 00105 virtual AbstractStringPtr clone( void ) const 00106 throw ( Exception ) = 0; 00107 00108 // Clone ones self to a Utf8 implementation 00109 00110 virtual AbstractStringPtr cloneUtf8( void ) const 00111 throw ( Exception ) = 0; 00112 00113 // Clone ones self to a Ucs2 implementation 00114 00115 virtual AbstractStringPtr cloneUcs2( void ) const 00116 throw ( Exception ) = 0; 00117 00118 // Clone ones self to a Ucs4 implementation 00119 00120 virtual AbstractStringPtr cloneUcs4( void ) const 00121 throw ( Exception ) = 0; 00122 00123 }; 00124 } 00125 00126 00127 #endif 00128 00129 /* 00130 Common rcs information do not modify 00131 $Author: prudhomm $ 00132 $Revision: 1.1 $ 00133 $Date: 2000/04/23 20:43:13 $ 00134 $Locker: $ 00135 */ 00136

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