|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
One flow file, compiled: the plans, the graphs, and the tree they borrow. More...
#include <cpp/a11/flow/runtime.h>
Public Member Functions | |
| const Program & | program () const |
| const std::string & | source () const |
| const std::string & | source_name () const |
| const std::vector< Diagnostic > & | diagnostics () const |
| const std::vector< ResolvedFlow > & | flows () const |
| The flows in the order they were declared. | |
| const ResolvedFlow *absl_nullable | Flow (std::string_view name) const |
The flow of this name, or nullptr. Never the entry flow. | |
| const ResolvedFlow *absl_nullable | Entry () const |
The file's entry point – flow { ... } – or nullptr. | |
Static Public Member Functions | |
| static absl::StatusOr< std::shared_ptr< CompiledProgram > > | Compile (std::string source, std::string source_name={}) |
Compile source, or fail with the first error the way flow.loads does. | |
One flow file, compiled: the plans, the graphs, and the tree they borrow.
A graph points into the parse tree it was resolved from, so the two have one owner and one lifetime. Held by shared_ptr because a registered flow's handler outlives whatever compiled it – register the flows and drop the program, and the handlers still work.
|
static |
Compile source, or fail with the first error the way flow.loads does.
The strict door: the parser and the resolver both recover and report everything, and this turns the first Severity::kError into a status with the line and column on it. Everything less than an error is kept for a caller that wants to see it.
|
inline |
| const ResolvedFlow *absl_nullable a11::flow::CompiledProgram::Entry | ( | ) | const |
The file's entry point – flow { ... } – or nullptr.
| const ResolvedFlow *absl_nullable a11::flow::CompiledProgram::Flow | ( | std::string_view | name | ) | const |
The flow of this name, or nullptr. Never the entry flow.
|
inline |
The flows in the order they were declared.
|
inline |
|
inline |
|
inline |