Class SetPointerPlugin¶
Defined in File SetPointerPlugin.hpp
Inheritance Relationships¶
Base Type¶
public mu::tiny::test::Plugin(Class Plugin)
Class Documentation¶
-
class SetPointerPlugin : public mu::tiny::test::Plugin¶
[source] Plugin that restores pointer variables to their original values.
Up to max_set pointers may be registered per test. The plugin records the address of each pointer variable before it is overwritten; on post_test_action() it writes the saved address back.
Public Functions
Public Static Functions
-
template<typename T>
static inline void set_pointer(T *&a, T *b)¶ Save the original value of
a, then seta=b.The original value is restored automatically at end-of-test via post_test_action(). Prefer the MUTINY_PTR_SET macro.
- Template Parameters:
T – Pointee type; deduced from
a.- Parameters:
a – Reference to the pointer variable to overwrite.
b – New value to assign to
a.
Public Static Attributes
-
static size_t max_set = 32¶
Maximum number of pointers that can be registered per test.
-
template<typename T>