source: icGREP/icgrep-devel/icgrep/pablo/pe_ones.h @ 4388

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

Initial stage of pablo metadata inclusion.

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_ONES_H
8#define PE_ONES_H
9
10#include "pabloAST.h"
11
12namespace pablo {
13
14class Ones : public PabloAST {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::Ones;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    virtual ~Ones() {
24    }
25    virtual PabloAST * getOperand(const unsigned) const {
26        assert (false);
27        return nullptr;
28    }
29    virtual unsigned getNumOperands() const {
30        return 0;
31    }
32    virtual void setOperand(const unsigned, PabloAST *) {
33        assert (false);
34    }
35    inline bool operator==(const Ones & other) const {
36        return true;
37    }
38    virtual bool operator==(const PabloAST & other) const {
39        return isa<Ones>(other);
40    }
41protected:
42    Ones() : PabloAST(ClassTypeId::Ones) { }
43};
44
45}
46
47#endif // PE_ONES_H
48
49
Note: See TracBrowser for help on using the repository browser.