changed: SetCommentary() methods from Pattern were moved to PatternParser and Generator
added: caching functions and blocks
caching is added into Pattern and Blocks
methods: CacheFunctions() and CacheBlocks()
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@975 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
1 parent
ad2fb11a5c
commit
2fca5f3492
12 files changed
+366
-132
No files matched your search
+5
-19
@@ -41,6 +41,8 @@
|
||||
|
||||
#include <string>
|
||||
#include "item.h"
|
||||
#include "cache.h"
|
||||
#include "blocks.h"
|
||||
#include "functions.h"
|
||||
|
||||
|
||||
@@ -56,29 +58,13 @@ public:
|
||||
|
||||
void Clear();
|
||||
|
||||
void SetCommentary(const char * com_start, const char * com_stop);
|
||||
void SetCommentary(const std::string & com_start, const std::string & com_stop);
|
||||
void SetCommentary(const wchar_t * com_start, const wchar_t * com_stop);
|
||||
void SetCommentary(const std::wstring & com_start, const std::wstring & com_stop);
|
||||
|
||||
void CreateMsg(std::wstring & out, const wchar_t * type, const wchar_t * arg = 0);
|
||||
|
||||
template<class StreamType>
|
||||
void CacheFunctions(Functions<StreamType> & fun);
|
||||
|
||||
template<class StreamType> void CacheFunctions(Functions<StreamType> & fun);
|
||||
void CacheBlocks(Blocks & blocks);
|
||||
void ClearCache();
|
||||
|
||||
|
||||
Item item_root;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/*
|
||||
* IMRPOVE ME
|
||||
* they should be moved into PatternParser and Generator
|
||||
*/
|
||||
std::wstring commentary_start, commentary_stop;
|
||||
|
||||
}; // class Pattern
|
||||
|
||||
@@ -87,7 +73,7 @@ private:
|
||||
template<class StreamType>
|
||||
void Pattern::CacheFunctions(Functions<StreamType> & fun)
|
||||
{
|
||||
item_root.CacheFunctions(fun);
|
||||
Cache(fun, item_root);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user