#pragma once class AbstractHookEngine { private: const char* name_; public: /* boolean for each hook test case, which are set by the hooks */ struct { bool small_; bool branch; bool rip_relative; bool avx; bool rdrand; bool loop; bool tail_recursion; }; public: AbstractHookEngine(const char* name) : name_(name), small_(false), branch(false), rip_relative(false), avx(false), rdrand(false), loop(false), tail_recursion(false) { } virtual bool hook_all() = 0; virtual bool unhook_all() = 0; bool all_hooked() { return small_ && branch && rip_relative && avx && rdrand && loop && tail_recursion; } const char* name() { return name_; } };