/*! * @file proxy_settings.h * some shared data from the proxy settings */ #ifndef _PROXY_SETTINGS_H #define _PROXY_SETTINGS_H #include "base_object.h" #include "netdefs.h" #include class NetworkStream; class Synchronizeable; class TiXmlElement; /* and here is the class itsself*/ class ProxySettings : public BaseObject { public: inline static ProxySettings* getInstance() { if (!ProxySettings::singletonRef) ProxySettings::singletonRef = new ProxySettings(); return ProxySettings::singletonRef; } virtual ~ProxySettings(); void loadProxySettings(const TiXmlElement* root); inline void setMaxPlayer(int number) { this->maxPlayer = number; } void setProxyAddr(const std::string& proxyAddr); private: ProxySettings(); private: static ProxySettings* singletonRef; //!< Pointer to the only instance of this Class int maxPlayer; //!< maximal number of players std::vector proxies; //!< all registered proxies }; #endif /* _PROXY_SETTINGS_H */