/[publicrep]/cgi/ezc/trunk/src/ezc.h
ViewVC logotype

Diff of /cgi/ezc/trunk/src/ezc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 4 by tomek, Wed Jan 24 20:01:55 2007 UTC Revision 5 by tomek, Thu Jan 25 08:25:40 2007 UTC
# Line 7  Line 7 
7  #include <vector>  #include <vector>
8  #include <map>  #include <map>
9    
 struct EzcInfo  
 {  
         std::string text;  
         bool result;  
10    
         EzcInfo()  
         {  
                 result = false;  
         }  
 };  
   
11  class Ezc  class Ezc
12  {  {
13  public:  public:
14          typedef void (*UserFunction)(EzcInfo &);          struct Info
15          typedef std::map<std::string, UserFunction> UserFunctions;          {
16                    std::string text;
17                    bool result;
18                    int iter;
19            };
20    
21          UserFunctions user_functions;          typedef void (*UserFunction)(Info &);
22    
23            struct UserInfo
24            {      
25                    UserFunction user_function;
26                    int iter;
27            };
28    
29            typedef std::map<std::string, UserInfo> UserInfoTable;
30    
31            UserInfoTable user_info_table;
32    
33          Ezc();          Ezc();
34          void Init();          void Init();
35          bool ReadFile(const char * name);          bool ReadFile(const char * name);
# Line 62  class Ezc (private) Line 66  class Ezc (private)
66                  bool CreateTreeReadItem(const char * & itext);                  bool CreateTreeReadItem(const char * & itext);
67                  void CreateTreeReadAll(const char * & itext);                  void CreateTreeReadAll(const char * & itext);
68                  void CreateTreeReadIfany(const char * & itext);                  void CreateTreeReadIfany(const char * & itext);
69                    void CreateTreeReadFor(const char * & itext);
70                    bool CreateTreeReadDeleteLastEndItem();
71                  void CreateTree(const char * & itext);                  void CreateTree(const char * & itext);
72    
73                  void MakeTextIfany(std::string & otext, UserFunctions & user_functions);                  void MakeTextIfany(std::string & otext, UserInfoTable & user_info_table);
74                  void MakeTextContainer(std::string & otext, UserFunctions & user_functions);                  void MakeTextFor(std::string & otext, UserInfoTable & user_info_table);
75                    void MakeTextContainer(std::string & otext, UserInfoTable & user_info_table);
76                  void MakeTextMsgCantFind(std::string & otext, std::string & key);                  void MakeTextMsgCantFind(std::string & otext, std::string & key);
77                  void MakeTextNormal(std::string & otext, UserFunctions & user_functions);                  void MakeTextNormal(std::string & otext, UserInfoTable & user_info_table);
78    
79                  void MakeText(std::string & otext,UserFunctions & user_functions);                  void MakeText(std::string & otext,UserInfoTable & user_info_table);
80          };          };
81    
82          Item item_root;          Item item_root;


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

svnadmin@ttmath.org
ViewVC Help
Powered by ViewVC 1.2.1