95 lines
2.0 KiB
C++
95 lines
2.0 KiB
C++
#ifndef RJP_INTEGRAL_HPP
|
|
#define RJP_INTEGRAL_HPP
|
|
|
|
#include "value.hpp"
|
|
#include <rjp.h>
|
|
|
|
namespace rjp{
|
|
|
|
class integer : public value
|
|
{
|
|
public:
|
|
using underlying_type = RJP_int;
|
|
public:
|
|
using value::value;
|
|
integer(underlying_type i);
|
|
integer(void);
|
|
integer(const value& val);
|
|
integer(value&& val);
|
|
integer(const value& val, underlying_type i);
|
|
integer(value&& val, underlying_type i);
|
|
|
|
integer(const integer&) = default;
|
|
integer(integer&&) = default;
|
|
~integer(void) = default;
|
|
integer& operator=(const integer&) = default;
|
|
integer& operator=(integer&&) = default;
|
|
|
|
underlying_type get(void)const;
|
|
void set(underlying_type i);
|
|
|
|
};
|
|
class dfloat : public value
|
|
{
|
|
public:
|
|
using underlying_type = RJP_float;
|
|
public:
|
|
using value::value;
|
|
dfloat(underlying_type i);
|
|
dfloat(void);
|
|
dfloat(const value& val);
|
|
dfloat(value&& val);
|
|
dfloat(const value& val, underlying_type i);
|
|
dfloat(value&& val, underlying_type i);
|
|
|
|
dfloat(const dfloat&) = default;
|
|
dfloat(dfloat&&) = default;
|
|
~dfloat(void) = default;
|
|
dfloat& operator=(const dfloat&) = default;
|
|
dfloat& operator=(dfloat&&) = default;
|
|
|
|
underlying_type get(void)const;
|
|
void set(underlying_type i);
|
|
};
|
|
class boolean : public value
|
|
{
|
|
public:
|
|
using underlying_type = RJP_bool;
|
|
public:
|
|
using value::value;
|
|
boolean(underlying_type i);
|
|
boolean(void);
|
|
boolean(const value& val);
|
|
boolean(value&& val);
|
|
boolean(const value& val, underlying_type i);
|
|
boolean(value&& val, underlying_type i);
|
|
|
|
boolean(const boolean&) = default;
|
|
boolean(boolean&&) = default;
|
|
~boolean(void) = default;
|
|
boolean& operator=(const boolean&) = default;
|
|
boolean& operator=(boolean&&) = default;
|
|
|
|
bool get(void)const;
|
|
void set(bool i);
|
|
};
|
|
class null : public value
|
|
{
|
|
public:
|
|
using value::value;
|
|
null(void);
|
|
null(const value& val);
|
|
null(value&& val);
|
|
|
|
null(const null&) = default;
|
|
null(null&&) = default;
|
|
~null(void) = default;
|
|
null& operator=(const null&) = default;
|
|
null& operator=(null&&) = default;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|