source: icGREP/icgrep-devel/icgrep/pablo/pe_var.h @ 4771

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

Initial introduction of a PabloFunction? type.

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 PE_VAR_H
8#define PE_VAR_H
9
10#include <pablo/pabloAST.h>
11#include <pablo/ps_assign.h>
12#include <pablo/pe_next.h>
13#include <pablo/pe_string.h>
14#include <stdexcept>
15
16namespace llvm {
17    class Value;
18    class BasicBlock;
19}
20
21namespace pablo {
22
23class Var : public PabloAST {
24    friend class PabloBlock;
25    friend class And;
26    friend class Or;
27    friend class Not;
28    friend class Sel;
29    friend class Xor;
30    friend class Zeroes;
31    friend class Ones;
32public:
33    static inline bool classof(const PabloAST * e) {
34        return e->getClassTypeId() == ClassTypeId::Var;
35    }
36    static inline bool classof(const void *) {
37        return false;
38    }
39    virtual ~Var(){
40    }
41    inline const String * getName() const {
42        return mName;
43    }
44protected:
45    Var(PabloAST * var)
46    : PabloAST(ClassTypeId::Var)
47    , mName(cast<String>(var)) {
48
49    }
50private:
51    const String *     mName;
52};
53
54}
55
56
57
58#endif // PE_VAR_H
59
60
Note: See TracBrowser for help on using the repository browser.