File: class_qaregexprange.html

package info (click to toggle)
regexplorer 0.1.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 332 kB
  • ctags: 222
  • sloc: cpp: 1,166; perl: 99; makefile: 45; sh: 32
file content (202 lines) | stat: -rw-r--r-- 5,344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>QaRegExpRange Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<center><a href="annotated.html">Compound list</a> &nbsp; <a href="files.html">File list</a> &nbsp; <a href="headers.html">Header files</a> &nbsp; <a href="functions.html">Compound Members</a> &nbsp; <a href="globals.html">File Members</a> &nbsp; 
</center><hr>
<h1>QaRegExpRange Class Reference</h1>

<p>
Holds a start and end offset for a given regexp match. <a href="#details">More...</a>
<p>
<code>#include &lt;<a class="el" href="class_qaregexprange-include.html">qaregexprange.hpp</a>&gt;</code>
<p>
<a href="class_qaregexprange-members.html">List of all members.</a><h2>Public Members</h2>
<ul>
<li> <a class="el" href="class_qaregexprange.html#a0">QaRegExpRange</a> ()
<li> <a class="el" href="class_qaregexprange.html#a1">QaRegExpRange</a> ( int soffs, int eoffs )
<li> <a class="el" href="class_qaregexprange.html#a2">~QaRegExpRange</a> ()
<li>int <a class="el" href="class_qaregexprange.html#a3">start</a> () const
<li>int <a class="el" href="class_qaregexprange.html#a4">end</a> () const
<li>int <a class="el" href="class_qaregexprange.html#a5">length</a> () const
<li>void <a class="el" href="class_qaregexprange.html#a6">setStart</a> ( int s )
<li>void <a class="el" href="class_qaregexprange.html#a7">setEnd</a> ( int e )
<li>QString <a class="el" href="class_qaregexprange.html#a8">stringRange</a> ( const QString &amp;s ) const
<li>QaRegExpRange&amp; <a class="el" href="class_qaregexprange.html#a9">operator +=</a> ( int i )
<li>QaRegExpRange&amp; <a class="el" href="class_qaregexprange.html#a10">operator -=</a> ( int i )
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
Holds a start and end offset for a given regexp match.
<p>

<p>
  A simple tool class for keeping a start and end offset and for extracting the correct substring from a given string.
  It also makes sure the start offset is smaller than the end offset, they are swapped if needed.

<p>

<p>

<p>

<p>
<hr><h2>Member Function Documentation</h2>

<h3><a name="a0" doxytag="QaRegExpRange::QaRegExpRange"></a> QaRegExpRange::QaRegExpRange()</h3>
<div class="in">

<p>

<p>
  Creates a range with start and end equal to -1

<p>

<p>
</div>

<h3><a name="a1" doxytag="QaRegExpRange::QaRegExpRange"></a> QaRegExpRange::QaRegExpRange( int soffs, int eoffs )</h3>
<div class="in">

<p>

<p>
  Creates a range with given start end end offset.

<p>

<p>
</div>

<h3><a name="a2" doxytag="QaRegExpRange::~QaRegExpRange"></a> QaRegExpRange::~QaRegExpRange()</h3>
<div class="in">

<p>

<p>
  Destroys the object

<p>

<p>
</div>

<h3><a name="a3" doxytag="QaRegExpRange::start"></a>int QaRegExpRange::start() const</h3>
<div class="in">

<p>

<p>
  <dl compact><dt>
<b>Returns: </b><dd>
 The start offset.

<p>
</dl>
<p>
</div>

<h3><a name="a4" doxytag="QaRegExpRange::end"></a>int QaRegExpRange::end() const</h3>
<div class="in">

<p>

<p>
  <dl compact><dt>
<b>Returns: </b><dd>
 The end offset.

<p>
</dl>
<p>
</div>

<h3><a name="a5" doxytag="QaRegExpRange::length"></a>int QaRegExpRange::length() const</h3>
<div class="in">

<p>

<p>
  <dl compact><dt>
<b>Returns: </b><dd>
 The length of the offset, 0 means start and end are equal.

<p>
</dl>
<p>
</div>

<h3><a name="a6" doxytag="QaRegExpRange::setStart"></a>void QaRegExpRange::setStart( int s )</h3>
<div class="in">

<p>

<p>
  Sets the start offset, if it is larger than the end offset it used as end
  and the previous end is used as start.

<p>

<p>
</div>

<h3><a name="a7" doxytag="QaRegExpRange::setEnd"></a>void QaRegExpRange::setEnd( int e )</h3>
<div class="in">

<p>

<p>
  Sets the end offset, if it is smaller than the start offset it used as start
  and the previous start is used as end.

<p>

<p>
</div>

<h3><a name="a8" doxytag="QaRegExpRange::stringRange"></a><a class="el" doxygen="qt.tag:/usr/lib/qt/doc/" href="/usr/lib/qt/doc/qstring.html">QString</a> QaRegExpRange::stringRange( const <a class="el" doxygen="qt.tag:/usr/lib/qt/doc/" href="/usr/lib/qt/doc/qstring.html">QString</a> &amp;s ) const</h3>
<div class="in">

<p>

<p>
  <dl compact><dt>
<b>Returns: </b><dd>
 The substring of the given string.

<p>
</dl>
<p>
</div>

<h3><a name="a9" doxytag="QaRegExpRange::operator +="></a>QaRegExpRange&amp;  QaRegExpRange::operator +=( int i )</h3>
<div class="in">

<p>

<p>
  Moves both start and end offset by i places.

<p>

<p>
</div>

<h3><a name="a10" doxytag="QaRegExpRange::operator -="></a>QaRegExpRange&amp;  QaRegExpRange::operator -=( int i )</h3>
<div class="in">

<p>

<p>
  Moves both start and end offset by i places.

<p>

<p>
</div>
<hr>The documentation for this  class was generated from the following files:<ul>
<li><a class="el" href="qaregexprange.cpp.html">qaregexprange.cpp</a><li><a class="el" href="qaregexprange.hpp.html">qaregexprange.hpp</a></ul>
<hr><address><small>Generated at Mon Aug 16 02:11:02 1999 for QaRegExp by <a href="http://www.stack.nl/~dimitri/doxygen/index.html"><img src="doxygen.gif" alt="doxygen" align=center border=0 width=118 height=53></a>&nbsp; written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, &copy; 1997-1998</small></address>
</body>
</html>