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