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

BitMaskedArray builder from a Bit Masked JSON Form. More...

#include <BitMaskedArrayBuilder.h>

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

Public Member Functions

 BitMaskedArrayBuilder (const FormBuilderPtr< T, I > content, const util::Parameters &parameters, const std::string &form_key, const std::string attribute="mask", const std::string partition="0")
 Creates a BitMaskedArrayBuilder from a full set of parameters.
 
const std::string classname () const override
 User-friendly name of this class.
 
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).
 
const std::string vm_output () const override
 AwkwardForth virtual machine instructions of the data outputs.
 
const std::string vm_output_data () const override
 AwkwardForth virtual machine data output key.
 
const std::string vm_func () const override
 AwkwardForth virtual machine instructions of the array builder function.
 
const std::string vm_func_name () const override
 The array builder VM function name.
 
const std::string vm_func_type () const override
 The array builder VM function type.
 
const std::string vm_from_stack () const override
 AwkwardForth virtual machine instructions to retrieve the data from the VM stack.
 
const std::string vm_error () const override
 Error messages in the AwkwardForth virtual machine instructions.
 
void boolean (bool x, LayoutBuilderPtr< T, I > builder) override
 Adds a boolean value x to the accumulated data.
 
void int64 (int64_t x, LayoutBuilderPtr< T, I > builder) override
 Adds an integer value x to the accumulated data.
 
void float64 (double x, LayoutBuilderPtr< T, I > builder) override
 Adds a real value x to the accumulated data.
 
void complex (std::complex< double > x, LayoutBuilderPtr< T, I > builder) override
 Adds a complex value x to the accumulated data.
 
void bytestring (const std::string &x, LayoutBuilderPtr< T, I > builder) override
 Adds an unencoded bytestring x in STL format to the accumulated data.
 
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.
 
void begin_list (LayoutBuilderPtr< T, I > builder) override
 Begins building a nested list.
 
void end_list (LayoutBuilderPtr< T, I > builder) override
 Ends a nested list.
 
const FormBuilderPtr< T, Icontent () const
 Returns this Form content builder.
 
const util::Parametersform_parameters () const
 String-to-JSON map that augments the meaning of this builder Form.
 
ssize_t len (const ForthOutputBufferMap &outputs) const override
 The builder's output buffer length.
 
- 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.
 
virtual bool is_complex () const
 
virtual void tag (int8_t x)
 Adds an integer value x to the accumulated data.
 
virtual bool active ()
 If true, this node has started but has not finished a multi-step command (e.g. begin_list ... end_list).
 
virtual std::string parameters_as_string (const util::Parameters &parameters) const
 FIXME: find if it's already implemented in utils.
 

Detailed Description

template<typename T, typename I>
class awkward::BitMaskedArrayBuilder< T, I >

BitMaskedArray builder from a Bit Masked JSON Form.

Constructor & Destructor Documentation

◆ BitMaskedArrayBuilder()

template<typename T , typename I >
BitMaskedArrayBuilder ( const FormBuilderPtr< T, I > content,
const util::Parameters & parameters,
const std::string & form_key,
const std::string attribute = "mask",
const std::string partition = "0" )

Creates a BitMaskedArrayBuilder from a full set of parameters.

Member Function Documentation

◆ begin_list()

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

Begins building a nested list.

Reimplemented from FormBuilder< T, I >.

◆ boolean()

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

Adds a boolean value x to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ bytestring()

template<typename T , typename I >
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()

template<typename T , typename I >
const std::string classname ( ) const
overridevirtual

User-friendly name of this class.

Implements FormBuilder< T, I >.

◆ complex()

template<typename T , typename I >
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()

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

Returns this Form content builder.

◆ end_list()

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

Ends a nested list.

Reimplemented from FormBuilder< T, I >.

◆ float64()

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

Adds a real value x to the accumulated data.

Reimplemented from FormBuilder< T, I >.

◆ form_parameters()

template<typename T , typename I >
const util::Parameters & form_parameters ( ) const
inline

String-to-JSON map that augments the meaning of this builder Form.

Keys are simple strings, but values are JSON-encoded strings. For this reason, values that represent single strings are double-quoted: e.g. "\"actual_value\"".

◆ int64()

template<typename T , typename I >
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()

template<typename T , typename I >
ssize_t len ( const ForthOutputBufferMap & outputs) const
inlineoverridevirtual

The builder's output buffer length.

Implements FormBuilder< T, I >.

◆ string()

template<typename T , typename I >
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()

template<typename T , typename I >
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()

template<typename T , typename I >
const std::string vm_error ( ) const
overridevirtual

Error messages in the AwkwardForth virtual machine instructions.

Implements FormBuilder< T, I >.

◆ vm_from_stack()

template<typename T , typename I >
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()

template<typename T , typename I >
const std::string vm_func ( ) const
overridevirtual

AwkwardForth virtual machine instructions of the array builder function.

Implements FormBuilder< T, I >.

◆ vm_func_name()

template<typename T , typename I >
const std::string vm_func_name ( ) const
overridevirtual

The array builder VM function name.

Implements FormBuilder< T, I >.

◆ vm_func_type()

template<typename T , typename I >
const std::string vm_func_type ( ) const
overridevirtual

The array builder VM function type.

Implements FormBuilder< T, I >.

◆ vm_output()

template<typename T , typename I >
const std::string vm_output ( ) const
overridevirtual

AwkwardForth virtual machine instructions of the data outputs.

Implements FormBuilder< T, I >.

◆ vm_output_data()

template<typename T , typename I >
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: