source: icGREP/icgrep-devel/icgrep/pablo/pe_not.h @ 4200

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

Replaced dynamic_cast with llvm::dyn_cast in pablo code; implemented make functions for pablo constructors. Disabled RTTI.

File size: 827 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_NOT_H
8#define PE_NOT_H
9
10#include "pe_pabloe.h"
11
12namespace pablo {
13
14class Not : public PabloE {
15    friend PabloE * make_not(PabloE *);
16public:
17    static inline bool classof(const PabloE * e) {
18        return e->getClassTypeId() == ClassTypeId::Not;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23
24
25    ~Not() {
26        delete mExpr;
27    }
28    PabloE * getExpr() const {
29        return mExpr;
30    }
31protected:
32    Not(PabloE * expr)
33    : PabloE(ClassTypeId::Not)
34    , mExpr(expr) {
35
36    }
37private:
38    PabloE * const mExpr;
39};
40
41PabloE * make_not(PabloE * expr);
42
43}
44
45#endif // PE_NOT_H
46
47
Note: See TracBrowser for help on using the repository browser.