CLI2: Implemented A2::attribute for reading arg atts
This commit is contained in:
11
src/CLI2.cpp
11
src/CLI2.cpp
@@ -162,6 +162,7 @@ void A2::attribute (const std::string& name, const double value)
|
|||||||
{
|
{
|
||||||
_attributes[name] = format (value, 1, 8);
|
_attributes[name] = format (value, 1, 8);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Accessor for attributes.
|
// Accessor for attributes.
|
||||||
@@ -175,6 +176,7 @@ const std::string A2::attribute (const std::string& name) const
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void A2::removeAttribute (const std::string& name)
|
void A2::removeAttribute (const std::string& name)
|
||||||
{
|
{
|
||||||
@@ -740,9 +742,12 @@ const std::string CLI2::dump (const std::string& title) const
|
|||||||
}
|
}
|
||||||
out << "\n";
|
out << "\n";
|
||||||
|
|
||||||
out << " _args\n";
|
if (_args.size ())
|
||||||
for (auto& a : _args)
|
{
|
||||||
out << " " << a.dump () << "\n";
|
out << " _args\n";
|
||||||
|
for (auto& a : _args)
|
||||||
|
out << " " << a.dump () << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
return out.str ();
|
return out.str ();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ public:
|
|||||||
/*
|
/*
|
||||||
void attribute (const std::string&, const int);
|
void attribute (const std::string&, const int);
|
||||||
void attribute (const std::string&, const double);
|
void attribute (const std::string&, const double);
|
||||||
|
*/
|
||||||
const std::string attribute (const std::string&) const;
|
const std::string attribute (const std::string&) const;
|
||||||
|
/*
|
||||||
void removeAttribute (const std::string&);
|
void removeAttribute (const std::string&);
|
||||||
*/
|
*/
|
||||||
const std::string dump () const;
|
const std::string dump () const;
|
||||||
|
|||||||
Reference in New Issue
Block a user