HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_StringMMPattern.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_StringMMPattern.h
7  *
8  * COMMENTS:
9  * Class holding a compiled pattern for UT_String::multiMatch().
10  */
11 
12 #ifndef __UT_StringMMPattern_h__
13 #define __UT_StringMMPattern_h__
14 
15 #include "UT_API.h"
16 
17 #include <SYS/SYS_Types.h>
18 #include "UT_NonCopyable.h"
19 
20 class ut_CompiledMMPatternImpl;
21 
23 {
24 public:
25  UT_StringMMPattern() : myImpl(0) {}
26  ~UT_StringMMPattern() { clear(); }
27 
28  bool isEmpty() const { return myImpl == NULL; }
29  void clear();
30  void compileInPlace(char *pattern_buffer, int caseSensitive = 1,
31  const char *separators = ", ");
32  void compileInPlace(char *pattern_buffer, int caseSensitive,
33  char separator)
34  {
35  char separators[2];
36  separators[0] = separator;
37  separators[1] = 0;
38  compileInPlace(pattern_buffer, caseSensitive, separators);
39  }
40  void compile(const char *pattern_buffer, int caseSensitive = 1,
41  const char *separators = ", ");
42  void compile(const char *pattern_buffer, int caseSensitive,
43  char separator)
44  {
45  char separators[2];
46  separators[0] = separator;
47  separators[1] = 0;
48  compile(pattern_buffer, caseSensitive, separators);
49  }
50 
51  int64 getMemoryUsage(bool inclusive) const;
52 
53 private:
54  ut_CompiledMMPatternImpl *myImpl;
55 
56  friend class UT_String;
57 };
58 
59 #endif
#define UT_API
Definition: UT_API.h:12
void compile(const char *pattern_buffer, int caseSensitive, char separator)
long long int64
Definition: SYS_Types.h:106
void compileInPlace(char *pattern_buffer, int caseSensitive, char separator)