mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TDB2
- Implemented CmdAdd.cpp and CmdLog.cpp using TDB2. - Implemented simple append writes in TDB2. - Modified CmdImport to accept and parse JSON. - Added more const-ness in DOM, Expression and Task, to allow TDB2::get_tasks to return a const vector ref, which is a Very Good Thing. - Corrected usage for the export command. - Implemented Task::urgency as a call to Task::urgency_c, which is a const overload to allow urgency calculations (without caching) for const Task objects. - Removed obolete code from TDB. - Added lots of diagnostic output for TDB2 - it's annoying, but will be gone soon. - Added mention in CmdHelp of the new <filter> and <modifications> syntax elements. Needs more. - Added Command::filter overload which uses TDB2. Not in use yet.
This commit is contained in:
parent
523c4dfcca
commit
8827f9c978
18 changed files with 400 additions and 173 deletions
10
src/TDB2.h
10
src/TDB2.h
|
@ -45,9 +45,9 @@ public:
|
|||
|
||||
void target (const std::string&);
|
||||
|
||||
const std::vector <Task>& get_tasks ();
|
||||
const std::vector <Task>& get_tasks ();
|
||||
const std::vector <std::string>& get_lines ();
|
||||
const std::string& get_contents ();
|
||||
const std::string& get_contents ();
|
||||
|
||||
void add_task (const Task&);
|
||||
void modify_task (const Task&);
|
||||
|
@ -55,7 +55,6 @@ public:
|
|||
void clear_lines ();
|
||||
void commit ();
|
||||
|
||||
public:
|
||||
void load_tasks ();
|
||||
void load_lines ();
|
||||
void load_contents ();
|
||||
|
@ -68,7 +67,6 @@ public:
|
|||
bool _loaded_contents;
|
||||
std::vector <Task> _tasks;
|
||||
std::vector <Task> _added_tasks;
|
||||
std::vector <Task> _removed_tasks;
|
||||
std::vector <Task> _modified_tasks;
|
||||
std::vector <std::string> _lines;
|
||||
std::vector <std::string> _added_lines;
|
||||
|
@ -87,7 +85,8 @@ public:
|
|||
void add (const Task&);
|
||||
void modify (const Task&);
|
||||
void commit ();
|
||||
int gc ();
|
||||
int gc ();
|
||||
int next_id ();
|
||||
|
||||
void dump ();
|
||||
void dump_file (ViewText&, const std::string&, TF2&);
|
||||
|
@ -101,6 +100,7 @@ public:
|
|||
|
||||
private:
|
||||
std::string _location;
|
||||
int _id;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue