Build without warnings
[satcheck.git] / change.h
1 /*      Copyright (c) 2015 Regents of the University of California
2  *
3  *      Author: Brian Demsky <bdemsky@uci.edu>
4  *
5  *      This program is free software; you can redistribute it and/or
6  *      modify it under the terms of the GNU General Public License
7  *      version 2 as published by the Free Software Foundation.
8  */
9
10 #ifndef CHANGE_H
11 #define CHANGE_H
12 #include "classlist.h"
13 #include "mymemory.h"
14 #include <stdint.h>
15 #include "eprecord.h"
16
17 class MCChange {
18 public:
19         MCChange(EPRecord *record, uint64_t _val, unsigned int _index);
20         ~MCChange();
21         EPRecord *getRecord() {return record;}
22         int getIndex() {return index;}
23         uint64_t getValue() {return val;}
24         bool isRMW() {return record->getType()==RMW;}
25         bool isFunction() {return record->getType()==FUNCTION;}
26         bool isEquals() {return record->getType()==EQUALS;}
27         bool isLoad() {return record->getType()==LOAD;}
28         bool isStore() {return record->getType()==STORE;}
29         void print();
30         MEMALLOC;
31
32 private:
33         EPRecord *record;
34         uint64_t val;
35         unsigned int index;
36         friend bool MCChangeEquals(MCChange *mcc1, MCChange *mcc2);
37         friend unsigned int MCChangeHash(MCChange *mcc);
38 };
39
40 bool MCChangeEquals(MCChange *mcc1, MCChange *mcc2);
41 unsigned int MCChangeHash(MCChange *mcc);
42 #endif