source: icGREP/icgrep-devel/icgrep/pablo/pe_integer.h @ 5217

Last change on this file since 5217 was 5217, checked in by nmedfort, 2 years ago

Merged PabloFunction? and PabloKernel? classes. Updated projects where necessary.

File size: 668 bytes
Line 
1#ifndef PE_INTEGER_H
2#define PE_INTEGER_H
3
4#include <pablo/pabloAST.h>
5
6namespace pablo {
7
8class Integer : public PabloAST {
9    friend class SymbolGenerator;
10public:
11
12
13    static inline bool classof(const PabloAST * e) {
14        return e->getClassTypeId() == ClassTypeId::Integer;
15    }
16    static inline bool classof(const void *) {
17        return false;
18    }
19    virtual ~Integer(){
20
21    }
22    inline int64_t value() const {
23        return mValue;
24    }
25protected:
26    Integer(const int64_t value, Type * type) noexcept
27    : PabloAST(ClassTypeId::Integer, type, nullptr)
28    , mValue(value)
29    {
30
31    }
32private:
33    int64_t mValue;
34};
35
36}
37
38#endif // PE_INTEGER_H
Note: See TracBrowser for help on using the repository browser.