CmdGet: Implemented 'get' command for one DOM ref

This commit is contained in:
Paul Beckingham 2016-07-16 10:26:09 -04:00
parent 9250be3e72
commit 92731c889c
2 changed files with 16 additions and 5 deletions

View file

@ -14,6 +14,7 @@ set (timew_SRCS CLI.cpp CLI.h
Range.cpp Range.h
Rules.cpp Rules.h
data.cpp
dom.cpp
init.cpp
helper.cpp
log.cpp

View file

@ -27,6 +27,7 @@
#include <cmake.h>
#include <commands.h>
#include <timew.h>
#include <format.h>
#include <iostream>
////////////////////////////////////////////////////////////////////////////////
@ -35,14 +36,23 @@ int CmdGet (
Rules& rules,
Database& database)
{
// TODO Join results together with spaces.
// Іdentify DOM references in cli.
/*
for (each DOM reference in cli)
for (auto& arg : cli._args)
{
std::string value;
domGet (database, reference, value);
if (arg.hasTag ("TAG") &&
arg.hasTag ("FILTER"))
{
std::string reference = arg.attribute ("raw");
std::string value;
if (! domGet (database, reference, value))
throw format ("DOM reference '{1}' is not valid.", reference);
std::cout << value << '\n';
}
}
*/
return 0;
}