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

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

Initial introduction of a PabloFunction? type.

File size: 993 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    }
33    bool superfluous() const;
34protected:
35    explicit Assign(PabloAST * expr, String * name)
36    : Statement(ClassTypeId::Assign, {expr}, name)
37    {
38
39    }
40};
41
42}
43
44#endif // PS_SETMARKER_H
45
Note: See TracBrowser for help on using the repository browser.