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

Typed statements for constructing executable bodies. More...

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

Public Member Functions

const std::string & source () const
 
std::string TakeSource () &&
 

Static Public Member Functions

static absl::StatusOr< Statement > Initialize (std::string_view name, const Expression &value, std::optional< syntax::TypeExpression > type={})
 
static absl::StatusOr< Statement > Pipe (const Expression &value, const Expression &destination)
 
static absl::StatusOr< Statement > Wait (const Expression &subject, bool close=false)
 
static absl::StatusOr< Statement > WaitAll ()
 
static absl::StatusOr< Statement > Cancel (const Expression &subject)
 
static absl::StatusOr< Statement > Fail (const Expression &code, std::optional< Expression > message={})
 
static absl::StatusOr< Statement > If (const Expression &condition, const std::vector< Statement > &then_body, const std::vector< Statement > &else_body={})
 
static absl::StatusOr< Statement > IfSome (std::string_view name, const Expression &option, const std::vector< Statement > &then_body, const std::vector< Statement > &else_body={})
 
static absl::StatusOr< Statement > For (std::string_view variable, const Expression &source, const std::vector< Statement > &body, int parallel=1)
 
static absl::StatusOr< Statement > After (const std::vector< Expression > &subjects, const std::vector< Statement > &body, bool tolerant=false)
 
static absl::StatusOr< Statement > Block (const std::vector< Statement > &body, bool tolerant=false)
 

Detailed Description

Typed statements for constructing executable bodies.

Member Function Documentation

◆ After()

absl::StatusOr< Statement > a11::flow::Statement::After ( const std::vector< Expression > &  subjects,
const std::vector< Statement > &  body,
bool  tolerant = false 
)
static

◆ Block()

absl::StatusOr< Statement > a11::flow::Statement::Block ( const std::vector< Statement > &  body,
bool  tolerant = false 
)
static

◆ Cancel()

absl::StatusOr< Statement > a11::flow::Statement::Cancel ( const Expression &  subject)
static

◆ Fail()

absl::StatusOr< Statement > a11::flow::Statement::Fail ( const Expression &  code,
std::optional< Expression >  message = {} 
)
static

◆ For()

absl::StatusOr< Statement > a11::flow::Statement::For ( std::string_view  variable,
const Expression &  source,
const std::vector< Statement > &  body,
int  parallel = 1 
)
static

◆ If()

absl::StatusOr< Statement > a11::flow::Statement::If ( const Expression &  condition,
const std::vector< Statement > &  then_body,
const std::vector< Statement > &  else_body = {} 
)
static

◆ IfSome()

absl::StatusOr< Statement > a11::flow::Statement::IfSome ( std::string_view  name,
const Expression &  option,
const std::vector< Statement > &  then_body,
const std::vector< Statement > &  else_body = {} 
)
static

◆ Initialize()

absl::StatusOr< Statement > a11::flow::Statement::Initialize ( std::string_view  name,
const Expression &  value,
std::optional< syntax::TypeExpression >  type = {} 
)
static

◆ Pipe()

absl::StatusOr< Statement > a11::flow::Statement::Pipe ( const Expression &  value,
const Expression &  destination 
)
static

◆ source()

const std::string & a11::flow::Statement::source ( ) const
inline

◆ TakeSource()

std::string a11::flow::Statement::TakeSource ( ) &&
inline

◆ Wait()

absl::StatusOr< Statement > a11::flow::Statement::Wait ( const Expression &  subject,
bool  close = false 
)
static

◆ WaitAll()

absl::StatusOr< Statement > a11::flow::Statement::WaitAll ( )
static

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