|
JSON Voorhees
Killer JSON for C++
|
An extractor which calls a function to perform extraction.
More...
#include <jsonv/serialization/function_extractor.hpp>
Inheritance diagram for jsonv::function_extractor< T, FExtract >:
Collaboration diagram for jsonv::function_extractor< T, FExtract >:Public Member Functions | |
| template<typename FUExtract > | |
| function_extractor (FUExtract &&func) | |
Public Member Functions inherited from jsonv::extractor_for< T > | |
| virtual const std::type_info & | get_type () const noexcept override |
| virtual std::expected< void, ast_node_type > | extract (extraction_context &context, reader &from, void *into) const override |
Protected Member Functions | |
| virtual std::expected< T, ast_node_type > | create (extraction_context &context, reader &from) const override |
Create an instance of T by reading from. | |
An extractor which calls a function to perform extraction.
The function may take any of the shapes detail::invoke_extract accepts and may return either a T or a std::expected<T, ast_node_type>.
Definition at line 31 of file function_extractor.hpp.
|
inlineexplicit |
Definition at line 36 of file function_extractor.hpp.
|
inlineoverrideprotectedvirtual |
Create an instance of T by reading from.
Implements jsonv::extractor_for< T >.
Definition at line 42 of file function_extractor.hpp.