1
#if !defined(__ABSTRACTSTRING_HPP)
2
#define __ABSTRACTSTRING_HPP
6
Copyright (C) 1999 CoreLinux Consortium
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.
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.
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.
24
#if !defined IN_COMMON_HPP
25
#error AbstractString.hpp is included by common.hpp only.
30
DECLARE_CLASS( AbstractString );
33
AbstractString is a temporary base abstraction. It is the goal
34
of the library to support adaptors for other string implementations
35
while providing a consistent interface.
43
// Constructors and destructors
46
// Default Constructor
48
AbstractString( void );
52
AbstractString( AbstractStringCref );
56
virtual ~AbstractString( void );
62
// Assignment operator
64
AbstractStringRef operator=( AbstractStringCref ) ;
68
bool operator==( AbstractStringCref ) const;
75
// Indicates mbcs or unicode based character count
77
virtual Byte getElementByteCount( void ) const = 0;
79
// Can it be casted to std::string ?
81
virtual bool supportsStandardInterface( void ) const = 0;
83
// Is a mbcs based string?
85
virtual bool isUtf8( void ) const = 0;
87
// Is a 16 bit character string?
89
virtual bool isUcs2( void ) const = 0;
91
// Is a 32 bit character string (Linux wchar_t)
93
virtual bool isUcs4( void ) const = 0;
100
// Factory methods and conversions
103
// Default clone method
105
virtual AbstractStringPtr clone( void ) const
106
throw ( Exception ) = 0;
108
// Clone ones self to a Utf8 implementation
110
virtual AbstractStringPtr cloneUtf8( void ) const
111
throw ( Exception ) = 0;
113
// Clone ones self to a Ucs2 implementation
115
virtual AbstractStringPtr cloneUcs2( void ) const
116
throw ( Exception ) = 0;
118
// Clone ones self to a Ucs4 implementation
120
virtual AbstractStringPtr cloneUcs4( void ) const
121
throw ( Exception ) = 0;
130
Common rcs information do not modify
133
$Date: 2000/04/23 20:43:13 $