source: icGREP/icgrep-devel/icgrep/pablo/ps_assign.h @ 4685

Last change on this file since 4685 was 4658, checked in by nmedfort, 4 years ago

Removed 'superfluous()' function from Assign nodes.

File size: 963 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_SETMARKER_H
8#define PS_SETMARKER_H
9
10#include <pablo/pe_string.h>
11
12namespace pablo {
13
14class Assign : public Statement {
15    friend class PabloBlock;
16    friend class Next;
17    friend class Var;
18public:
19    static inline bool classof(const PabloAST * e) {
20        return e->getClassTypeId() == ClassTypeId::Assign;
21    }
22    static inline bool classof(const void *) {
23        return false;
24    }
25    virtual ~Assign() {
26    }
27    inline PabloAST * getExpression() const {
28        return getOperand(0);
29    }
30    inline void setExpression(PabloAST * value) {
31        return setOperand(0, value);
32    }
33protected:
34    explicit Assign(PabloAST * expr, String * name)
35    : Statement(ClassTypeId::Assign, {expr}, name)
36    {
37
38    }
39};
40
41}
42
43#endif // PS_SETMARKER_H
44
Note: See TracBrowser for help on using the repository browser.