|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
An immutable Flow value with shared containers and long text. More...
#include <cpp/a11/flow/values.h>
Classes | |
| struct | PackedList |
| class | Pairs |
| struct | StatusPayload |
| struct | WindowList |
Public Types | |
| enum class | Kind { kNull , kBool , kInteger , kDouble , kTypedInteger , kTypedFloat , kString , kBytes , kList , kObject , kDuration , kTime , kChunk , kHost } |
Public Member Functions | |
| Value ()=default | |
| bool | is_option () const |
| Kind | kind () const |
| bool | IsNull () const |
| bool | IsNumber () const |
| bool | IsTimelike () const |
| bool | IsTextlike () const |
| Whether the value is one the language itself can take apart: a string or a byte string, which index and slice but are not containers of values. | |
| bool | boolean () const |
| std::int64_t | integer () const |
| double | number () const |
| absl::uint128 | magnitude () const |
| bool | negative () const |
| bool | numeric_signed () const |
| int | numeric_bits () const |
| bool | is_legacy_number () const |
| const std::string & | text () const |
| const std::vector< Value > & | items () const |
| size_t | list_size () const |
| Value | list_at (size_t index) const |
| bool | has_packed_element_type (std::string_view name) const |
| const Pairs & | pairs () const |
| const absl::Status *absl_nullable | native_status () const |
| absl::Duration | duration () const |
| absl::Time | time () const |
| const data::Chunk & | chunk () const |
| const HostObject & | host () const |
| const std::shared_ptr< const HostObject > & | host_object () const |
| const Value *absl_nullable | Get (std::string_view key) const |
The value at key of an object, or nullptr. | |
Static Public Member Functions | |
| static Value | Null () |
| static Value | Bool (bool value) |
| static Value | Integer (std::int64_t value) |
| static Value | Double (double value) |
| static Value | TypedInteger (absl::uint128 magnitude, bool negative, int bits, bool is_signed) |
| static Value | TypedFloat (double value, int bits) |
| static Value | LegacyNumber (Value value) |
| static Value | String (std::string value) |
| static Value | Bytes (data::Bytes value) |
| static Value | List (std::vector< Value > items) |
| static Value | List (std::vector< Value > items, std::string_view element_type) |
| static Value | Object (Pairs pairs) |
| static Value | Status (absl::Status status, Pairs fields) |
| static Value | Option (std::optional< Value > value) |
| static Value | Duration (absl::Duration value) |
| static Value | Time (absl::Time value) |
| static Value | Chunk (data::Chunk chunk) |
| static Value | Host (std::shared_ptr< const HostObject > object) |
| static Value | Of (const syntax::Constant &constant) |
The value a Constant – a literal, or a folded literal expression – is. | |
Friends | |
| class | WindowBuffer |
| bool | operator== (const Value &left, const Value &right) |
Whether the two values are equal, as == in a flow decides it. | |
An immutable Flow value with shared containers and long text.
Integer and floating-point values retain distinct renderings.
|
strong |
|
default |
|
static |
| bool a11::flow::Value::boolean | ( | ) | const |
|
static |
| const data::Chunk & a11::flow::Value::chunk | ( | ) | const |
|
static |
|
static |
| absl::Duration a11::flow::Value::duration | ( | ) | const |
|
static |
| const Value *absl_nullable a11::flow::Value::Get | ( | std::string_view | key | ) | const |
The value at key of an object, or nullptr.
| bool a11::flow::Value::has_packed_element_type | ( | std::string_view | name | ) | const |
| const HostObject & a11::flow::Value::host | ( | ) | const |
|
static |
| const std::shared_ptr< const HostObject > & a11::flow::Value::host_object | ( | ) | const |
| std::int64_t a11::flow::Value::integer | ( | ) | const |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Whether the value is one the language itself can take apart: a string or a byte string, which index and slice but are not containers of values.
|
inline |
| const std::vector< Value > & a11::flow::Value::items | ( | ) | const |
|
inline |
| Value a11::flow::Value::list_at | ( | size_t | index | ) | const |
| size_t a11::flow::Value::list_size | ( | ) | const |
| absl::uint128 a11::flow::Value::magnitude | ( | ) | const |
| const absl::Status * a11::flow::Value::native_status | ( | ) | const |
|
inline |
|
inlinestatic |
| double a11::flow::Value::number | ( | ) | const |
|
inline |
|
inline |
|
static |
The value a Constant – a literal, or a folded literal expression – is.
| const Value::Pairs & a11::flow::Value::pairs | ( | ) | const |
|
static |
| const std::string & a11::flow::Value::text | ( | ) | const |
| absl::Time a11::flow::Value::time | ( | ) | const |
|
static |
|
static |
|
static |
Whether the two values are equal, as == in a flow decides it.
|
friend |