Class FunctionCopier¶
Defined in File NamedValueCopier.hpp
Inheritance Relationships¶
Base Type¶
public mu::tiny::mock::NamedValueCopier(Class NamedValueCopier)
Class Documentation¶
-
class FunctionCopier : public mu::tiny::mock::NamedValueCopier¶
[source] NamedValueCopier backed by a plain function pointer.
Convenient when you want to keep copy logic in a standalone function.
Public Types
-
using CopyFunction = void (*)(void*, const void*)¶
Function type for the copy operation.
Public Functions
-
inline FunctionCopier(CopyFunction copier)¶
Construct from a plain copy function pointer.
- Parameters:
copier – Function that performs the copy.
-
inline virtual void copy(void *dst, const void *src) override¶
Copy the object at
ininto the buffer atout.Both pointers reference objects of the type associated with this copier.
- Parameters:
out – Destination buffer (already allocated by the caller).
in – Source object to copy from.
-
using CopyFunction = void (*)(void*, const void*)¶