From 77df09397e7fc517dd387d8e46d993ad30f69853 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 29 Dec 2022 10:12:20 +0200 Subject: [SDP/P/exc] Added file reading --- Year 2/Structures and data algorithms/Project/exc/Box.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Year 2/Structures and data algorithms/Project/exc/Box.h') diff --git a/Year 2/Structures and data algorithms/Project/exc/Box.h b/Year 2/Structures and data algorithms/Project/exc/Box.h index 2a0c71b..c77ed6c 100644 --- a/Year 2/Structures and data algorithms/Project/exc/Box.h +++ b/Year 2/Structures and data algorithms/Project/exc/Box.h @@ -2,19 +2,24 @@ #define BOX #include -#include +#include #include #include class Box { std::string name; - std::vector items; - std::vector subboxes; + std::deque items; + std::deque subboxes; std::ostream& printWithInd(std::ostream&, std::string); public: - Box(const std::string& name, const std::vector& items, const std::vector subboxes) : name(name), items(items), subboxes(subboxes) {} + Box(const std::string& name); + Box(const std::string& name, const std::deque& items, const std::deque subboxes); + + std::string& get_name(); + void pushItem(std::string); + void pushSubbox(Box*); void removeUselessSubBoxes(); std::ostream& print(std::ostream&); -- cgit v1.3.1-26-gb76a