#include <Value.hpp>
Definition at line 59 of file Value.hpp.
◆ Iterator
◆ ProcType
◆ Value_t
Initial value: std::variant<
double,
std::string,
internal::Closure,
UserType,
std::vector<Value>,
>
Value(*)(std::vector< Value > &, VM *) ProcType
Value() noexcept
Construct a new Value object.
Definition at line 65 of file Value.hpp.
◆ Value() [1/12]
◆ Value() [2/12]
◆ Value() [3/12]
template<typename T >
Ark::Value::Value |
( |
const ValueType | type, |
|
|
T && | value ) |
|
inlinenoexcept |
Construct a new Value object.
Use at your own risks. Asking for a value type N and putting a non-matching value will result in errors at runtime.
- Template Parameters
-
- Parameters
-
type | value type wanted |
value | value needed |
Definition at line 100 of file Value.hpp.
◆ Value() [4/12]
Ark::Value::Value |
( |
int | value | ) |
|
|
explicitnoexcept |
◆ Value() [5/12]
Ark::Value::Value |
( |
double | value | ) |
|
|
explicitnoexcept |
◆ Value() [6/12]
Ark::Value::Value |
( |
const std::string & | value | ) |
|
|
explicitnoexcept |
◆ Value() [7/12]
◆ Value() [8/12]
◆ Value() [9/12]
Ark::Value::Value |
( |
std::vector< Value > && | value | ) |
|
|
explicitnoexcept |
◆ Value() [10/12]
◆ Value() [11/12]
◆ Value() [12/12]
Ark::Value::Value |
( |
Value * | ref | ) |
|
|
explicitnoexcept |
◆ closure()
◆ constList()
const std::vector< Value > & Ark::Value::constList |
( |
| ) |
const |
|
inlinenodiscard |
◆ isFunction()
bool Ark::Value::isFunction |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ isIndexable()
bool Ark::Value::isIndexable |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ list()
std::vector< Value > & Ark::Value::list |
( |
| ) |
|
|
inlinenodiscard |
◆ number()
double Ark::Value::number |
( |
| ) |
const |
|
inlinenodiscard |
◆ pageAddr()
◆ proc()
const ProcType & Ark::Value::proc |
( |
| ) |
const |
|
inlinenodiscardprivate |
◆ push_back() [1/2]
void Ark::Value::push_back |
( |
const Value & | value | ) |
|
Add an element to the list held by the value (if the value type is set to list)
- Parameters
-
Definition at line 57 of file Value.cpp.
References list().
Referenced by Ark::VM::safeRun().
◆ push_back() [2/2]
void Ark::Value::push_back |
( |
Value && | value | ) |
|
Add an element to the list held by the value (if the value type is set to list)
- Parameters
-
Definition at line 62 of file Value.cpp.
References list().
◆ refClosure()
◆ reference()
Value * Ark::Value::reference |
( |
| ) |
const |
|
inlinenodiscard |
◆ string()
const std::string & Ark::Value::string |
( |
| ) |
const |
|
inlinenodiscard |
◆ stringRef()
std::string & Ark::Value::stringRef |
( |
| ) |
|
|
inlinenodiscard |
◆ toString()
std::string Ark::Value::toString |
( |
VM & | vm | ) |
const |
|
noexcept |
Definition at line 67 of file Value.cpp.
References Ark::Closure, Ark::CProc, Ark::False, Ark::InstPtr, Ark::List, Ark::Nil, Ark::Number, Ark::PageAddr, Ark::Reference, Ark::String, Ark::True, Ark::Undefined, and Ark::User.
Referenced by Ark::VM::safeRun().
◆ typeNum()
uint8_t Ark::Value::typeNum |
( |
| ) |
const |
|
inlinenodiscardconstexprprivatenoexcept |
◆ usertype()
const UserType & Ark::Value::usertype |
( |
| ) |
const |
|
inlinenodiscard |
◆ usertypeRef()
◆ valueType()
◆ Ark::BytecodeReader
◆ Ark::VM
◆ operator!
◆ operator<
◆ operator==
◆ m_type
◆ m_value
The documentation for this class was generated from the following files:
- /Users/fola/Documents/ArkScript/Ark/include/Ark/VM/Value.hpp
- /Users/fola/Documents/ArkScript/Ark/src/arkreactor/VM/Value.cpp