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

Construct a struct using the language's existing shape descriptor. More...

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

Public Member Functions

 StructBuilder (std::string name)
 
 StructBuilder (DtoPlan shape)
 
DtoPlan & shape ()
 
const DtoPlan & shape () const
 
absl::Status AddField (std::string name, syntax::TypeExpression type, bool required=false, std::optional< Expression > default_value={}, std::string description={})
 
absl::StatusOr< std::string > Emit () const
 

Detailed Description

Construct a struct using the language's existing shape descriptor.

Constructor & Destructor Documentation

◆ StructBuilder() [1/2]

a11::flow::StructBuilder::StructBuilder ( std::string  name)
inlineexplicit

◆ StructBuilder() [2/2]

a11::flow::StructBuilder::StructBuilder ( DtoPlan  shape)
inlineexplicit

Member Function Documentation

◆ AddField()

absl::Status a11::flow::StructBuilder::AddField ( std::string  name,
syntax::TypeExpression  type,
bool  required = false,
std::optional< Expression >  default_value = {},
std::string  description = {} 
)

◆ Emit()

absl::StatusOr< std::string > a11::flow::StructBuilder::Emit ( ) const

◆ shape() [1/2]

DtoPlan & a11::flow::StructBuilder::shape ( )
inline

◆ shape() [2/2]

const DtoPlan & a11::flow::StructBuilder::shape ( ) const
inline

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