diff options
Diffstat (limited to 'src/core/module.h')
-rw-r--r-- | src/core/module.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/core/module.h b/src/core/module.h index 76b1ba4..ac6b380 100644 --- a/src/core/module.h +++ b/src/core/module.h @@ -17,26 +17,36 @@ namespace core class Module { public: - Module(const char *name, bool interactive=true); + Module(const char *name, bool interactive = true); virtual ~Module(); -/*----- inspectors ------------------------------------------------ */ + /*----- inspectors ------------------------------------------------ */ /// return true if the game module can run a timeframe - inline bool running() const { return module_running; } + inline bool running() const { + return module_running; + } /// return true if the game module can not run a timeframe - inline bool error() const { return !module_running; } + inline bool error() const { + return !module_running; + } /// label of the module - inline std::string const & label() const { return module_label; } + inline std::string const & label() const { + return module_label; + } /// return the name of the module - inline std::string const & name() const { return module_name; } + inline std::string const & name() const { + return module_name; + } /// indicates if this is an interactive module or not - inline bool interactive() const { return module_interactive; } + inline bool interactive() const { + return module_interactive; + } -/*----- mutators -------------------------------------------------- */ + /*----- mutators -------------------------------------------------- */ /// run one game frame virtual void frame(float seconds) = 0; @@ -50,7 +60,9 @@ public: /// set the module label void set_label(const std::string &label); - static inline Module *instance() { return module_instance; } + static inline Module *instance() { + return module_instance; + } protected: /// abort a running module @@ -61,7 +73,7 @@ private: bool module_running; std::string module_label; - std::string module_name; + std::string module_name; static Module* module_instance; }; |