source: icGREP/icgrep-devel/icgrep/pablo/pe_scanthru.h @ 4214

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

Partial implementation of 'PabloBuilder?'.

File size: 1.1 KB
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 PS_SCANTHRU_H
8#define PS_SCANTHRU_H
9
10#include <pablo/pe_pabloe.h>
11
12namespace pablo {
13
14class ScanThru : public  PabloE {
15    friend PabloE * makeScanThru(PabloE *, PabloE *);
16    friend struct CodeGenState;
17public:
18    static inline bool classof(const PabloE * e) {
19        return e->getClassTypeId() == ClassTypeId::ScanThru;
20    }
21    static inline bool classof(const void *) {
22        return false;
23    }
24    ScanThru(PabloE * from, PabloE * thru)
25    : PabloE(ClassTypeId::ScanThru)
26    , mScanFrom(from)
27    , mScanThru(thru)
28    {
29
30    }
31    virtual ~ScanThru() {
32    }
33    PabloE * getScanFrom() const {
34        return mScanFrom;
35    }
36    PabloE * getScanThru() const {
37        return mScanThru;
38    }
39private:
40    PabloE * const mScanFrom;
41    PabloE * const mScanThru;
42};
43
44inline PabloE * makeScanThru(PabloE * from, PabloE * thru) {
45    return new ScanThru(from, thru);
46}
47
48}
49
50#endif // PS_SCANTHRU_H
51
52
53
Note: See TracBrowser for help on using the repository browser.