diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-27 09:12:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-27 09:12:50 -0400 |
commit | 5653b2a033e7a4173d2f178b5ce52384666d3d7b (patch) | |
tree | 5c8fc7282ad1ce0c215786a70b35296645df2a1b /tests/dum.h | |
parent | 3d0133c2f793e82d7519d8e2c5023114cd0f0eab (diff) | |
parent | a4dd1f00a5d0108058fb3bfbd5f399a507792859 (diff) |
Merge pull request #68 from bdunahu/bdunahu
[WIP] Pipeline cleanup and revisited GUI storage display
Diffstat (limited to 'tests/dum.h')
-rw-r--r-- | tests/dum.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/dum.h b/tests/dum.h new file mode 100644 index 0000000..e60ffad --- /dev/null +++ b/tests/dum.h @@ -0,0 +1,35 @@ +#ifndef DUM_H +#define DUM_H + +#include "instrDTO.h" +#include "response.h" +#include "stage.h" + +/** + * Don't underestimate mocks (the DUM pipe stage). + */ +class DUM : public Stage +{ + public: + using Stage::Stage; + + InstrDTO *advance(Response p) override + { + InstrDTO *r = nullptr; + + if (this->curr_instr && p == READY) { + r = new InstrDTO(*this->curr_instr); + delete this->curr_instr; + curr_instr = nullptr; + } + + return r; + } + + void set_curr_instr(InstrDTO *d) { this->curr_instr = d; }; + + private: + void advance_helper() override{}; +}; + +#endif /* DUM_H_INCLUDED */ |