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

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

Corrected some uninitialized value usage; -Wall reports hundreds in unicode_categories.h; these were not fixed.

File size: 1012 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_pabloe.h>
11#include <pablo/pe_string.h>
12
13namespace pablo {
14
15class Assign : public PabloE {
16    friend class PabloBlock;
17public:
18    static inline bool classof(const PabloE * 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 std::string & getName() const {
27        return *mName;
28    }
29    inline PabloE * getExpr() const {
30        return mExpr;
31    }
32protected:
33    Assign(PabloE * name, PabloE * expr)
34    : PabloE(ClassTypeId::Assign)
35    , mName(cast<String>(name))
36    , mExpr(expr)
37    {
38
39    }
40private:
41    const String * const    mName;
42    PabloE * const          mExpr;
43};
44
45}
46
47#endif // PS_SETMARKER_H
48
Note: See TracBrowser for help on using the repository browser.