Loading...
Searching...
No Matches
ListArrayBuilder< T, I > Class Template Reference

#include <ListArrayBuilder.h>

Inheritance diagram for ListArrayBuilder< T, I >:
FormBuilder< T, I >

Public Member Functions

 ListArrayBuilder (FormBuilderPtr< T, I > content, const util::Parameters &parameters, const std::string &form_key, const std::string &form_starts, const std::string attribute="offsets", const std::string partition="0")
 Creates a ListArrayBuilder from a full set of parameters. More...
 
const std::string classname () const override
 User-friendly name of this class. More...
 
const std::string to_buffers (BuffersContainer &container, const ForthOutputBufferMap &outputs) const override
 Copy the current snapshot into the BuffersContainer and return a Form as a std::string (JSON). More...
 
const std::string vm_output () const override
 AwkwardForth virtual machine instructions of the data outputs. More...
 
const std::string vm_output_data () const override
 AwkwardForth virtual machine data output key. More...
 
const std::string vm_func () const override
 AwkwardForth virtual machine instructions of the array builder function. More...
 
const std::string vm_func_name () const override
 The array builder VM function name. More...
 
const std::string vm_func_type () const override
 The array builder VM function type. More...
 
const std::string vm_from_stack () const override
 AwkwardForth virtual machine instructions to retrieve the data from the VM stack. More...
 
const std::string vm_error () const override
 Error messages in the AwkwardForth virtual machine instructions. More...
 
void boolean (bool x, LayoutBuilderPtr< T, I > builder) override
 Adds a boolean value x to the accumulated data. More...
 
void int64 (int64_t x, LayoutBuilderPtr< T, I > builder) override
 Adds an integer value x to the accumulated data. More...
 
void float64 (double x, LayoutBuilderPtr< T, I > builder) override
 Adds a real value x to the accumulated data. More...
 
void complex (std::complex< double > x, LayoutBuilderPtr< T, I > builder) override
 Adds a complex value x to the accumulated data. More...
 
void bytestring (const std::string &x, LayoutBuilderPtr< T, I > builder) override
 Adds an unencoded bytestring x in STL format to the accumulated data. More...
 
void string (const std::string &x, LayoutBuilderPtr< T, I > builder) override
 Adds a UTF-8 encoded bytestring x in STL format to the accumulated data. More...
 
void begin_list (LayoutBuilderPtr< T, I > builder) override
 Begins building a nested list. More...
 
void end_list (LayoutBuilderPtr< T, I > builder) override
 Ends a nested list. More...
 
bool active () override
 true if the builder is accumulating data More...
 
const FormBuilderPtr< T, I > content () const
 
const std::string & form_starts () const
 
const util::Parametersform_parameters () const
 
const std::string & form_key () const
 
ssize_t len (const ForthOutputBufferMap &outputs) const override
 The builder's output buffer length. More...
 
- Public Member Functions inherited from FormBuilder< T, I >
virtual ~FormBuilder ()
 Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted. More...
 
virtual const std::string classname () const =0
 User-friendly name of this class. More...
 
virtual const std::string to_buffers (BuffersContainer &container, const ForthOutputBufferMap &outputs) const =0
 Copy the current snapshot into the BuffersContainer and return a Form as a std::string (JSON). More...
 
virtual ssize_t len (const ForthOutputBufferMap &outputs) const =0
 The builder's output buffer length. More...
 
virtual bool is_complex () const
 
virtual const std::string vm_output () const =0
 AwkwardForth virtual machine instructions of the data outputs. More...
 
virtual const std::string vm_output_data () const =0
 AwkwardForth virtual machine data output key. More...
 
virtual const std::string vm_func () const =0
 AwkwardForth virtual machine instructions of the array builder function. More...
 
virtual const std::string vm_func_name () const =0
 The array builder VM function name. More...
 
virtual const std::string vm_func_type () const =0
 The array builder VM function type. More...
 
virtual const std::string vm_from_stack () const =0
 AwkwardForth virtual machine instructions to retrieve the data from the VM stack. More...
 
virtual const std::string vm_error () const =0
 Error messages in the AwkwardForth virtual machine instructions. More...
 
virtual void tag (int8_t x)
 Adds an integer value x to the accumulated data. More...
 
virtual void boolean (bool x, LayoutBuilderPtr< T, I > builder)
 Adds a boolean value x to the accumulated data. More...
 
virtual void int64 (int64_t x, LayoutBuilderPtr< T, I > builder)
 Adds an integer value x to the accumulated data. More...
 
virtual void float64 (double x, LayoutBuilderPtr< T, I > builder)
 Adds a real value x to the accumulated data. More...
 
virtual void complex (std::complex< double > x, LayoutBuilderPtr< T, I > builder)
 Adds a complex value x to the accumulated data. More...
 
