Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Structures and data algorithms / Project / exc / Box.h
blob: 2a0c71b18b2059cfabde039312e05e152839852a (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
#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