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

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

Initial introduction of a PabloFunction? type.

File size: 1.1 KB
RevLine 
[3850]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
[4244]10#include <pablo/pabloAST.h>
[4211]11#include <pablo/ps_assign.h>
[4264]12#include <pablo/pe_next.h>
[4213]13#include <pablo/pe_string.h>
[4264]14#include <stdexcept>
[3850]15
[4264]16namespace llvm {
17    class Value;
18    class BasicBlock;
19}
20
[4199]21namespace pablo {
22
[4244]23class Var : public PabloAST {
[4227]24    friend class PabloBlock;
[4404]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;
[3850]32public:
[4244]33    static inline bool classof(const PabloAST * e) {
[4200]34        return e->getClassTypeId() == ClassTypeId::Var;
[4199]35    }
[4200]36    static inline bool classof(const void *) {
37        return false;
38    }
[4199]39    virtual ~Var(){
40    }
[4257]41    inline const String * getName() const {
42        return mName;
[4199]43    }
[4200]44protected:
[4650]45    Var(PabloAST * var)
[4244]46    : PabloAST(ClassTypeId::Var)
[4650]47    , mName(cast<String>(var)) {
[4657]48
[4200]49    }
[3850]50private:
[4280]51    const String *     mName;
[3850]52};
53
[4199]54}
55
56
57
[3850]58#endif // PE_VAR_H
59
60
Note: See TracBrowser for help on using the repository browser.