some work on dependency injection
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1147 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011-2014, Tomasz Sowa
|
||||
* Copyright (c) 2011-2018, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -39,12 +39,13 @@
|
||||
#include "exportinfo.h"
|
||||
#include "edb.h"
|
||||
#include "funexport.h"
|
||||
#include "functions/functions.h"
|
||||
|
||||
|
||||
namespace Winix
|
||||
{
|
||||
|
||||
|
||||
|
||||
extern "C" void Init(PluginInfo &);
|
||||
|
||||
|
||||
@@ -71,9 +72,7 @@ void AddWinixFunctions(PluginInfo & info)
|
||||
|
||||
void AddMountParams(PluginInfo & info)
|
||||
{
|
||||
using TemplatesFunctions::system;
|
||||
|
||||
mount_par_export_conf = system->mounts.AddMountPar(L"export_conf");
|
||||
mount_par_export_conf = info.system->mounts.AddMountPar(L"export_conf");
|
||||
}
|
||||
|
||||
|
||||
@@ -252,9 +251,12 @@ void Init(PluginInfo & info)
|
||||
{
|
||||
using namespace Export;
|
||||
|
||||
info.set_dependency_for(edb);
|
||||
edb.SetConn(info.db->GetConn());
|
||||
edb.LogQueries(info.config->log_db_query);
|
||||
edb.SetDirs(&info.system->dirs);
|
||||
|
||||
info.set_dependency_for(export_info);
|
||||
export_info.SetSystem(info.system);
|
||||
export_info.SetConfig(info.config);
|
||||
export_info.SetEDb(&edb);
|
||||
|
Reference in New Issue
Block a user