added: mount option: html_template(file.html)
files: indexpatterns.h indexpatterns.cpp removed: templates/index_root.html its content was moved to index.html git-svn-id: svn://ttmath.org/publicrep/winix/trunk@611 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
58
templates/indexpatterns.h
Executable file
58
templates/indexpatterns.h
Executable file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslutemplatesindexpatterns
|
||||
#define headerfilecmslutemplatesindexpatterns
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "ezc.h"
|
||||
#include "../core/locale.h"
|
||||
#include "localefilter.h"
|
||||
|
||||
|
||||
|
||||
class IndexPatterns
|
||||
{
|
||||
public:
|
||||
|
||||
// can return null pointer if there is not such a pattern
|
||||
Ezc::Pattern * GetPattern(const std::string & file, Locale::Lang lang);
|
||||
void AddPattern(const std::string & file, Locale & locale, LocaleFilter & locale_filter, bool delete_white);
|
||||
void AddPatternIfNotExists(const std::string & file, Locale & locale, LocaleFilter & locale_filter, bool delete_white);
|
||||
|
||||
// adding a file name without reading the pattern
|
||||
// the pattern will be read during ReloadPatterns()
|
||||
void AddFileName(const std::string & file);
|
||||
|
||||
void ReloadPatterns(Locale & locale, LocaleFilter & locale_filter, bool delete_white);
|
||||
void MarkAllToDelete();
|
||||
void DeleteMarked();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
struct Template
|
||||
{
|
||||
bool to_delete;
|
||||
|
||||
// table[lang]
|
||||
std::vector<Ezc::Pattern> patterns;
|
||||
};
|
||||
|
||||
typedef std::map<std::string, Template> Tab;
|
||||
Tab tab;
|
||||
|
||||
void ReadPattern(Tab::iterator & i, Locale & locale, LocaleFilter & locale_filter, bool delete_white);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user