source: icGREP/icgrep-devel/icgrep/re/re_diff.h @ 4907

Last change on this file since 4907 was 4516, checked in by nmedfort, 4 years ago

More memory leak fixes. All known leaks accounted for.

File size: 783 bytes
Line 
1#ifndef RE_DIFF_H
2#define RE_DIFF_H
3
4#include <re/re_re.h>
5#include <re/re_cc.h>
6
7namespace re {
8
9class Diff : public RE {
10public:
11    static inline bool classof(const RE * re) {
12        return re->getClassTypeId() == ClassTypeId::Diff;
13    }
14    static inline bool classof(const void *) {
15        return false;
16    }
17    RE * getLH() const {
18        return mLh;
19    }
20    void setLH(RE * lh) {
21        mLh = lh;
22    }
23    RE * getRH() const {
24        return mRh;
25    }
26    void setRH(RE * rh) {
27        mRh = rh;
28    }
29protected:
30    friend RE * makeDiff(RE*, RE*);
31    Diff(RE * lh, RE * rh)
32    : RE(ClassTypeId::Diff)
33    , mLh(lh)
34    , mRh(rh)
35    {
36
37    }
38    virtual ~Diff() {}
39private:
40    RE * mLh;
41    RE * mRh;
42};
43
44RE * makeDiff(RE * lh, RE * rh);
45}
46
47#endif // RE_DIFF_H
Note: See TracBrowser for help on using the repository browser.