mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
init: initializeDatabase becomes initializeData, as configuration is added
This commit is contained in:
parent
1ced4bdd1a
commit
f487f1ce78
3 changed files with 8 additions and 4 deletions
|
@ -25,6 +25,7 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
|
#include <Configuration.h>
|
||||||
#include <Database.h>
|
#include <Database.h>
|
||||||
#include <Rules.h>
|
#include <Rules.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
@ -34,7 +35,7 @@
|
||||||
#include <iostream> // TODO Remove
|
#include <iostream> // TODO Remove
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void initializeDatabase (Database& database)
|
void initializeData (Configuration& configuration, Database& database)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,10 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
//#include <Grammar.h>
|
#include <Configuration.h>
|
||||||
#include <Database.h>
|
#include <Database.h>
|
||||||
#include <Rules.h>
|
#include <Rules.h>
|
||||||
|
//#include <Grammar.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <commands.h>
|
#include <commands.h>
|
||||||
#include <timew.h>
|
#include <timew.h>
|
||||||
|
@ -52,8 +53,9 @@ int main (int argc, const char** argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// TODO Load configuration ~/.timewrc || $TIMEWRC.
|
// TODO Load configuration ~/.timewrc || $TIMEWRC.
|
||||||
|
Configuration configuration;
|
||||||
Database database;
|
Database database;
|
||||||
initializeDatabase (database);
|
initializeData (configuration, database);
|
||||||
|
|
||||||
// TODO Arrange the following to minimize memory use.
|
// TODO Arrange the following to minimize memory use.
|
||||||
// TODO Load CLI grammar.
|
// TODO Load CLI grammar.
|
||||||
|
|
|
@ -27,11 +27,12 @@
|
||||||
#ifndef INCLUDED_TIMEW
|
#ifndef INCLUDED_TIMEW
|
||||||
#define INCLUDED_TIMEW
|
#define INCLUDED_TIMEW
|
||||||
|
|
||||||
|
#include <Configuration.h>
|
||||||
#include <Database.h>
|
#include <Database.h>
|
||||||
#include <Rules.h>
|
#include <Rules.h>
|
||||||
|
|
||||||
// init.cpp
|
// init.cpp
|
||||||
void initializeDatabase (Database&);
|
void initializeData (Configuration&, Database&);
|
||||||
int dispatchCommand (int, const char**, Rules&);
|
int dispatchCommand (int, const char**, Rules&);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue