-
Notifications
You must be signed in to change notification settings - Fork 2
/
ChartStructure.hpp
57 lines (47 loc) · 1.19 KB
/
ChartStructure.hpp
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
// ChartStructure.hpp
//
// Simple class to store essential information about a
// two d chart for Excel:
//
// Actual data: Vector
// Chart title
// Horizontal and vertical texts
// Legend text (describes the meaning of the chart line)
//
// NB: All code is inline and we use struct (all public members).
// It is more like a record than a class.
//
// (C) Datasim Education BV 2005
//
#ifndef ChartStructure_HPP
#define ChartStructure_HPP
#include <string>
#include <list>
#include <iostream>
#include "VectorsAndMatrices\Vector.cpp"
using namespace std;
struct ChartStructure
{
// Optimise later to work with pointers (get it right)
Vector<double, long> xdata;
Vector<double, long> ydata;
string title;
string horizontal;
string vertical;
string legend;
// Default constructor, default text only
ChartStructure()
{
title = string("Title");
horizontal = string("X axis");
vertical = string("Y axis");
legend = string("Legend");
}
void print() const
{
cout << title << ", " << horizontal << ", " << vertical
<< ", " << legend << endl;
}
};
typedef list<ChartStructure> ChartStructureList;
#endif