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

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

Temporary check-in for Pablo Use Analysis.

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_SETMARKER_H
8#define PS_SETMARKER_H
9
10#include <pablo/pe_string.h>
11
12namespace pablo {
13
14class Assign : public PabloAST {
15    friend class PabloBlock;
16    friend class Next;
17public:
18    static inline bool classof(const PabloAST * e) {
19        return e->getClassTypeId() == ClassTypeId::Assign;
20    }
21    static inline bool classof(const void *) {
22        return false;
23    }
24    virtual ~Assign() {
25    }
26    inline const String * getName() const {
27        return mName;
28    }
29    inline PabloAST * getExpr() const {
30        return mExpr;
31    }
32    inline bool isOutput() const {
33        return mIsOutput;
34    }
35protected:
36    Assign(PabloAST * name, PabloAST * expr, const bool isOutput)
37    : PabloAST(ClassTypeId::Assign)
38    , mName(cast<String>(name))
39    , mExpr(expr)
40    , mIsOutput(isOutput)
41    {
42
43    }
44private:
45    String * const          mName;
46    PabloAST * const        mExpr;
47    const bool              mIsOutput;
48};
49
50}
51
52#endif // PS_SETMARKER_H
53
Note: See TracBrowser for help on using the repository browser.