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:
@@ -33,9 +33,7 @@
|
||||
*/
|
||||
|
||||
#include "functions.h"
|
||||
#include "core/log.h"
|
||||
#include "core/misc.h"
|
||||
#include "core/plugin.h"
|
||||
#include "templates/templates.h"
|
||||
|
||||
|
||||
@@ -45,10 +43,10 @@ namespace Winix
|
||||
|
||||
|
||||
|
||||
void Functions::SetConfig(Config * pconfig)
|
||||
{
|
||||
config = pconfig;
|
||||
}
|
||||
//void Functions::SetConfig(Config * pconfig)
|
||||
//{
|
||||
// config = pconfig;
|
||||
//}
|
||||
|
||||
|
||||
void Functions::SetCur(Cur * pcur)
|
||||
@@ -76,10 +74,10 @@ void Functions::SetTemplates(Templates * ptemplates)
|
||||
}
|
||||
|
||||
|
||||
void Functions::SetSynchro(Synchro * psynchro)
|
||||
{
|
||||
synchro = psynchro;
|
||||
}
|
||||
//void Functions::SetSynchro(Synchro * psynchro)
|
||||
//{
|
||||
// synchro = psynchro;
|
||||
//}
|
||||
|
||||
|
||||
void Functions::SetSessionManager(SessionManager * pmanager)
|
||||
@@ -88,6 +86,12 @@ void Functions::SetSessionManager(SessionManager * pmanager)
|
||||
}
|
||||
|
||||
|
||||
void Functions::set_dependency(WinixRequest * winix_request)
|
||||
{
|
||||
WinixRequest::set_dependency(winix_request);
|
||||
function_parser.set_dependency(winix_request);
|
||||
}
|
||||
|
||||
|
||||
size_t Functions::FunctionsSize()
|
||||
{
|
||||
@@ -171,14 +175,16 @@ return WINIX_NOTHING_TO_DO;
|
||||
|
||||
void Functions::SetObjects(FunctionBase * fun)
|
||||
{
|
||||
fun->SetConfig(config);
|
||||
fun->SetCur(cur);
|
||||
fun->set_dependency(this);
|
||||
|
||||
//fun->SetConfig(config);
|
||||
//fun->SetCur(cur);
|
||||
fun->SetDb(db);
|
||||
fun->SetSystem(system);
|
||||
//fun->SetSystem(system);
|
||||
fun->SetFunctions(this);
|
||||
fun->SetTemplates(templates);
|
||||
fun->SetSynchro(synchro);
|
||||
fun->SetSessionManager(session_manager);
|
||||
//fun->SetSynchro(synchro);
|
||||
//fun->SetSessionManager(session_manager);
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +264,7 @@ void Functions::CreateFunctions()
|
||||
Add(fun_who);
|
||||
Add(fun_vim);
|
||||
|
||||
plugin.Call((Session*)0, WINIX_CREATE_FUNCTIONS);
|
||||
plugin->Call((Session*)0, WINIX_CREATE_FUNCTIONS);
|
||||
}
|
||||
|
||||
|
||||
@@ -318,7 +324,7 @@ void Functions::SetDefaultFunction()
|
||||
{
|
||||
cur->request->function = 0;
|
||||
|
||||
plugin.Call(WINIX_SELECT_DEFAULT_FUNCTION);
|
||||
plugin->Call(WINIX_SELECT_DEFAULT_FUNCTION);
|
||||
|
||||
if( cur->request->function )
|
||||
{
|
||||
|
Reference in New Issue
Block a user