start working on 0.7.x branch

- added FileLog which stores content to the file log
- now Log is only a wrapper - it puts messages to the local buffer and when logsave is used then the buffer is put to FileLog
- new base classes:
  WinixBase (Log, Config*, Synchro*)
  WinixModel : public WinixBase (morm::ModelConnector*, Plugin*)
  WinixSystem : public WinixModel (System*)
  WinixRequest : public WinixSystem (SLog, Cur*)
- singletons: log, slog, plugin are depracated - now references to them are in base classses (WinixBase, WinixModel)
- DbBase,  DbConn and Db are depracated - now we are using Morm project (in WinixModel there is a model_connector pointer)
  each thread will have its own ModelConnector





git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1146 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-11-21 11:03:53 +00:00
parent a7c47140ae
commit a2ffc1e81c
121 changed files with 7832 additions and 6662 deletions

View File

@@ -36,7 +36,7 @@
#define headerfile_winix_core_threadmanager
#include <string>
#include <vector>
#include <list>
#include "basethread.h"
#include "synchro.h"
@@ -47,14 +47,14 @@ namespace Winix
class ThreadManager
class ThreadManager : public WinixModel
{
public:
ThreadManager();
// synchro object
void SetSynchro(Synchro * psynchro);
//void SetSynchro(Synchro * psynchro);
// initializing
void Init();
@@ -76,18 +76,30 @@ public:
private:
struct ThreadItemData
{
morm::ModelConnector model_connector;
morm::JSONConnector json_connector;
morm::PostgreSQLConnector postgresql_connector;
TextStream<std::wstring> log_buffer;
};
struct ThreadItem
{
BaseThread * object;
std::wstring name;
ThreadItemData * thread_item_data;
};
Synchro * synchro;
typedef std::vector<ThreadItem> ThreadTab;
//Synchro * synchro;
typedef std::list<ThreadItem> ThreadTab;
ThreadTab thread_tab;
bool were_started;
void Start(size_t i);
void Start(int id, ThreadItem * item);
};