Leosac  0.8.0
Open Source Access Control
Leosac::Tools::XmlNodeNameEnforcer Class Reference

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>

+ Collaboration diagram for Leosac::Tools::XmlNodeNameEnforcer:

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ XmlNodeNameEnforcer()

XmlNodeNameEnforcer::XmlNodeNameEnforcer ( const std::string &  path)

Definition at line 29 of file XmlNodeNameEnforcer.cpp.

Member Function Documentation

◆ enforce()

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.

◆ operator()()

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.

Member Data Documentation

◆ path_

std::string Leosac::Tools::XmlNodeNameEnforcer::path_
private

Definition at line 53 of file XmlNodeNameEnforcer.hpp.


The documentation for this class was generated from the following files: