-
Notifications
You must be signed in to change notification settings - Fork 1
/
layered.h
59 lines (45 loc) · 1.08 KB
/
layered.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* layered.h
* 4/3/2016
*
* CS 372 Sp16
* Group Project 2: Postscript Generator
*/
#ifndef LAYERED_H_INCLUDED
#define LAYERED_H_INCLUDED
#include <initializer_list>
using std::initializer_list;
#include "shape.h"
class Layered : public Shape
{
public:
Layered() : Shape() {};
Layered(int x, int y, initializer_list<Shape*> shapes);
Layered(initializer_list<Shape*> shapes) : Layered(0,0,shapes) {};
string draw() const;
string draw(int x, int y) const;
protected:
/**
* vector of pointers to Shape objects
*/
initializer_list<Shape*> shapes_;
};
class Horizontal: public Layered
{
public:
Horizontal() : Layered() {};
Horizontal(int x, int y, initializer_list<Shape*> shapes);
Horizontal(initializer_list<Shape*> shapes) : Horizontal(0,0,shapes) {};
string draw() const;
string draw(int x, int y) const;
};
class Vertical : public Layered
{
public:
Vertical() : Layered() {};
Vertical(int x, int y, initializer_list<Shape*> shapes);
Vertical(initializer_list<Shape*> shapes) : Vertical(0,0,shapes) {};
string draw() const;
string draw(int x, int y) const;
};
#endif