Ezc::ReadFile has gone
Ezc::CreateTree takes a name of an input file added [for ...] added [if-index ...] added [is ....] added [include...] (not all finished) git-svn-id: svn://ttmath.org/publicrep/cgi/ezc/trunk@6 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
1 parent
ac632987f3
commit
043a5f2131
2 files changed
+328
-52
No files matched your search
@@ -6,6 +6,8 @@
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
class Ezc
|
||||
@@ -32,8 +34,7 @@ public:
|
||||
|
||||
Ezc();
|
||||
void Init();
|
||||
bool ReadFile(const char * name);
|
||||
void CreateTree();
|
||||
void CreateTree(const char * file);
|
||||
std::string MakeText();
|
||||
void Insert(const std::string & key, UserFunction ufunction);
|
||||
|
||||
@@ -43,7 +44,7 @@ private:
|
||||
enum ItemType
|
||||
{
|
||||
item_none, item_container, item_text, item_ifany, item_for, item_else,
|
||||
item_end, item_err, item_normal
|
||||
item_end, item_err, item_normal, item_ifindex, item_include, item_is
|
||||
};
|
||||
|
||||
ItemType type;
|
||||
@@ -55,8 +56,11 @@ private:
|
||||
Item();
|
||||
~Item();
|
||||
Item * AddItem(const Item & porg);
|
||||
void ReadFile(const char * name, std::string & result);
|
||||
void SkipWhiteCharacters(const char * & itext);
|
||||
void ReadDirective(const char * & itext, std::string & directive);
|
||||
void ReadString(const char * & itext, std::string & directive);
|
||||
void ReadDirectiveOrString(const char * & itext, std::string & directive);
|
||||
void ClearTable();
|
||||
ItemType LastItemType();
|
||||
bool ReadChar(const char * & itext, char & result);
|
||||
@@ -64,18 +68,19 @@ private:
|
||||
void CreateTreeReadItemDirective(const char * & itext);
|
||||
void CreateTreeReadItemText(const char * & itext);
|
||||
bool CreateTreeReadItem(const char * & itext);
|
||||
void CreateTreeReadAll(const char * & itext);
|
||||
void CreateTreeReadIfany(const char * & itext);
|
||||
void CreateTreeReadIf(const char * & itext);
|
||||
void CreateTreeReadFor(const char * & itext);
|
||||
bool CreateTreeReadDeleteLastEndItem();
|
||||
void CreateTreeReadInclude();
|
||||
void CreateTree(const char * & itext);
|
||||
|
||||
void MakeTextIfany(std::string & otext, UserInfoTable & user_info_table);
|
||||
void MakeTextIfindex(std::string & otext, UserInfoTable & user_info_table);
|
||||
void MakeTextFor(std::string & otext, UserInfoTable & user_info_table);
|
||||
void MakeTextContainer(std::string & otext, UserInfoTable & user_info_table);
|
||||
void MakeTextMsgCantFind(std::string & otext, std::string & key);
|
||||
void MakeTextNormal(std::string & otext, UserInfoTable & user_info_table);
|
||||
|
||||
void MakeTextIs(std::string & otext, UserInfoTable & user_info_table);
|
||||
void MakeText(std::string & otext,UserInfoTable & user_info_table);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user