COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
covise_regexp.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef COVISE_REGEXP_H
9 #define COVISE_REGEXP_H
10 
11 #if defined(_MSC_VER) || defined(MINGW)
12 #include "regex/regex.h"
13 #else
14 #include <regex.h>
15 #endif
16 
17 #include "coExport.h"
18 
19 namespace covise
20 {
21 
23 {
24  static const int maxmatches_ = 30;
25  regmatch_t matches_[maxmatches_];
26  regex_t preg_;
27  char *line_;
28 
29 public:
30  CoviseRegexp(const char *regexp);
31  ~CoviseRegexp();
32  bool isMatching(const char *line);
33  char *getMatchString(int position);
34  int getMatchInt(int position);
35  double getMatchFloat(int position);
36 };
37 }
38 #endif
regex_t preg_
Definition: covise_regexp.h:26
#define UTILEXPORT
Definition: coExport.h:194
Definition: covise_regexp.h:22
char * line_
Definition: covise_regexp.h:27