00001 /* 00002 Page Handler Class - pg_handlers.hpp 00003 ---------------------------------------- 00004 This class represents 00005 an abstraction of a web pages menus. 00006 */ 00007 00008 // Sentry 00009 #ifndef Pg_Handler_Hpp 00010 #define Pg_Handler_Hpp 00011 00012 #include "ocString.h" 00013 00014 typedef class page; 00015 00016 class base_pg_handler 00017 { 00018 protected: 00019 page & pg; 00020 public: 00021 ocString uiTemplate; 00022 base_pg_handler(page & pgIn):pg(pgIn){;} 00023 virtual ~base_pg_handler(){;} 00024 00025 virtual bool operator()( void ) 00026 { 00027 return false; 00028 } 00029 }; 00030 00031 typedef map< string, base_pg_handler * > pgHandlerMap; 00032 00033 void cleanHandlerMap(pgHandlerMap & in) 00034 { 00035 pgHandlerMap::iterator pos; 00036 for( pos=in.begin(); pos!=in.end(); ++pos ) 00037 { 00038 delete pos->second; 00039 } 00040 in.clear(); 00041 } 00042 00043 00044 00045 00046 #endif
1.5.5