1 #pragma once 2 3 #ifndef APPLICATION_H 4 #define APPLICATION_H 5 6 // forward declarations 7 class TFarmController; 8 9 #include "tfilepath.h" 10 11 //------------------------------------------------------------------------------ 12 13 class RenderFarmTasksObserver { 14 public: 15 virtual void onChange() = 0; 16 }; 17 18 //------------------------------------------------------------------------------ 19 20 class Application { // singleton 21 public: 22 ~Application(); 23 static Application *instance(); 24 25 void init(); 26 27 TFarmController *getController(); 28 bool testControllerConnection() const; 29 void getControllerData(string &hostName, string &ipAddr, int &port) const; 30 31 void setCurrentFolder(const TFilePath &fp); 32 TFilePath getCurrentFolder(); 33 34 private: 35 class Imp; 36 Imp *m_imp; 37 38 Application(); 39 40 // not implemented 41 Application(const Application &); 42 Application &operator=(const Application &); 43 }; 44 45 #endif 46