DOM: Demoted from class to functions

- The DOM object contains no members, and only two (effectively) const methods.
  Demoting DOM to function calls reduces coupling with Context.
This commit is contained in:
Paul Beckingham 2016-02-03 21:54:37 -05:00
parent ec4e6af00d
commit 820cc4b2e5
7 changed files with 14 additions and 21 deletions

View file

@ -28,6 +28,7 @@
#include <CmdGet.h>
#include <Variant.h>
#include <Context.h>
#include <DOM.h>
#include <main.h>
#include <text.h>
#include <i18n.h>
@ -67,7 +68,7 @@ int CmdGet::execute (std::string& output)
{
Task t;
Variant result;
if (context.dom.get (arg.attribute ("raw"), t, result))
if (getDOM (arg.attribute ("raw"), t, result))
results.push_back ((std::string) result);
else
results.push_back ("");