HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 #include "UT_NonCopyable.h"
17 #include <SYS/SYS_Types.h>
18 
19 class ut_CompiledMMPatternImpl;
20 
22 {
23 public:
24  UT_StringMMPattern() : myImpl(0) {}
25  ~UT_StringMMPattern() { clear(); }
27 
28  bool isEmpty() const { return myImpl == NULL; }
29  void clear();
30  void compileInPlace(char *pattern_buffer, bool case_sensitive = true,
31  const char *separators = ", ");
32  void compileInPlace(char *pattern_buffer, bool case_sensitive,
33  char separator)
34  {
35  char separators[2];
36  separators[0] = separator;
37  separators[1] = 0;
38  compileInPlace(pattern_buffer, case_sensitive, separators);
39  }
40  void compile(const char *pattern_buffer, bool case_sensitive = true,
41  const char *separators = ", ");
42  void compile(const char *pattern_buffer, bool case_sensitive,
43  char separator)
44  {
45  char separators[2];
46  separators[0] = separator;
47  separators[1] = 0;
48  compile(pattern_buffer, case_sensitive, 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
void compileInPlace(char *pattern_buffer, bool case_sensitive, char separator)
#define UT_API
Definition: UT_API.h:14
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
long long int64
Definition: SYS_Types.h:116
void compile(const char *pattern_buffer, bool case_sensitive, char separator)