mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Database: Added methods for injecting data
This commit is contained in:
parent
175f0d63f4
commit
634e6bad75
2 changed files with 22 additions and 0 deletions
|
@ -47,6 +47,7 @@ void Database::initialize (const std::string& location)
|
|||
{
|
||||
if (1 /* TODO looks like one of our data files */)
|
||||
{
|
||||
// Don't add the current file twice.
|
||||
if (file != _current)
|
||||
{
|
||||
Datafile oldFile;
|
||||
|
@ -59,6 +60,21 @@ void Database::initialize (const std::string& location)
|
|||
// TODO If there is no data file named YYYY—MM.data, then create it.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Database::addExclusion (const std::string& exclusion)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Database::addInterval (const Interval& interval)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Database::modifyInterval (const Interval& interval)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Database::dump () const
|
||||
{
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#define INCLUDED_DATABASE
|
||||
|
||||
#include <Datafile.h>
|
||||
#include <Interval.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
@ -36,6 +37,11 @@ class Database
|
|||
public:
|
||||
Database () = default;
|
||||
void initialize (const std::string&);
|
||||
|
||||
void addExclusion (const std::string&);
|
||||
void addInterval (const Interval&);
|
||||
void modifyInterval (const Interval&);
|
||||
|
||||
std::string dump () const;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue