Class FunctionCopier

Inheritance Relationships

Base Type

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 in into the buffer at out.

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.