2024-02-05 22:25:30 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ehs/EHS.h"
|
|
|
|
#include "ehs/Str.h"
|
|
|
|
|
|
|
|
#include "JsonBase.h"
|
|
|
|
|
|
|
|
namespace ehs
|
|
|
|
{
|
2024-08-15 19:28:30 -07:00
|
|
|
class EHS_LIB_IO JsonNum final : public JsonBase
|
2024-02-05 22:25:30 -08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
float value;
|
|
|
|
|
|
|
|
JsonNum();
|
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(SInt_64 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(UInt_64 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(SInt_32 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(UInt_32 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(SInt_16 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(UInt_16 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(SInt_8 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(UInt_8 value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(double value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
JsonNum(float value);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
|
|
|
JsonNum(const JsonNum& jn) = default;
|
|
|
|
|
|
|
|
operator float() const;
|
|
|
|
|
2024-08-15 19:28:30 -07:00
|
|
|
Str_8 ToStr(UInt_64 level, bool compact) const override;
|
2024-02-05 22:25:30 -08:00
|
|
|
};
|
|
|
|
}
|