#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;
|
|
};
|