Rules: Added file accessor

This commit is contained in:
Paul Beckingham 2016-03-19 09:15:27 -04:00
parent b1148a2b41
commit d5b12e8e27
2 changed files with 7 additions and 0 deletions

View file

@ -56,6 +56,12 @@ void Rules::load (const std::string& file, int nest /* = 1 */)
parse (contents, nest);
}
////////////////////////////////////////////////////////////////////////////////
std::string Rules::file () const
{
return _original_file;
}
////////////////////////////////////////////////////////////////////////////////
bool Rules::has (const std::string& key) const
{

View file

@ -36,6 +36,7 @@ class Rules
public:
Rules () = default;
void load (const std::string&, int next = 1);
std::string file () const;
bool has (const std::string&) const;
std::string get (const std::string&) const;