Attribute: Define a function to be called after the object (which can but need not be a struct member) is serialized.
More...
#include <uSer.hh>
template<auto Ref>
struct uSer::Hook::SerPost< Ref >
Attribute: Define a function to be called after the object (which can but need not be a struct member) is serialized.
The function can be:
- A non-static constant member function of the surrounding struct
- A free function (=function pointer)
- A static member function of any class (=function pointer)
- A pointer to a global object that has operator () overloaded
- If the annotated object is a struct, and the annotation is not given as a member annotation of a surrounding struct, the reference may be a non-static constant member function of that struct.
The return type can be:
- void, in which case the function may indicate errors via exceptions, but not fail otherwise
- uSer_ErrorCode, in which case the function may indicate errors by the returned value or via exceptions (if enabled). If the function indicates an error via a return value and exceptions are enabled, uSer will throw an exception that forwards the error code.
A constant reference to the annotated object is passed as the first argument. For cases 2-4, a constant reference to the struct is passed as a second argument, if the attribute was applied to a struct member.
The documentation for this struct was generated from the following file:
- /home/erlkoenig/Projects/CPP/uSer/uSer/uSer.hh