added type structure and parsing for the csv

This commit is contained in:
2026-03-22 02:26:33 +01:00
parent e06a0e52a4
commit 43ed99bbdd
4 changed files with 127 additions and 9 deletions

25
type.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include <iostream>
#include <vector>
#include <glibmm/ustring.h>
static int currentId = 0;
class Type{
public:
Type(const std::string name){
id = ++currentId;
this->name = name;
std::cout << "Type "<<name<<" constructed. Id: "<<id<<"\n";
}
~Type(){
// std::cout << "Type "<<name<<" destructed "<<id<<"\n";
resistantAgainstTypes.~vector();
weakAgainstTypes.~vector();
}
bool nameMatches(std::string comparison){
return name.compare(comparison) == 0;
}
std::string name;
int id;
std::vector<int> resistantAgainstTypes = std::vector<int>();
std::vector<int> weakAgainstTypes = std::vector<int>();
};