Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Structures and data algorithms / Project / exc / Box.h
blob: c77ed6c6157b894b1c9373f3bd6e09709079206a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef BOX
#define BOX

#include <string>
#include <deque>
#include <ostream>
#include <istream>

class Box {
	std::string name;
	std::deque<std::string> items;
	std::deque<Box*> subboxes;

	std::ostream& printWithInd(std::ostream&, std::string);

public:
	Box(const std::string& name);
	Box(const std::string& name, const std::deque<std::string>& items, const std::deque<Box*> subboxes);

	std::string& get_name();
	void pushItem(std::string);
	void pushSubbox(Box*);

	void removeUselessSubBoxes();
	std::ostream& print(std::ostream&);
};

#endif