#ifndef __PROFILE_H__ #define __PROFILE_H__ #include #include #include "base/CCMap.h" #include "base/CCValue.h" #include "base/CCVector.h" std::string genStr(const char* format, ...); std::vector genStrVector(const char* str1, ...); class Profile { public: static Profile* getInstance(); static void destroyInstance(); Profile(); virtual ~Profile(); // methods for test cases void testCaseBegin(std::string testName, std::vector condHeaders, std::vector retHeaders); void addTestResult(std::vector conditions, std::vector results); void testCaseEnd(); // write the test result to file void flush(); protected: cocos2d::ValueMap testData; std::string curTestName; cocos2d::ValueVector curTestResults; }; #endif // __PROFILE_H__