Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ParsedPage.hGo to the documentation of this file.00001 #ifndef PARSED_PAGE_H_ 00002 #define PARSED_PAGE_H_ 00003 00004 // C++ Library 00005 #include <vector> 00006 00007 // Kodu Library 00008 #include "Kodu/General/GeneralFncs.h" 00009 #include "Kodu/Parsing/ParsedRule.h" 00010 00011 namespace Kodu { 00012 00013 class ParsedPage { 00014 private: 00015 unsigned int pageNumber; 00016 std::vector<ParsedRule*> rules; 00017 00018 public: 00019 ParsedPage(unsigned int pageNumb) 00020 : pageNumber(pageNumb), rules() 00021 { } 00022 00023 explicit ParsedPage(const ParsedPage& kPage) 00024 : pageNumber(kPage.pageNumber), rules(kPage.rules) 00025 { } 00026 00027 ~ParsedPage() { 00028 GeneralFncs::destroyAllPtrsInVector(rules); 00029 } 00030 00031 ParsedPage& operator=(const ParsedPage& kPage) { 00032 if (this != &kPage) { 00033 pageNumber = kPage.pageNumber; 00034 rules = kPage.rules; 00035 } 00036 return *this; 00037 } 00038 00039 //! Adds a rule to this page 00040 bool addRule(ParsedRule* rule); 00041 00042 //! Get the current page's id 00043 unsigned int getPageNumber() const; 00044 00045 //! Get the number of rules this page has 00046 unsigned int getRuleCount() const; 00047 00048 //! Get the rule in a specified index 00049 ParsedRule* getRuleInPos(unsigned int index); 00050 }; 00051 } 00052 00053 #endif // PARSED_PAGE_H_ |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:58:45 2016 by Doxygen 1.6.3 |