Main Page
Namespaces
Classes
Files
File List
File Members
WPXString.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
/* libwpd
3
* Version: MPL 2.0 / LGPLv2.1+
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* Major Contributor(s):
10
* Copyright (C) 2004 William Lachance (wrlach@gmail.com)
11
* Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
12
*
13
* For minor contributions see the git repository.
14
*
15
* Alternatively, the contents of this file may be used under the terms
16
* of the GNU Lesser General Public License Version 2.1 or later
17
* (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18
* applicable instead of those above.
19
*
20
* For further information visit http://libwpd.sourceforge.net
21
*/
22
23
/* "This product is not manufactured, approved, or supported by
24
* Corel Corporation or Corel Corporation Limited."
25
*/
26
27
#ifndef WPXSTRING_H
28
#define WPXSTRING_H
29
30
class
WPXStringImpl
;
31
32
class
WPXString
33
{
34
public
:
35
WPXString
();
36
WPXString
(
const
WPXString
&,
bool
escapeXML =
false
);
37
WPXString
(
const
char
*str);
38
~WPXString
();
39
40
const
char
*
cstr
()
const
;
41
int
len
()
const
;
42
43
void
sprintf
(
const
char
*format, ...);
44
void
append
(
const
WPXString
&s);
45
void
append
(
const
char
*s);
46
void
append
(
const
char
c);
47
void
clear
();
48
WPXString
&
operator=
(
const
WPXString
&str);
49
WPXString
&
operator=
(
const
char
*s);
50
bool
operator==
(
const
char
*s)
const
;
51
bool
operator==
(
const
WPXString
&str)
const
;
52
bool
operator!
()
const
;
53
inline
bool
operator!=
(
const
char
*s)
const
54
{
55
return
!
operator==
(s);
56
}
57
inline
bool
operator!=
(
const
WPXString
&str)
const
58
{
59
return
!
operator==
(str);
60
}
61
62
class
Iter
63
{
64
public
:
65
Iter
(
const
WPXString
&str);
66
virtual
~Iter
();
67
void
rewind
();
68
bool
next
();
69
bool
last
();
70
const
char
*
operator()
()
const
;
71
private
:
72
Iter
(
const
Iter
&);
73
Iter
&
operator=
(
const
Iter
&);
74
WPXStringImpl
*
m_stringImpl
;
75
int
m_pos
;
76
mutable
char
*
m_curChar
;
77
};
78
79
private
:
80
WPXStringImpl
*
m_stringImpl
;
81
};
82
#endif
83
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
Generated for libwpd by
doxygen
1.8.4