added: Patterns class (in templates)
ezc patterns are managed by this class added: some work in groupitem plugin (not finished yet) changed: ConfParser can read a string from memory now (need some testing yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@757 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#include "patterncacher.h"
|
||||
#include "indexpatterns.h"
|
||||
#include "locale.h"
|
||||
#include "patterns.h"
|
||||
#include "changepatterns.h"
|
||||
#include "htmltextstream.h"
|
||||
#include "localefilter.h"
|
||||
#include "core/config.h"
|
||||
@@ -34,19 +36,14 @@ class Functions;
|
||||
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
extern size_t pat_index;
|
||||
extern size_t pat_err_404;
|
||||
extern size_t pat_err_per_denied;
|
||||
|
||||
enum Pat
|
||||
{
|
||||
pat_index = 0, // first should be zero
|
||||
pat_err_404,
|
||||
pat_err_per_denied,
|
||||
pat_last // should be last
|
||||
};
|
||||
|
||||
extern IndexPatterns index_patterns; // patterns for main index template
|
||||
extern Patterns patterns; // those patterns from enum Pat
|
||||
extern Patterns patterns_fun; // patterns for winix functions
|
||||
extern PatternCacher pattern_cacher; // patterns for user items (files with an executable bit set)
|
||||
extern Patterns patterns;
|
||||
extern IndexPatterns index_patterns;
|
||||
extern ChangePatterns change_patterns;
|
||||
extern PatternCacher pattern_cacher;
|
||||
extern Locale locale;
|
||||
extern EzcFun ezc_functions;
|
||||
extern LocaleFilter locale_filter;
|
||||
@@ -462,23 +459,21 @@ public:
|
||||
void SetSessionManager(SessionManager * psession_manager);
|
||||
|
||||
void Init();
|
||||
void ClearPatterns();
|
||||
void RequestEnd();
|
||||
void ReadTemplates();
|
||||
void ReadNewIndexTemplates();
|
||||
void ReadIndexFileNames(bool add_pattern = false);
|
||||
void ReadNewChangeTemplates();
|
||||
void Generate();
|
||||
void GenerateRunRaw();
|
||||
void Generate(Ezc::Pattern & pattern);
|
||||
|
||||
private:
|
||||
|
||||
void ReadFile(TemplatesFunctions::Pat pat, const wchar_t * file);
|
||||
void ReadFileFun(size_t index, const wchar_t * file);
|
||||
void ReadFunctionsTemplates();
|
||||
void SetLocale();
|
||||
void ReadTemplatesForFunctions();
|
||||
void ReadIndexTemplates();
|
||||
void ReadChangeTemplates();
|
||||
void ReadLocale();
|
||||
void SetHtmlFilter();
|
||||
void ClearPatterns(TemplatesFunctions::Patterns & patterns, size_t len);
|
||||
void CreateFunctions(); // should be called before reading patterns (patterns will cache ezc functions)
|
||||
|
||||
TemplatesFunctions::EzcGen generator;
|
||||
|
Reference in New Issue
Block a user