TDB2
- Added TDB2::clear and TF2::clear methods.
This commit is contained in:
34
src/TDB2.cpp
34
src/TDB2.cpp
@@ -368,6 +368,27 @@ int TF2::id (const std::string& uuid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void TF2::clear ()
|
||||
{
|
||||
_read_only = false;
|
||||
_dirty = false;
|
||||
_loaded_tasks = false;
|
||||
_loaded_lines = false;
|
||||
_loaded_contents = false;
|
||||
|
||||
_contents = "";
|
||||
_file._data = "";
|
||||
|
||||
_tasks.clear ();
|
||||
_added_tasks.clear ();
|
||||
_modified_tasks.clear ();
|
||||
_lines.clear ();
|
||||
_added_lines.clear ();
|
||||
_I2U.clear ();
|
||||
_U2I.clear ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// <label> <rw><dirty> <tasks> <lines> <contents>
|
||||
//
|
||||
@@ -709,6 +730,19 @@ bool TDB2::verifyUniqueUUID (const std::string& uuid)
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void TDB2::clear ()
|
||||
{
|
||||
pending.clear ();
|
||||
completed.clear ();
|
||||
undo.clear ();
|
||||
backlog.clear ();
|
||||
synch_key.clear ();
|
||||
|
||||
_location = "";
|
||||
_id = 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void TDB2::dump ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user