2021-09-25 21:31:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "test_pattern.hpp"
|
|
|
|
|
|
|
|
namespace hex::test {
|
|
|
|
|
|
|
|
class TestPatternPointers : public TestPattern {
|
|
|
|
public:
|
|
|
|
TestPatternPointers() : TestPattern("Pointers") {
|
|
|
|
// placementPointer
|
|
|
|
{
|
2021-10-03 10:32:58 +00:00
|
|
|
auto placementPointer = create<PatternDataPointer>("", "placementPointer", 0x0C, sizeof(u8), nullptr);
|
|
|
|
auto pointedTo = create<PatternDataUnsigned>("u32", "", 0x49, sizeof(u32), nullptr);
|
2021-09-25 21:31:37 +00:00
|
|
|
placementPointer->setPointedAtPattern(pointedTo);
|
|
|
|
addPattern(placementPointer);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
~TestPatternPointers() override = default;
|
|
|
|
|
|
|
|
[[nodiscard]]
|
|
|
|
std::string getSourceCode() const override {
|
|
|
|
return R"(
|
|
|
|
u32 *placementPointer : u8 @ 0x0C;
|
|
|
|
)";
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|