2019-09-27 16:35:57 -04:00
|
|
|
#pragma once
|
|
|
|
#include "game/game.hpp"
|
|
|
|
|
|
|
|
namespace game::scripting
|
|
|
|
{
|
2022-01-16 04:42:09 -05:00
|
|
|
class variable_value
|
2019-09-27 16:35:57 -04:00
|
|
|
{
|
|
|
|
public:
|
2022-01-16 04:42:09 -05:00
|
|
|
variable_value() = default;
|
|
|
|
variable_value(const native::VariableValue& value);
|
|
|
|
variable_value(const variable_value& other) noexcept;
|
|
|
|
variable_value(variable_value&& other) noexcept;
|
|
|
|
|
|
|
|
variable_value& operator=(const variable_value& other) noexcept;
|
|
|
|
variable_value& operator=(variable_value&& other) noexcept;
|
|
|
|
|
2019-09-27 16:35:57 -04:00
|
|
|
~variable_value();
|
|
|
|
|
2022-01-16 04:42:09 -05:00
|
|
|
const native::VariableValue& get() const;
|
2019-09-27 16:35:57 -04:00
|
|
|
|
|
|
|
private:
|
2022-01-16 04:42:09 -05:00
|
|
|
void assign(const native::VariableValue& value);
|
|
|
|
void release();
|
|
|
|
|
|
|
|
native::VariableValue value_{{0}, native::SCRIPT_NONE};
|
2019-09-27 16:35:57 -04:00
|
|
|
};
|
|
|
|
}
|