Awkward Array: FormBuilder< T, I > Class Template Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
FormBuilder< T, I > Class Template Referenceabstract

Abstract base class for nodes within a LayoutBuilder Every builder will have an output buffer based on the key_format="part{partition}-{form_key}-{attribute}". More...

`#include <FormBuilder.h>`

Inheritance diagram for FormBuilder< T, I >:

## Public Member Functions
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 const std::string | classname () const =0
| User-friendly name of this class.
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).
virtual ssize_t | len (const ForthOutputBufferMap &outputs) const =0
| The builder's output buffer length.
virtual bool | is_complex () const
virtual const std::string | vm_output () const =0
| AwkwardForth virtual machine instructions of the data outputs.
virtual const std::string | vm_output_data () const =0
| AwkwardForth virtual machine data output key.
virtual const std::string | vm_func () const =0
| AwkwardForth virtual machine instructions of the array builder function.
virtual const std::string | vm_func_name () const =0
| The array builder VM function name.
virtual const std::string | vm_func_type () const =0
| The array builder VM function type.
virtual const std::string | vm_from_stack () const =0
| AwkwardForth virtual machine instructions to retrieve the data from the VM stack.
virtual const std::string | vm_error () const =0
| Error messages in the AwkwardForth virtual machine instructions.
virtual void | tag (int8_t x)
| Adds an integer value `x` to the accumulated data.
virtual void | boolean (bool x, LayoutBuilderPtr< T, I > builder)
| Adds a boolean value `x` to the accumulated data.
virtual void | int64 (int64_t x, LayoutBuilderPtr< T, I > builder)
| Adds an integer value `x` to the accumulated data.
virtual void | float64 (double x, LayoutBuilderPtr< T, I > builder)
| Adds a real value `x` to the accumulated data.
virtual void | complex (std::complex< double > x, LayoutBuilderPtr< T, I > builder)
| Adds a complex value `x` to the accumulated data.
virtual void | bytestring (const std::string &x, LayoutBuilderPtr< T, I > builder)
| Adds an unencoded bytestring `x` in STL format to the accumulated data.
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.
virtual void | begin_list (LayoutBuilderPtr< T, I > builder)
| Begins building a nested list.
virtual void | end_list (LayoutBuilderPtr< T, I > builder)
| Ends a nested list.
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::FormBuilder< T, I >

Abstract base class for nodes within a LayoutBuilder Every builder will have an output buffer based on the key_format="part{partition}-{form_key}-{attribute}".

## Constructor & Destructor Documentation

## ◆ ~FormBuilder()

virtual ~FormBuilder | ( |  | ) |
| virtual

Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted.

## Member Function Documentation

## ◆ active()

virtual bool active | ( |  | ) |
| inlinevirtual

If `true`, this node has started but has not finished a multi-step command (e.g. `begin_list ... end_list`).

Reimplemented in ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, and RecordArrayBuilder< T, I >.

## ◆ begin_list()

virtual void begin_list | ( | LayoutBuilderPtr< T, I > | builder | ) |
| inlinevirtual

Begins building a nested list.

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ boolean()

virtual void boolean | ( | bool | x,
|  | LayoutBuilderPtr< T, I > | builder
| ) |  |
| inlinevirtual

Adds a boolean value `x` to the accumulated data.

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ bytestring()

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

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

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ classname()

virtual const std::string classname | ( |  | ) | const
| pure virtual

User-friendly name of this class.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ complex()

virtual void complex | ( | std::complex< double > | x,
|  | LayoutBuilderPtr< T, I > | builder
| ) |  |
| inlinevirtual

Adds a complex value `x` to the accumulated data.

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ end_list()

virtual void end_list | ( | LayoutBuilderPtr< T, I > | builder | ) |
| inlinevirtual

Ends a nested list.

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ float64()

virtual void float64 | ( | double | x,
|  | LayoutBuilderPtr< T, I > | builder
| ) |  |
| inlinevirtual

Adds a real value `x` to the accumulated data.

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ int64()

virtual void int64 | ( | int64_t | x,
|  | LayoutBuilderPtr< T, I > | builder
| ) |  |
| inlinevirtual

Adds an integer value `x` to the accumulated data.

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ is_complex()

virtual bool is_complex | ( |  | ) | const
| inlinevirtual

Reimplemented in NumpyArrayBuilder< T, I >.

## ◆ len()

virtual ssize_t len | ( | const ForthOutputBufferMap & | outputs | ) | const
| pure virtual

The builder's output buffer length.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ parameters_as_string()

virtual std::string parameters_as_string | ( | const util::Parameters & | parameters | ) | const
| inlinevirtual

FIXME: find if it's already implemented in utils.

## ◆ string()

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

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

Reimplemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ tag()

virtual void tag | ( | int8_t | x | ) |
| inlinevirtual

Adds an integer value `x` to the accumulated data.

Reimplemented in UnionArrayBuilder< T, I >.

## ◆ to_buffers()

virtual const std::string to_buffers | ( | BuffersContainer & | container,
|  | const ForthOutputBufferMap & | outputs
| ) |  | const
| pure virtual

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

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ vm_error()

virtual const std::string vm_error | ( |  | ) | const
| pure virtual

Error messages in the AwkwardForth virtual machine instructions.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ vm_from_stack()

virtual const std::string vm_from_stack | ( |  | ) | const
| pure virtual

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

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ vm_func()

virtual const std::string vm_func | ( |  | ) | const
| pure virtual

AwkwardForth virtual machine instructions of the array builder function.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ vm_func_name()

virtual const std::string vm_func_name | ( |  | ) | const
| pure virtual

The array builder VM function name.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ vm_func_type()

virtual const std::string vm_func_type | ( |  | ) | const
| pure virtual

The array builder VM function type.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ vm_output()

virtual const std::string vm_output | ( |  | ) | const
| pure virtual

AwkwardForth virtual machine instructions of the data outputs.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

## ◆ vm_output_data()

virtual const std::string vm_output_data | ( |  | ) | const
| pure virtual

AwkwardForth virtual machine data output key.

Implemented in BitMaskedArrayBuilder< T, I >, ByteMaskedArrayBuilder< T, I >, EmptyArrayBuilder< T, I >, IndexedArrayBuilder< T, I >, IndexedOptionArrayBuilder< T, I >, ListArrayBuilder< T, I >, ListOffsetArrayBuilder< T, I >, NumpyArrayBuilder< T, I >, RecordArrayBuilder< T, I >, RegularArrayBuilder< T, I >, UnionArrayBuilder< T, I >, and UnmaskedArrayBuilder< T, I >.

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

- include/awkward/layoutbuilder/FormBuilder.h