Leosac
0.8.0
Open Source Access Control
|
This class is a simple wrapper that throws a ConfigException message formated to report the user that an invalid xml node name has been encountered. More...
#include <XmlNodeNameEnforcer.hpp>
Public Member Functions | |
XmlNodeNameEnforcer (const std::string &path) | |
void | enforce (const std::string &expected, const std::string &actual) const |
Check that actual is equal to expected, otherwise throws a ConfigException with a meaningful message. More... | |
void | operator() (const std::string &expected, const std::string &actual) const |
Forward the call to enforce() . More... | |
Private Attributes | |
std::string | path_ |
This class is a simple wrapper that throws a ConfigException message formated to report the user that an invalid xml node name has been encountered.
The class expect the path to the xml file, in order to pass it to the ConfigException constructor.
Definition at line 36 of file XmlNodeNameEnforcer.hpp.
XmlNodeNameEnforcer::XmlNodeNameEnforcer | ( | const std::string & | path | ) |
Definition at line 29 of file XmlNodeNameEnforcer.cpp.
void XmlNodeNameEnforcer::enforce | ( | const std::string & | expected, |
const std::string & | actual | ||
) | const |
Check that actual is equal to expected, otherwise throws a ConfigException with a meaningful message.
Definition at line 34 of file XmlNodeNameEnforcer.cpp.
void XmlNodeNameEnforcer::operator() | ( | const std::string & | expected, |
const std::string & | actual | ||
) | const |
Forward the call to enforce()
.
Definition at line 47 of file XmlNodeNameEnforcer.cpp.
|
private |
Definition at line 53 of file XmlNodeNameEnforcer.hpp.