source: icGREP/icgrep-devel/icgrep-1.00/pablo/pe_sel.h @ 4529

Last change on this file since 4529 was 4438, checked in by nmedfort, 4 years ago

Preliminary steps for removal of superfluous Assigns.

File size: 1.0 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 PE_SEL_H
8#define PE_SEL_H
9
10#include <pablo/pabloAST.h>
11
12namespace pablo {
13
14class Sel : public Statement {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::Sel;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    virtual ~Sel() {
24    }
25    inline PabloAST * getCondition() const {
26        return getOperand(0);
27    }
28    inline PabloAST * getTrueExpr() const {
29        return getOperand(1);
30    }
31    inline PabloAST * getFalseExpr() const {
32        return getOperand(2);
33    }
34protected:
35    Sel(PabloAST* if_expr, PabloAST* t_expr, PabloAST* f_expr, String * name, PabloBlock * parent)
36    : Statement(ClassTypeId::Sel, {if_expr, t_expr, f_expr}, name, parent)
37    {
38
39    }
40};
41
42}
43
44#endif // PE_SEL_H
45
Note: See TracBrowser for help on using the repository browser.