Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Structures and data algorithms / Project / exc / Box.h
diff options
context:
space:
mode:
1 files changed, 23 insertions, 0 deletions
-rw-r--r--Year 2/Structures and data algorithms/Project/exc/Box.h23
diff --git a/Year 2/Structures and data algorithms/Project/exc/Box.h b/Year 2/Structures and data algorithms/Project/exc/Box.h
new file mode 100644
index 0000000..2a0c71b
--- /dev/null
+++ b/Year 2/Structures and data algorithms/Project/exc/Box.h
@@ -0,0 +1,23 @@
+#ifndef BOX
+#define BOX
+
+#include <string>
+#include <vector>
+#include <ostream>
+#include <istream>
+
+class Box {
+ std::string name;
+ std::vector<std::string> items;
+ std::vector<Box*> subboxes;
+
+ std::ostream& printWithInd(std::ostream&, std::string);
+
+public:
+ Box(const std::string& name, const std::vector<std::string>& items, const std::vector<Box*> subboxes) : name(name), items(items), subboxes(subboxes) {}
+
+ void removeUselessSubBoxes();
+ std::ostream& print(std::ostream&);
+};
+
+#endif