-tariffs = new TARIFFS_IMPL(dataStore);
-admins = new ADMINS_IMPL(dataStore);
-users = new USERS_IMPL(settings, dataStore, tariffs, admins->GetSysAdmin());
-traffCnt = new TRAFFCOUNTER_IMPL(users, settings->GetRulesFileName());
-services = new SERVICES_IMPL(dataStore);
-corps = new CORPORATIONS_IMPL(dataStore);
-traffCnt->SetMonitorDir(settings->GetMonitorDir());
-
-modSettings = settings->GetModulesSettings();
-
-for (size_t i = 0; i < modSettings.size(); i++)
- {
- string modulePath = settings->GetModulesPath();
- modulePath += "/mod_";
- modulePath += modSettings[i].moduleName;
- modulePath += ".so";
- printfd(__FILE__, "Module: %s\n", modulePath.c_str());
- modules.push_back(
- PLUGIN_RUNNER(modulePath,
- modSettings[i],
- admins,
- tariffs,
- users,
- services,
- corps,
- traffCnt,
- dataStore,
- settings)
- );
- }
+ADMINS_IMPL admins(&store);
+TARIFFS_IMPL tariffs(&store);
+SERVICES_IMPL services(&store);
+CORPORATIONS_IMPL corps(&store);
+USERS_IMPL users(&settings, &store, &tariffs, services, admins.GetSysAdmin());
+TRAFFCOUNTER_IMPL traffCnt(&users, settings.GetRulesFileName());
+traffCnt.SetMonitorDir(settings.GetMonitorDir());