CmdGet: Added rules back

This commit is contained in:
Paul Beckingham 2016-07-16 14:21:13 -04:00
parent e964ea5076
commit 6171003466
5 changed files with 6 additions and 4 deletions

View file

@ -35,6 +35,7 @@
// Іdentify DOM references in cli, provide space-separated results.
int CmdGet (
const CLI& cli,
Rules& rules,
Database& database)
{
std::vector <std::string> results;
@ -45,7 +46,7 @@ int CmdGet (
{
std::string reference = arg.attribute ("raw");
std::string value;
if (! domGet (database, reference, value))
if (! domGet (database, rules, reference, value))
throw format ("DOM reference '{1}' is not valid.", reference);
results.push_back (value);

View file

@ -41,7 +41,7 @@ int CmdDiagnostics ( Rules&, Database&, const Extensions&);
int CmdExport (const CLI&, Rules&, Database& );
int CmdExtensions ( Rules&, const Extensions&);
int CmdGaps (const CLI&, Rules&, Database& );
int CmdGet (const CLI&, Database& );
int CmdGet (const CLI&, Rules&, Database& );
int CmdHelpUsage ( );
int CmdHelp (const CLI& );
int CmdImport ( );

View file

@ -35,6 +35,7 @@
////////////////////////////////////////////////////////////////////////////////
bool domGet (
Database& database,
const Rules& rules,
const std::string& reference,
std::string& value)
{

View file

@ -265,7 +265,7 @@ int dispatchCommand (
else if (command == "export") status = CmdExport (cli, rules, database );
else if (command == "extensions") status = CmdExtensions ( rules, extensions);
else if (command == "gaps") status = CmdGaps (cli, rules, database );
else if (command == "get") status = CmdGet (cli, database );
else if (command == "get") status = CmdGet (cli, rules, database );
else if (command == "help") status = CmdHelp (cli );
else if (command == "import") status = CmdImport ( );
else if (command == "join") status = CmdJoin (cli, rules, database );

View file

@ -91,6 +91,6 @@ std::string escape (const std::string&, int);
std::string quoteIfNeeded (const std::string&);
// dom.cpp
bool domGet (Database&, const std::string&, std::string&);
bool domGet (Database&, const Rules&, const std::string&, std::string&);
#endif