source: icGREP/icgrep-devel/icgrep/pablo/pe_zeroes.h @ 4543

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

Many memory deallocation fixes.

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