the first part of reimplementing has been done

now we have app object and singletons are only: log logn plugin and app



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@628 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-08-10 16:12:50 +00:00
parent 6897192364
commit 217cf1420b
191 changed files with 9529 additions and 7250 deletions

View File

@@ -9,56 +9,60 @@
#include "templates.h"
#include "ezc.h"
#include "data.h"
#include "core/misc.h"
#include "stats.h"
namespace Stats
{
extern long current_item_id;
extern Stats stats;
void stats_from(Ezc::Info & i)
{
i.out << DateToStrWithoutHours(stats_start);
i.out << DateToStrWithoutHours(stats.stats_start);
}
void stats_all(Ezc::Info & i)
{
i.out << stat_global.all;
i.out << stats.global_all;
}
void stats_unique(Ezc::Info & i)
{
i.out << stat_global.unique;
i.out << stats.global_unique;
}
void stats_google(Ezc::Info & i)
{
i.out << stat_global.google;
i.out << stats.global_google;
}
void stats_yahoo(Ezc::Info & i)
{
i.out << stat_global.yahoo;
i.out << stats.global_yahoo;
}
void stats_item_all(Ezc::Info & i)
{
i.out << stats_tab[ItemId()].all;
i.out << stats.stats_tab[current_item_id].all;
}
void stats_item_google(Ezc::Info & i)
{
i.out << stats_tab[ItemId()].google;
i.out << stats.stats_tab[current_item_id].google;
}
void stats_item_yahoo(Ezc::Info & i)
{
i.out << stats_tab[ItemId()].yahoo;
i.out << stats.stats_tab[current_item_id].yahoo;
}
@@ -66,12 +70,6 @@ void stats_item_yahoo(Ezc::Info & i)
void CreateFunctions(PluginInfo & info)
{
if( !info.p1 )
{
log << log1 << "S: functions object doesn't set" << logend;
return;
}
Ezc::Functions * fun = reinterpret_cast<Ezc::Functions*>(info.p1);
fun->Insert("stats_from", stats_from);