Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
KoduPage.hGo to the documentation of this file.00001 #ifndef KODU_PAGE_H_ 00002 #define KODU_PAGE_H_ 00003 00004 // C++ Library 00005 #include <string> 00006 #include <vector> 00007 00008 // Kodu Library 00009 #include "Kodu/KoduRule.h" 00010 00011 #include "Kodu/General/GeneralFncs.h" 00012 00013 namespace Kodu { 00014 //! Kodu Page 00015 class KoduPage { 00016 public: 00017 //! Constructor 00018 explicit KoduPage(unsigned int kPageNumber) 00019 : pageNumber(kPageNumber), 00020 rules(), 00021 //objectColors() 00022 pageRequiresVision(false) 00023 { } 00024 00025 //! Destructor 00026 ~KoduPage() { 00027 GeneralFncs::destroyAllPtrsInVector(rules); 00028 } 00029 00030 //! Adds a Kodu rule to the end of the collection. 00031 void addKoduRule(KoduRule*); 00032 00033 //! Get the page number 00034 unsigned int getPageNumber() const; 00035 00036 //! Returns a rule with a specified ID (number) 00037 KoduRule* getRule(unsigned int number); 00038 00039 //! Returns a rule in a specified position of the vector 00040 KoduRule* getRuleInPos(unsigned int pos); 00041 00042 //! Returns the size of the rules vector 00043 unsigned int getRuleCount() const; 00044 00045 //! 00046 void setPageRequiresVision(bool); 00047 00048 //const std::vector<std::string>& getObjectDescriptors() const; 00049 //void addObjectDescriptor(const std::string& descriptor); 00050 00051 //! Checks if a page requires vision (the use of the robot's camera to perform a task) 00052 bool requiresVision() const; 00053 00054 private: 00055 //! Disallow the copy constructor and assignment operator 00056 DISALLOW_COPY_ASSIGN(KoduPage); 00057 00058 unsigned int pageNumber; //!< Page number 00059 std::vector<KoduRule*> rules; //!< Collection of rules for a page 00060 //std::vector<std::string> objectColors; 00061 bool pageRequiresVision; 00062 }; 00063 } 00064 #endif // KODU_PAGE_H_ |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:58:43 2016 by Doxygen 1.6.3 |