Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-01-14 13:11:57 +0000
committerStijn Buys <ingar@osirion.org>2012-01-14 13:11:57 +0000
commit9a0b0432cbdb0bfc2578b74d305a091d56152839 (patch)
treee81b00cf0b8b34f5644b989903398ab0a0dd8b06 /src/game/base/savegame.h
parent8ecbe636dd7e4930265614152914be6cb7b42583 (diff)
Moved server-side savegame functions into a separate class.
Diffstat (limited to 'src/game/base/savegame.h')
-rw-r--r--src/game/base/savegame.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/game/base/savegame.h b/src/game/base/savegame.h
new file mode 100644
index 0000000..1f56ebc
--- /dev/null
+++ b/src/game/base/savegame.h
@@ -0,0 +1,46 @@
+/*
+ base/savegame.h
+ This file is part of the Osirion project and is distributed under
+ the terms and conditions of the GNU General Public License version 2
+*/
+
+#ifndef __INCLUDED_BASE_SAVEGAME_H__
+#define __INCLUDED_BASE_SAVEGAME_H__
+
+// system headers
+#include <iostream>
+
+// project headers
+#include "core/info.h"
+#include "core/player.h"
+#include "base/ship.h"
+
+namespace game
+{
+
+/**
+ * @brief a class containing helper functions for savegames
+ */
+class SaveGame {
+public:
+ /**
+ * @brief write player data to output stream, in .ini format
+ */
+ static void player_to_stream(core::Player *player, std::ostream & os);
+
+ /**
+ * @brief write ship data to output stream, in .ini format
+ */
+ static void ship_to_stream(Ship *ship, std::ostream & os);
+
+ /**
+ * @brief write inventory data to output stream, in .ini format
+ */
+ static void inventory_to_stream(core::Inventory *inventory, std::ostream & os);
+
+
+}; // class SaveGame
+
+} // namespace game
+
+#endif // __INCLUDED_BASE_SAVEGAME_H__