source: icGREP/icgrep-devel/icgrep/pablo/pe_xor.h @ 5202

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

Initial work on adding types to PabloAST and mutable Var objects.

File size: 1.0 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 XOR_H
8#define XOR_H
9
10#include <pablo/pabloAST.h>
11
12namespace pablo {
13
14class Xor : public Variadic {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::Xor;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23protected:
24    Xor(Type * const type, PabloAST * expr1, PabloAST * expr2, const String * name)
25    : Variadic(ClassTypeId::Xor, type, {expr1, expr2}, name)
26    {
27
28    }
29    Xor(Type * const type, const unsigned reserved, const String * name)
30    : Variadic(ClassTypeId::Xor, type, reserved, name)
31    {
32
33    }
34    template<typename iterator>
35    Xor(Type * const type, iterator begin, iterator end, const String * name)
36    : Variadic(ClassTypeId::Xor, type, begin, end, name) {
37
38    }
39};
40
41}
42
43#endif // XOR_H
44
45
46
Note: See TracBrowser for help on using the repository browser.