virtual void bytestring (const std::string &x, LayoutBuilderPtr< T, I > builder)
 Adds an unencoded bytestring x in STL format to the accumulated data. More...
 
virtual void string (const std::string &x, LayoutBuilderPtr< T, I > builder)
 Adds a UTF-8 encoded bytestring x in STL format to the accumulated data. More...
 
virtual void begin_list (LayoutBuilderPtr< T, I > builder)
 Begins building a nested list. More...
 
virtual void end_list (LayoutBuilderPtr< T, I > builder)
 Ends a nested list. More...
 
virtual bool active ()
 If true, this node has started but has not finished a multi-step command (e.g. begin_list ... end_list). More...
 
virtual std::string parameters_as_string (const util::Parameters &parameters) const
 FIXME: find if it's already implemented in utils. More...
 

Constructor & Destructor Documentation

◆ ListArrayBuilder()

ListArrayBuilder ( FormBuilderPtr< T, I >  content,
const util::Parameters parameters,
const std::string &  form_key,
const std::string &  form_starts,
const std::string  attribute = "offsets",
const std::string  partition = "0" 
)

Creates a ListArrayBuilder from a full set of parameters.

Member Function Documentation

◆ active()

bool active ( )
overridevirtual

true if the builder is accumulating data

Reimplemented from FormBuilder< T, I >.

◆ begin_list()

void begin_list ( LayoutBuilderPtr< T, I >  builder)
overridevirtual

Begins building a nested list.

Reimplemented from FormBuilder< T, I >.

◆ boolean()

void boolean ( bool  x,
LayoutBuilderPtr< T, I >  builder 
)
overridevirtual

Adds a boolean value x to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ bytestring()

void bytestring ( const std::string &  x,
LayoutBuilderPtr< T, I >  builder 
)
overridevirtual

Adds an unencoded bytestring x in STL format to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ classname()

const std::string classname ( ) const
overridevirtual

User-friendly name of this class.

Implements FormBuilder< T, I >.

◆ complex()

void complex ( std::complex< double >  x,
LayoutBuilderPtr< T, I >  builder 
)
overridevirtual

Adds a complex value x to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ content()

const FormBuilderPtr< T, I > content ( ) const
inline

◆ end_list()

void end_list ( LayoutBuilderPtr< T, I >  builder)
overridevirtual

Ends a nested list.

Reimplemented from FormBuilder< T, I >.

◆ float64()

void float64 ( double  x,
LayoutBuilderPtr< T, I >  builder 
)
overridevirtual

Adds a real value x to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ form_key()

const std::string & form_key ( ) const
inline

◆ form_parameters()

const util::Parameters & form_parameters ( ) const
inline

◆ form_starts()

const std::string & form_starts ( ) const
inline

◆ int64()

void int64 ( int64_t  x,
LayoutBuilderPtr< T, I >  builder 
)
overridevirtual

Adds an integer value x to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ len()

ssize_t len ( const ForthOutputBufferMap outputs) const
inlineoverridevirtual

The builder's output buffer length.

Implements FormBuilder< T, I >.

◆ string()

void string ( const std::string &  x,
LayoutBuilderPtr< T, I >  builder 
)
overridevirtual

Adds a UTF-8 encoded bytestring x in STL format to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ to_buffers()

const std::string to_buffers ( BuffersContainer container,
const ForthOutputBufferMap outputs 
) const
overridevirtual

Copy the current snapshot into the BuffersContainer and return a Form as a std::string (JSON).

Implements FormBuilder< T, I >.

◆ vm_error()

const std::string vm_error ( ) const
overridevirtual

Error messages in the AwkwardForth virtual machine instructions.

Implements FormBuilder< T, I >.

◆ vm_from_stack()

const std::string vm_from_stack ( ) const
overridevirtual

AwkwardForth virtual machine instructions to retrieve the data from the VM stack.

Implements FormBuilder< T, I >.

◆ vm_func()

const std::string vm_func ( ) const
overridevirtual

AwkwardForth virtual machine instructions of the array builder function.

Implements FormBuilder< T, I >.

◆ vm_func_name()

const std::string vm_func_name ( ) const
overridevirtual

The array builder VM function name.

Implements FormBuilder< T, I >.

◆ vm_func_type()

const std::string vm_func_type ( ) const
overridevirtual

The array builder VM function type.

Implements FormBuilder< T, I >.

◆ vm_output()

const std::string vm_output ( ) const
overridevirtual

AwkwardForth virtual machine instructions of the data outputs.

Implements FormBuilder< T, I >.

◆ vm_output_data()

const std::string vm_output_data ( ) const
overridevirtual

AwkwardForth virtual machine data output key.

Implements FormBuilder< T, I >.


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