Merge branch 'master' of https://scm.cri.ensmp.fr/git/Faustine
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / architecture / osclib / faust / src / lib / OSCRegexp.h
1 /*
2
3 Copyright (C) 2010 Grame
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
20 research@grame.fr
21
22 */
23
24 #ifndef __OSCRegexp__
25 #define __OSCRegexp__
26
27 #include <string>
28 #include "deelx.h"
29
30 namespace oscfaust
31 {
32
33 //--------------------------------------------------------------------------
34 /*!
35 \brief a wrapper over the deelx regexp library
36
37
38 */
39 class OSCRegexp
40 {
41 CRegexpT<char> fRegexp;
42
43 static std::string OSCRe2Re (const char* oscre); // translates an OSC regexp into a regexp
44 public:
45 OSCRegexp (const char* oscre);
46 virtual ~OSCRegexp() {}
47
48 bool match (const char* str) const;
49 };
50
51 }
52
53 #endif
54