Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Inventory/Inventory.h
- Revision:
- 8:4220d116f17c
- Parent:
- 3:9d811414d35e
- Child:
- 9:16996bd37fc6
--- a/Inventory/Inventory.h Mon May 11 18:28:37 2020 +0000
+++ b/Inventory/Inventory.h Mon May 11 18:58:07 2020 +0000
@@ -1,8 +1,7 @@
-/** Inventory Class
- * @brief Library for maintaining an inventory
- * @author George Sykes [el18gs]
- */
-
+/** @file Ghost.h
+* @brief Inventory library containing the tools used to generate and manage
+* @brief the games inventory
+*/
#ifndef INVEN_H
#define INVEN_H
@@ -13,21 +12,30 @@
#include <vector>
#include <iostream>
+/** @pulic vector of Ghosts used to hold the inventory data
+*/
typedef std::vector<Ghost> ghostvec;
+
+/** @pulic vector of strings used in data processing
+*/
typedef std::vector<std::string> stringvec;
+/** Inventory Class
+ * @brief Library for maintaining an inventory
+ * @author George Sykes [el18gs]
+ */
class Inventory
{
public:
- Inventory(void);
- void regen(void);
+ Inventory(SDFileSystem &sd);
+ void regen(SDFileSystem &sd);
std::vector<int> list_ghost_uids(void);
Ghost get_ghost_by_uid(int uid);
- void sell_ghost_by_uid(int uid);
+ void sell_ghost_by_uid(int uid, SDFileSystem &sd);
private:
// Functions
- stringvec list_ghosts(std::string);
+ stringvec list_ghosts(std::string, SDFileSystem &sd);
bool hasEnding (std::string const &fullString, std::string const &ending);
// Variables