source: icGREP/icgrep-devel/icgrep-1.00/re/re_any.h @ 4529

Last change on this file since 4529 was 4245, checked in by cameron, 5 years ago

Introduce RE::Any for '.' regexp

File size: 666 bytes
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef ANY_H
8#define ANY_H
9
10#include "re_re.h"
11
12#include "re_re.h"
13
14namespace re {
15
16class Any : public RE {
17public:
18    static inline bool classof(const RE * re) {
19        return re->getClassTypeId() == ClassTypeId::Any;
20    }
21    static inline bool classof(const void *) {
22        return false;
23    }
24protected:
25    friend Any * makeAny();
26    Any() : RE(ClassTypeId::Any) {}
27    virtual ~Any() {}
28};
29
30inline Any * makeAny() {
31    return new Any();
32}
33
34}
35
36#endif // ANY_H
Note: See TracBrowser for help on using the repository browser.