/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2010-2011, Tomasz Sowa * All rights reserved. * */ #ifndef headerfile_winix_templates_misc #define headerfile_winix_templates_misc #include #include #include "localefilter.h" #include "ezc.h" #include "htmltextstream.h" #include "core/user.h" namespace TemplatesFunctions { typedef Ezc::Functions EzcFun; typedef Ezc::Generator EzcGen; typedef Ezc::FunInfo Info; template HtmlTextStream::RawText R(const RawType & par) { return HtmlTextStream::RawText(par); } //void HtmlEscape(TextStream & out, const std::wstring & in); void HtmlEscapeFormTxt(HtmlTextStream & out, const std::wstring & in); //std::wstring HtmlEscape(const std::wstring & in); //std::wstring HtmlEscapeFormTxt(const std::wstring & in); // table: [language][file] typedef std::vector > Patterns; void print_date_nice(Info & i, const tm & rtm); void print_user_name(Info & i, const User * puser, const std::wstring & guest_name); // those functions from here are used in the second thread too template void Read(Patterns & patterns, size_t pat, Locale & locale, LocaleFilter & locale_filter, Ezc::Functions & ezc_fun, const wchar_t * file, bool read_file_as_utf8, const std::wstring & templates_dir, const std::wstring & templates_dir_default, bool delete_white = false) { size_t i; size_t len = patterns.size(); for(i=0 ; i