attention.hpp (b481d9055fc7a0f4feab7ca54dd8dc784e0091b2) | attention.hpp (3fb52e53551e528f4b2f53b053a7e996993d06d7) |
---|---|
1#pragma once 2 3#include <libpdbg.h> 4 | 1#pragma once 2 3#include <libpdbg.h> 4 |
5#include <attn/attn_config.hpp> 6 7#include <bitset> 8 |
|
5namespace attn 6{ 7 8/** @brief attention handler configuration flags */ 9inline constexpr uint32_t enableBreakpoints = 1; 10 11/** 12 * @brief These objects contain information about an active attention. --- 16 unchanged lines hidden (view full) --- 29 Vital = 2 30 }; 31 32 /** @brief Default constructor. */ 33 Attention() = delete; 34 35 /** @brief Main constructors */ 36 Attention(AttentionType i_type, int (*i_handler)(Attention*), | 9namespace attn 10{ 11 12/** @brief attention handler configuration flags */ 13inline constexpr uint32_t enableBreakpoints = 1; 14 15/** 16 * @brief These objects contain information about an active attention. --- 16 unchanged lines hidden (view full) --- 33 Vital = 2 34 }; 35 36 /** @brief Default constructor. */ 37 Attention() = delete; 38 39 /** @brief Main constructors */ 40 Attention(AttentionType i_type, int (*i_handler)(Attention*), |
37 pdbg_target* i_target, bool i_breakpoints); | 41 pdbg_target* i_target, Config* i_config); |
38 39 /** @brief Destructor */ 40 ~Attention() = default; 41 42 /** @brief Get attention priority */ 43 int getPriority() const; 44 | 42 43 /** @brief Destructor */ 44 ~Attention() = default; 45 46 /** @brief Get attention priority */ 47 int getPriority() const; 48 |
45 /** @brief Get configuration flags */ 46 uint32_t getFlags() const; | 49 /* @brief Get config object */ 50 Config* getConfig() const; |
47 | 51 |
48 /** @brief Set configuration flags */ 49 void setFlags(uint32_t i_flags); 50 | |
51 /* @brief Call attention handler function */ 52 int handle(); 53 54 /** @brief Copy constructor. */ 55 Attention(const Attention&) = default; 56 57 /** @brief Assignment operator. */ 58 Attention& operator=(const Attention&) = default; 59 60 /** @brief less than operator */ 61 bool operator<(const Attention& right) const; 62 63 private: 64 AttentionType iv_type; // attention type 65 int (*iv_handler)(Attention*); // handler function 66 pdbg_target* iv_target; // handler function target | 52 /* @brief Call attention handler function */ 53 int handle(); 54 55 /** @brief Copy constructor. */ 56 Attention(const Attention&) = default; 57 58 /** @brief Assignment operator. */ 59 Attention& operator=(const Attention&) = default; 60 61 /** @brief less than operator */ 62 bool operator<(const Attention& right) const; 63 64 private: 65 AttentionType iv_type; // attention type 66 int (*iv_handler)(Attention*); // handler function 67 pdbg_target* iv_target; // handler function target |
67 uint32_t iv_flags = 0; // configuration flags | 68 Config* iv_config; // configuration flags |
68}; 69 70} // namespace attn | 69}; 70 71} // namespace attn |