diff options
Diffstat (limited to 'src/core/gameconnection.h')
-rw-r--r-- | src/core/gameconnection.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/core/gameconnection.h b/src/core/gameconnection.h index 22af910..52885f4 100644 --- a/src/core/gameconnection.h +++ b/src/core/gameconnection.h @@ -20,13 +20,17 @@ public: GameConnection(std::string const &connectionstr); virtual ~GameConnection(); -/*----- inspectors ------------------------------------------------ */ + /*----- inspectors ------------------------------------------------ */ /// returns true if the game connection can run a time frime - inline bool running() const { return connection_running; } + inline bool running() const { + return connection_running; + } /// returns true if the game connection can not run a time frime - inline bool error() const { return !connection_running; } + inline bool error() const { + return !connection_running; + } /// returns true if the game is running an interactive module virtual bool interactive() const; @@ -37,7 +41,7 @@ public: /// return the current game time virtual unsigned long timestamp() const; -/*----- mutators -------------------------------------------------- */ + /*----- mutators -------------------------------------------------- */ /// run a game connection time frame void frame(unsigned long timestamp); @@ -57,10 +61,12 @@ public: /// returns an info record Info *info(const std::string &label); -/*----- static ---------------------------------------------------- */ - + /*----- static ---------------------------------------------------- */ + /// return the current game connection - static inline GameConnection *instance() { return connection_instance; } + static inline GameConnection *instance() { + return connection_instance; + } protected: /// abort runing @@ -72,10 +78,13 @@ private: unsigned long connection_netframe; // last network frame timestamp NetConnection *connection_network; - static GameConnection *connection_instance; + static GameConnection *connection_instance; }; -inline GameConnection *connection() { return GameConnection::instance(); } +inline GameConnection *connection() +{ + return GameConnection::instance(); +} } |