ADD: added serialization and deserialization for the IdentifierClass

This commit is contained in:
Henry Winkel
2023-01-13 20:41:01 +01:00
parent f4c7d8dec2
commit ee98b45532
6 changed files with 43 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
#pragma once
#include "SimCore/SimCore.hpp"
#include <SimCore/SimCore.hpp>
#include <SimCore/UtilFunctions.hpp>
#include <iterator>
#include <utility>
#include <loguru.hpp>
@@ -12,6 +13,7 @@ namespace SimCore {
Identifier() = default;
Identifier(int number,SimCore::ObjectSource ObjectSource) ;
Identifier(std::pair<int, SimCore::ObjectSource> id);
Identifier(std::string str);
int getNumber();
@@ -21,6 +23,8 @@ namespace SimCore {
std::pair<int, SimCore::ObjectSource> getPair();
std::string serialize();
friend bool operator==(const Identifier &lhs,const Identifier &rhs);
private:

View File

@@ -13,6 +13,9 @@ namespace SimCore {
public:
static std::vector<std::string> explode(std::string const & s, char delim);
static bool isNumber(const std::string& s);
};
}