You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

33 lines
670 B

#pragma once
#include <iostream>
#include <optional>
class CharacterProperty
{
public:
using StringType = std::string;
using IntegerType = int;
using FloatingType = double;
public:
enum Type {
string,
integer,
floating_point
};
public:
CharacterProperty();
std::optional<StringType> toString() const;
std::optional<IntegerType> toInt() const;
std::optional<FloatingType> toFloat() const;
private:
Type m_valueType;
StringType m_valueString;
IntegerType m_valueInt;
FloatingType m_valueFloat;
};