FileUtils
//File Management Toolsfileutils::getinstance () std::stringGetstringfromfile (ConstSTD::string& filename);//reading a string in a fileData Getdatafromfile (ConstSTD::string& filename);//Get File DatavoidSetsearchpaths (ConstSTD::VECTOR<STD::string>& searchpaths);//set the search pathvoidAddsearchpath (ConstSTD::string& path);//Add search PathBOOLIsfileexist (ConstSTD::string& FilePath);//determine if a file exists
Notificationcenter
//Send EventCcnotificationcenter::sharednotificationcenter ()->postnotification (click_test_msg, (CCObject*) data);//Monitoring EventsvoidGamemanager::initlistener () {ccnotificationcenter::sharednotificationcenter ()->addobserver ( This, Callfunco_selector (gamemanager::onclicktest), click_test_msg, NULL);}//Handling EventsvoidGamemanager::onclicktest (ccobject*obj) {Ccmessagebox ("onclicktest","Title"); //To remove a listener eventCcnotificationcenter::sharednotificationcenter ()->removeobserver ( This, click_test_msg);}
typedefvoid(ccobject::* sel_schedule) (float);//used to tune the updatetypedefvoid(ccobject::* sel_callfunc) ();//To define a parameterless callback with thetypedefvoid(ccobject::* SEL_CALLFUNCN) (ccnode*);//with performer Callbacktypedefvoid(ccobject::* sel_callfuncnd) (Ccnode*,void*);//callback with a custom parametertypedefvoid(ccobject::* Sel_callfunco) (ccobject*); typedefvoid(ccobject::* Sel_menuhandler) (ccobject*); typedefvoid(ccobject::* Sel_eventhandler) (ccevent*); typedefint(ccobject::* sel_compare) (ccobject*);