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