Gromacs
2024.4
|
#include <gromacs/utility/include/gromacs/utility/message_string_collector.h>
Convenience class for creating a message context.
This class provides a RAII-style interface to the MessageStringCollector::startContext() and MessageStringCollector::finishContext() methods: finishContext() is called upon destruction of the object. This avoids the need to call MessageStringCollector::finishContext() on every possible exit point.
Example usage:
Public Member Functions | |
MessageStringContext (MessageStringCollector *collector, const char *name) | |
Adds a context for the given object. | |
MessageStringContext (MessageStringCollector *collector, const std::string &name) | |
Adds a context for the given object. | |
~MessageStringContext () | |
Calls MessageStringCollector::finishContext() on the wrapped object. | |