changed: updated to the new ezc api, this with O(1) when looking for a specific ezc function
changed: sessions are deleted at the end of a request (and only a few sessions) other sessions will be deleted after a next request git-svn-id: svn://ttmath.org/publicrep/winix/trunk@684 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -11,12 +11,22 @@
|
||||
#include "core/log.h"
|
||||
|
||||
|
||||
IndexPatterns::IndexPatterns()
|
||||
{
|
||||
config = 0;
|
||||
ezc_fun = 0;
|
||||
}
|
||||
|
||||
|
||||
void IndexPatterns::SetConfig(Config * pconfig)
|
||||
{
|
||||
config = pconfig;
|
||||
}
|
||||
|
||||
void IndexPatterns::SetEzcFunctions(TemplatesFunctions::EzcFun * fun)
|
||||
{
|
||||
ezc_fun = fun;
|
||||
}
|
||||
|
||||
Ezc::Pattern * IndexPatterns::GetPattern(const std::wstring & file, Locale::Lang lang)
|
||||
{
|
||||
@@ -83,6 +93,9 @@ void IndexPatterns::ReadPattern(Tab::iterator & iter, Locale & locale, LocaleFil
|
||||
templ.patterns[i].Directory(config->templates_dir, config->templates_dir_default);
|
||||
templ.patterns[i].ParseFile(iter->first);
|
||||
|
||||
if( ezc_fun )
|
||||
templ.patterns[i].CacheFunctions(*ezc_fun);
|
||||
|
||||
locale_filter.Filter(templ.patterns[i], locale, static_cast<Locale::Lang>(i));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user