CLI2: Added ::getToken method for obtaining the canonical form, if possible
This commit is contained in:
10
src/CLI2.cpp
10
src/CLI2.cpp
@@ -137,6 +137,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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user