diff options
Diffstat (limited to 'project2/common/environment.h')
-rw-r--r-- | project2/common/environment.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/project2/common/environment.h b/project2/common/environment.h index 367d800..6185178 100644 --- a/project2/common/environment.h +++ b/project2/common/environment.h @@ -3,13 +3,16 @@ #include <string> #include <glibmm/ustring.h> -#include <boost/program_options.hpp> #include <boost/function.hpp> #include <boost/filesystem/path.hpp> +#include "options.h" +#include "exceptions.h" + +SimpleMessageException(NoSuchPlatform); class Environment { public: - Environment(int argc, char ** argv); + Environment(); virtual ~Environment() = 0; void init(); @@ -21,20 +24,15 @@ class Environment { virtual std::string getServerName() const = 0; virtual std::string getScriptName() const = 0; + virtual const Glib::ustring & platform() const = 0; boost::filesystem::path resolveScript(const std::string & group, const std::string & name) const; private: - static const Environment * currentEnv; + Options commonOptions; + virtual const Options & engineOptions() const = 0; - virtual boost::program_options::options_description addOptions(boost::program_options::positional_options_description &) = 0; - virtual void postinit(const boost::program_options::options_description &, const boost::program_options::variables_map &) = 0; - int argc; - char ** argv; - - static bool optionsBuilt; - static boost::program_options::options_description allOptions; - static boost::program_options::positional_options_description posOptions; + static const Environment * currentEnv; static int clLevel; static int slLevel; |