- Implemented A class, to represent a single argument. Much like a tree node.
This commit is contained in:
Paul Beckingham 2014-10-15 00:28:16 -04:00
parent 8b78251735
commit b98da56a7c
2 changed files with 133 additions and 0 deletions

View file

@ -30,6 +30,31 @@
#include <vector>
#include <map>
// Represents a single argument.
class A
{
public:
A (const std::string&);
~A ();
A (const A&);
A& operator= (const A&);
bool hasTag (const std::string&) const;
void tag (const std::string&);
void unTag (const std::string&);
void attribute (const std::string&, const std::string&);
void attribute (const std::string&, const int);
void attribute (const std::string&, const double);
std::string attribute (const std::string&);
void removeAttribute (const std::string&);
std::string dump ();
public:
std::string _name;
std::vector <std::string> _tags;
std::map <std::string, std::string> _attributes;
};
// Represents the command line.
class CLI
{
public: