-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntitySet.cpp
More file actions
33 lines (28 loc) · 814 Bytes
/
Copy pathEntitySet.cpp
File metadata and controls
33 lines (28 loc) · 814 Bytes
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
//
// Created by gmook on 4/2/2021.
//
#include <iostream>
#include "EntitySet.hpp"
//Constructor
EntitySet::EntitySet() {
}
void EntitySet::setterForMatrix(std::vector<std::pair<std::string, double>> settingMatrix) {
currentMatrix = settingMatrix;
}
std::vector<std::pair<std::string, double>> EntitySet::getterForMatrix() {
return currentMatrix;
}
void EntitySet::addEntity(EntityInstance &entityInstance) {
instances.push_back(entityInstance);
}
void EntitySet::print() {
std::cout << "[" << std::endl;
for(int i = 0; i < instances.size(); i++) {
int last = instances.size() - 1;
if(i == last)
instances.at(i).print(5,false);
else
instances.at(i).print(5, true);
}
std::cout << "]" << std::endl;
}