TDB2
- Began serious TDB2 development by adding TDB2::dump, which shows all the file-related data in debug mode.
This commit is contained in:
17
src/TDB2.h
17
src/TDB2.h
@@ -32,6 +32,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <ViewText.h>
|
||||
#include <File.h>
|
||||
#include <Task.h>
|
||||
|
||||
@@ -44,9 +45,9 @@ public:
|
||||
|
||||
void target (const std::string&);
|
||||
|
||||
std::vector <Task>& get_tasks ();
|
||||
std::vector <std::string>& get_lines ();
|
||||
std::string& get_contents ();
|
||||
const std::vector <Task>& get_tasks ();
|
||||
const std::vector <std::string>& get_lines ();
|
||||
const std::string& get_contents ();
|
||||
|
||||
void add_task (const Task&);
|
||||
void modify_task (const Task&);
|
||||
@@ -54,18 +55,20 @@ public:
|
||||
void clear_lines ();
|
||||
void commit ();
|
||||
|
||||
private:
|
||||
public:
|
||||
void load_tasks ();
|
||||
void load_lines ();
|
||||
void load_contents ();
|
||||
|
||||
private:
|
||||
public:
|
||||
bool _read_only;
|
||||
bool _dirty;
|
||||
bool _loaded_tasks;
|
||||
bool _loaded_lines;
|
||||
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;
|
||||
@@ -73,7 +76,6 @@ private:
|
||||
File _file;
|
||||
};
|
||||
|
||||
|
||||
// TDB2 Class represents all the files in the task database.
|
||||
class TDB2
|
||||
{
|
||||
@@ -87,6 +89,9 @@ public:
|
||||
void commit ();
|
||||
int gc ();
|
||||
|
||||
void dump ();
|
||||
void dump_file (ViewText&, const std::string&, TF2&);
|
||||
|
||||
public:
|
||||
TF2 pending;
|
||||
TF2 completed;
|
||||
|
||||
Reference in New Issue
Block a user