debug.hh (756B)
1 #ifndef debug_hh_INCLUDED 2 #define debug_hh_INCLUDED 3 4 #include "array.hh" 5 #include "enum.hh" 6 7 namespace Kakoune 8 { 9 10 class StringView; 11 12 enum class DebugFlags 13 { 14 None = 0, 15 Hooks = 1 << 0, 16 Shell = 1 << 1, 17 Profile = 1 << 2, 18 Keys = 1 << 3, 19 Commands = 1 << 4, 20 }; 21 22 constexpr bool with_bit_ops(Meta::Type<DebugFlags>) { return true; } 23 24 constexpr auto enum_desc(Meta::Type<DebugFlags>) 25 { 26 return make_array<EnumDesc<DebugFlags>>({ 27 { DebugFlags::Hooks, "hooks" }, 28 { DebugFlags::Shell, "shell" }, 29 { DebugFlags::Profile, "profile" }, 30 { DebugFlags::Keys, "keys" }, 31 { DebugFlags::Commands, "commands" }, 32 }); 33 } 34 35 void write_to_debug_buffer(StringView str); 36 37 } 38 39 #endif // debug_hh_INCLUDED