-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataClass.h
53 lines (49 loc) · 1.59 KB
/
DataClass.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
#ifndef DataClass_H
#define DataClass_H
#include "ColorCustom.h"
#include <string>
/*
Author: Daniel Ortyn
Last Update: 2018/22/01
Purpose: CS 481 Project
*/
// a class to hold and manage data with a common index for several sets
class DataClass {
public:
// create a class at index -1 with a "-1" string for a name
DataClass();
// create a class at index(index) and the passed string for a name(name)
DataClass(int index, std::string name);
// delete the object
~DataClass();
// gets the index of the class
int getIndex();
// sets the index of the class, returns previous index
int setIndex(int newIndex);
// gets a copy of the color components for this class
std::vector<double>* getColor();
// sets the color for this class
void setColor(std::vector<double> &newColor);
// sets the color for this class
void setColor(std::vector<double>* newColor);
// gets the name of the class
std::string* getName();
// sets the name of the class, returns previous name
void setName(std::string* newName);
// gets the number of sets in this class
int getSetNumber() const;
// increments the number of sets in this class, and returns the new number of sets
int incrementSetNumber();
// decrements the number of sets in this class, and returns the new number of sets
int decrementSetNumber();
private:
// the vector holding all the data
int index;
// gets the color data of this class should be painted
ColorCustom color;
// gets the name of this class
std::string name;
//a field holding the number of sets in this data class
int setNumber;
};
#endif