48 lines
775 B
C++
Executable File
48 lines
775 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecmslutemplateslocalefilter
|
|
#define headerfilecmslutemplateslocalefilter
|
|
|
|
|
|
#include "../core/locale.h"
|
|
#include "ezc.h"
|
|
|
|
|
|
|
|
class LocaleFilter
|
|
{
|
|
public:
|
|
|
|
LocaleFilter();
|
|
void Filter(Ezc::Pattern & pattern, const Locale & locale, Locale::Lang lang_);
|
|
|
|
private:
|
|
void ReadKey();
|
|
std::string & FilterValue(const std::string & in);
|
|
void FilterText(Ezc::Pattern::Item & item);
|
|
void Parse(std::string & str);
|
|
|
|
char open_mark; // default '{'
|
|
char closing_mark; // default '}'
|
|
|
|
const Locale * plocale;
|
|
Locale::Lang lang;
|
|
std::string res;
|
|
std::string key;
|
|
std::string value;
|
|
const char * pchar;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|