winix/templates/localefilter.h

47 lines
774 B
C++
Executable File

/*
* This file is a part of CMSLU -- Content Management System like Unix
* 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);
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;
std::string res;
std::string key;
std::string value;
const char * pchar;
};
#endif