ICU 56.1
56.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
i18n
unicode
stsearch.h
Go to the documentation of this file.
1
/*
2
**********************************************************************
3
* Copyright (C) 2001-2014 IBM and others. All rights reserved.
4
**********************************************************************
5
* Date Name Description
6
* 03/22/2000 helena Creation.
7
**********************************************************************
8
*/
9
10
#ifndef STSEARCH_H
11
#define STSEARCH_H
12
13
#include "
unicode/utypes.h
"
14
20
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
21
22
#include "
unicode/tblcoll.h
"
23
#include "
unicode/coleitr.h
"
24
#include "
unicode/search.h
"
25
26
U_NAMESPACE_BEGIN
27
132
class
U_I18N_API
StringSearch
U_FINAL :
public
SearchIterator
133
{
134
public
:
135
136
// public constructors and destructors --------------------------------
137
159
StringSearch
(
const
UnicodeString
&pattern,
const
UnicodeString
&text,
160
const
Locale
&locale,
161
BreakIterator
*breakiter,
162
UErrorCode
&status);
163
185
StringSearch
(
const
UnicodeString
&pattern,
186
const
UnicodeString
&text,
187
RuleBasedCollator
*coll,
188
BreakIterator
*breakiter,
189
UErrorCode
&status);
190
216
StringSearch
(
const
UnicodeString
&pattern,
CharacterIterator
&text,
217
const
Locale
&locale,
218
BreakIterator
*breakiter,
219
UErrorCode
&status);
220
246
StringSearch
(
const
UnicodeString
&pattern,
CharacterIterator
&text,
247
RuleBasedCollator
*coll,
248
BreakIterator
*breakiter,
249
UErrorCode
&status);
250
257
StringSearch
(
const
StringSearch
&that);
258
264
virtual
~
StringSearch
(
void
);
265
277
StringSearch
*clone()
const
;
278
279
// operator overloading ---------------------------------------------
280
287
StringSearch
&
operator=
(
const
StringSearch
&that);
288
297
virtual
UBool
operator==
(
const
SearchIterator
&that)
const
;
298
299
// public get and set methods ----------------------------------------
300
314
virtual
void
setOffset
(int32_t position,
UErrorCode
&status);
315
324
virtual
int32_t
getOffset
(
void
)
const
;
325
337
virtual
void
setText
(
const
UnicodeString
&text,
UErrorCode
&status);
338
353
virtual
void
setText
(
CharacterIterator
&text,
UErrorCode
&status);
354
364
RuleBasedCollator
* getCollator()
const
;
365
374
void
setCollator(
RuleBasedCollator
*coll,
UErrorCode
&status);
375
384
void
setPattern(
const
UnicodeString
&pattern,
UErrorCode
&status);
385
391
const
UnicodeString
& getPattern()
const
;
392
393
// public methods ----------------------------------------------------
394
403
virtual
void
reset
();
404
413
virtual
SearchIterator
*
safeClone
(
void
)
const
;
414
420
virtual
UClassID
getDynamicClassID
()
const
;
421
427
static
UClassID
U_EXPORT2 getStaticClassID();
428
429
protected
:
430
431
// protected method -------------------------------------------------
432
455
virtual
int32_t
handleNext
(int32_t position,
UErrorCode
&status);
456
479
virtual
int32_t
handlePrev
(int32_t position,
UErrorCode
&status);
480
481
private
:
482
StringSearch
();
// default constructor not implemented
483
484
// private data members ----------------------------------------------
485
490
UnicodeString
m_pattern_;
495
UStringSearch
*m_strsrch_;
496
497
};
498
499
U_NAMESPACE_END
500
501
#endif
/* #if !UCONFIG_NO_COLLATION */
502
503
#endif
504
Generated on Wed Oct 7 2015 21:17:57 for ICU 56.1 by
1.8.1.2