source: icGREP/icgrep-devel/icgrep/pablo/pe_charclass.h @ 4215

Last change on this file since 4215 was 4215, checked in by nmedfort, 5 years ago

Removed string based CC lookup in CC Compiler.

File size: 915 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 PE_CHARCLASS_H
8#define PE_CHARCLASS_H
9
10#include <pablo/pe_pabloe.h>
11#include <pablo/pe_string.h>
12
13namespace pablo {
14
15class CharClass : public PabloE {
16    friend struct CodeGenState;
17public:
18    static inline bool classof(const PabloE * e) {
19        return e->getClassTypeId() == ClassTypeId::CharClass;
20    }
21    static inline bool classof(const void *) {
22        return false;
23    }
24    virtual ~CharClass(){
25    }
26    inline const std::string & getCharClass() const {
27        return *mCharClass;
28    }
29protected:
30    CharClass(const PabloE * cc)
31    : PabloE(ClassTypeId::CharClass)
32    , mCharClass(cast<String>(cc))
33    {
34
35    }
36private:
37    const String * const mCharClass;
38};
39
40}
41
42#endif // PE_CHARCLASS_H
43
44
Note: See TracBrowser for help on using the repository browser.