From a433ca308a12f42c87eed48bc3a55314d3c15bf4 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 13 Jun 2015 16:50:34 -0400 Subject: [PATCH] CLI2: Implemented A2::attribute for reading arg atts --- src/CLI2.cpp | 11 ++++++++--- src/CLI2.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 70d3c19b9..0d5e7c6de 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -162,6 +162,7 @@ void A2::attribute (const std::string& name, const double value) { _attributes[name] = format (value, 1, 8); } +*/ //////////////////////////////////////////////////////////////////////////////// // Accessor for attributes. @@ -175,6 +176,7 @@ const std::string A2::attribute (const std::string& name) const return ""; } +/* //////////////////////////////////////////////////////////////////////////////// void A2::removeAttribute (const std::string& name) { @@ -740,9 +742,12 @@ const std::string CLI2::dump (const std::string& title) const } out << "\n"; - out << " _args\n"; - for (auto& a : _args) - out << " " << a.dump () << "\n"; + if (_args.size ()) + { + out << " _args\n"; + for (auto& a : _args) + out << " " << a.dump () << "\n"; + } return out.str (); } diff --git a/src/CLI2.h b/src/CLI2.h index c4c3834f9..b288c575c 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -59,7 +59,9 @@ public: /* void attribute (const std::string&, const int); void attribute (const std::string&, const double); +*/ const std::string attribute (const std::string&) const; +/* void removeAttribute (const std::string&); */ const std::string dump () const;