00001 #ifndef __MVC_INTERFACES_H__ 00002 #define __MVC_INTERFACES_H__ 00003 00004 #include <map> 00005 00006 #include <utilities/mvc/mvc_defines.h> 00007 #include <utilities/mvc/string_collection.h> 00008 00009 #if !defined( WIN32_PLATFORM ) && !defined( NIX_PLATFORM ) && !defined( MINGW_PLATFORM ) && !defined( CYGWIN_PLATFORM ) 00010 #define WIN32_PLATFORM 00011 #endif 00012 00013 namespace nitro 00014 { 00015 00026 class MVC_DLL_ENTITY ExecuteCommandInterface{ 00027 public: 00028 00059 virtual bool ExecuteCommand( const char * Command , const void * Param1 = NULL , const void * Param2 = NULL ); 00060 00075 virtual ~ExecuteCommandInterface(){} 00076 00077 }; 00078 00089 class MVC_DLL_ENTITY CommandRedirections{ 00090 public: 00091 00114 virtual void AddRedirectionRule( const char * CommandOriginal , const char * CommandRedirected ); 00115 00138 virtual const char * RedirectCommand( const char * CommandOriginal ); 00139 00154 virtual ~CommandRedirections(){} 00155 00156 private: 00157 00168 std::map< std::string , std::string > Rules; 00169 00170 }; 00171 00182 class MVC_DLL_ENTITY ViewInterface : public ExecuteCommandInterface{ 00183 public: 00184 00211 virtual void * GetGUI( const char * ViewName = NULL , void * Parent = NULL ); 00212 00227 virtual ~ViewInterface(){} 00228 }; 00229 00240 class MVC_DLL_ENTITY ControllerInterface : public ExecuteCommandInterface{ 00241 public: 00242 00257 virtual ~ControllerInterface(){} 00258 00259 }; 00260 00271 class MVC_DLL_ENTITY ModelInterface{ 00272 00273 public: 00274 00305 virtual StringCollection * ExecuteCommand( const char * Command , const void * Param1 = NULL , const void * Param2 = NULL ); 00306 00321 virtual ~ModelInterface(){} 00322 00323 }; 00324 00325 }; 00326 00327 #endif