CLI: Added A2:getToken

This commit is contained in:
Paul Beckingham 2016-04-02 15:41:25 -04:00
parent d596936667
commit 021297edd5
2 changed files with 11 additions and 0 deletions

View file

@ -80,6 +80,16 @@ const std::string A2::attribute (const std::string& name) const
return "";
}
////////////////////////////////////////////////////////////////////////////////
const std::string A2::getToken () const
{
auto i = _attributes.find ("canonical");
if (i == _attributes.end ())
i = _attributes.find ("raw");
return i->second;
}
////////////////////////////////////////////////////////////////////////////////
const std::string A2::dump () const
{

View file

@ -42,6 +42,7 @@ public:
void unTag (const std::string&);
void attribute (const std::string&, const std::string&);
const std::string attribute (const std::string&) const;
const std::string getToken () const;
const std::string dump () const;
public: