Dear all,
I am following an opensource project and came across following code segment
what i dont understand is since the function "MState::event" is not declared in the structure itself why its declared outside. ? assuming that "MState::event" refers to a function not the "static uint8_t event" variable declared in the structure.Code:struct MState { uint8_t sVert; uint8_t sHorz; static uint8_t event; void init(){sVert=sHorz=0;}; void checkExit(uint8_t event,bool immediate=false); //!/ schltet horiz weiter zum naechsten menu. //!/ entry initialisiert, //!/ key_exit schaltet in zwei stufen zurueck zuerst sub=0, dann popmenu void checkChain( uint8_t curr, MenuFuncP *menuTab, uint8_t size); //!/ schltet vertik weiter zum naechsten submenu. //!/ entry initialisiert, //!/ keine reaktion auf exit uint8_t checkVert( uint8_t maxVert); //!/ schltet horiz weiter zum naechsten subsubmenu. //!/ entry initialisiert, //!/ keine reaktion auf exit uint8_t checkHorz( uint8_t myVert, uint8_t maxHoriz); }; uint8_t MState::event;
If this is a common practice please let me know the exact name for this kind of work..
Thanks a lot in advance and I'm really sorry if I'm driving you guys nuts asking silly question because of my lack of knowledge.



LinkBack URL
About LinkBacks


