A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::NodeFragmentObject Class Referencefinal

A typed raw fragment carried through a fragment-view Flow pipeline. More...

#include <cpp/a11/flow/values.h>

Inheritance diagram for a11::flow::NodeFragmentObject:
[legend]

Public Member Functions

 NodeFragmentObject (data::NodeFragment fragment)
 
const data::NodeFragment & fragment () const
 
std::string Tag () const override
 The tag the host knows this type by, for a message.
 
std::string Text () const override
 What as_text gives: what the value is on the wire, not its repr.
 
bool Truthy () const override
 Whether the value counts as true.
 
std::optional< size_t > Size () const override
 How many things it holds, where that means anything.
 
Value Field (std::string_view name) const override
 value.name, or a null value when there is no such field.
 
Value Element (const Value &key) const override
 value[key].
 
std::optional< Value > FindField (std::string_view name) const override
 A field or element with its presence retained, including a null value.
 
bool Equals (const HostObject &other) const override
 Whether this is the same value as other, by the host's own equality.
 
- Public Member Functions inherited from a11::flow::HostObject
virtual ~HostObject ()=default
 
virtual std::optional< Value > FindElement (const Value &key) const
 

Detailed Description

A typed raw fragment carried through a fragment-view Flow pipeline.

Constructor & Destructor Documentation

◆ NodeFragmentObject()

a11::flow::NodeFragmentObject::NodeFragmentObject ( data::NodeFragment  fragment)
inlineexplicit

Member Function Documentation

◆ Element()

Value a11::flow::NodeFragmentObject::Element ( const Value &  key) const
overridevirtual

value[key].

Implements a11::flow::HostObject.

◆ Equals()

bool a11::flow::NodeFragmentObject::Equals ( const HostObject &  other) const
overridevirtual

Whether this is the same value as other, by the host's own equality.

Implements a11::flow::HostObject.

◆ Field()

Value a11::flow::NodeFragmentObject::Field ( std::string_view  name) const
overridevirtual

value.name, or a null value when there is no such field.

Reading a field a producer did not send answers nothing rather than failing, which is what lets a flow say if not thing.field.

Implements a11::flow::HostObject.

◆ FindField()

std::optional< Value > a11::flow::NodeFragmentObject::FindField ( std::string_view  name) const
overridevirtual

A field or element with its presence retained, including a null value.

Reimplemented from a11::flow::HostObject.

◆ fragment()

const data::NodeFragment & a11::flow::NodeFragmentObject::fragment ( ) const
inline

◆ Size()

std::optional< size_t > a11::flow::NodeFragmentObject::Size ( ) const
overridevirtual

How many things it holds, where that means anything.

Implements a11::flow::HostObject.

◆ Tag()

std::string a11::flow::NodeFragmentObject::Tag ( ) const
overridevirtual

The tag the host knows this type by, for a message.

Implements a11::flow::HostObject.

◆ Text()

std::string a11::flow::NodeFragmentObject::Text ( ) const
overridevirtual

What as_text gives: what the value is on the wire, not its repr.

Implements a11::flow::HostObject.

◆ Truthy()

bool a11::flow::NodeFragmentObject::Truthy ( ) const
overridevirtual

Whether the value counts as true.

Implements a11::flow::HostObject.


The documentation for this class was generated from the following files: