mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +02:00
CLI
- Implemented A class, to represent a single argument. Much like a tree node.
This commit is contained in:
parent
8b78251735
commit
b98da56a7c
2 changed files with 133 additions and 0 deletions
25
src/CLI.h
25
src/CLI.h
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue