xentara-plugin v2.0.4
The Xentara Plugin Framework
|
Object for custom handling. More...
#include <xentara/config/CustomResolver.hpp>
Public Member Functions | |
Committer (CustomResolver &resolver) | |
Creates an object for handling the requests of a specific resolver. | |
~Committer () noexcept(false) | |
Destructor. | |
auto | handle (std::string_view key, Reference object) |
Handles the submitted requests for a specific object. | |
auto | finish () |
Finishes the handling. | |
Object for custom handling.
xentara::config::CustomResolver< Reference >::Committer::Committer | ( | CustomResolver & | resolver | ) |
Creates an object for handling the requests of a specific resolver.
resolver | The resolver |
xentara::config::CustomResolver< Reference >::Committer::~Committer | ( | ) |
Destructor.
This destructor will throw any pending exceptions if the termination cannot be written. To prevent termination of the program, no exceptions are thrown during stack windup, though. You can prevent the destructor from throwing any exceptions by finishing the process manually beforehand using finish().
std::runtime_error | An error occurred writing to the stream |
auto xentara::config::CustomResolver< Reference >::Committer::finish | ( | ) |
Finishes the handling.
This function must can be called to finish the committing before the destructor is called. This will throw any pending exceptions right away, instead of in the destructor.
auto xentara::config::CustomResolver< Reference >::Committer::handle | ( | std::string_view | key, |
Reference | object | ||
) |
Handles the submitted requests for a specific object.
This function allows you to implement your own commit logic. You must call this function once for each object that can be resolved. You must call finishCommit() after all objects have been committed.