source: icGREP/icgrep-devel/icgrep/pablo/pe_all.h @ 4200

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

Replaced dynamic_cast with llvm::dyn_cast in pablo code; implemented make functions for pablo constructors. Disabled RTTI.

File size: 855 bytes
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_ALL_H
8#define PE_ALL_H
9
10#include "pe_pabloe.h"
11
12namespace pablo {
13
14class All : public PabloE {
15    friend All * make_all(bool value);
16public:
17    static inline bool classof(const PabloE * e) {
18        return e->getClassTypeId() == ClassTypeId::All;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23
24    virtual ~All() {
25
26    }
27
28    inline bool getValue() const {
29        return mValue;
30    }
31protected:
32    All(const bool value)
33    : PabloE(ClassTypeId::All)
34    , mValue(value)
35    {
36
37    }
38private:
39    const bool mValue;
40};
41
42inline All * make_all(bool value) {
43    return new All(value);
44}
45
46}
47
48#endif // PE_ALL_H
49
50
Note: See TracBrowser for help on using the repository browser.