Awkward Array: EmptyRecord< IS_TUPLE > Class Template Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
EmptyRecord< IS_TUPLE > Class Template Reference

Builds an Empty RecordArray which has has `zero` contents. It still represents a non-empty array. In this case, its length is specified by length. More...

`#include <LayoutBuilder.h>`

## Public Member Functions
| EmptyRecord ()
| Creates a new EmptyRecord layout builder. More...
void | append () noexcept
| Inserts an empty record. More...
void | extend (size_t size) noexcept
| Inserts `size` number of empty records. More...
const std::string & | parameters () const noexcept
| Parameters for the builder form. More...
void | set_parameters (std::string parameter) noexcept
| Sets the form parameters. More...
void | set_id (size_t &id) noexcept
| Assigns a unique ID to each node. More...
void | clear () noexcept
| Clears the builder contents, the length returns to zero. More...
size_t | length () const noexcept
| Current number of records. More...
bool | is_valid (std::string &) const noexcept
| Checks for validity and consistency. More...
void | buffer_nbytes (std::map< std::string, size_t > &names_nbytes) const noexcept
void | to_buffers (std::map< std::string, void * > &buffers) const noexcept
void | to_char_buffers (std::map< std::string, uint8_t * > &buffers) const noexcept
| Copies and concatenates all the accumulated data in the builder to a map of user-allocated buffers. More...
std::string | form () const noexcept
| Generates a unique description of the builder and its contents in the form of a JSON-like string. More...

## Detailed Description

template<bool IS_TUPLE>
class awkward::LayoutBuilder::EmptyRecord< IS_TUPLE >

Builds an Empty RecordArray which has has `zero` contents. It still represents a non-empty array. In this case, its length is specified by length.

Template Parameters

  IS_TUPLE | A boolean value which determines whether the builder contains Tuples or Records.

## Constructor & Destructor Documentation

## ◆ EmptyRecord()

EmptyRecord | ( |  | ) |
| inline

Creates a new EmptyRecord layout builder.

## Member Function Documentation

## ◆ append()

void append | ( |  | ) |
| inlinenoexcept

Inserts an empty record.

## ◆ buffer_nbytes()

void buffer_nbytes | ( | std::map< std::string, size_t > & | names_nbytes | ) | const
| inlinenoexcept

## ◆ clear()

void clear | ( |  | ) |
| inlinenoexcept

Clears the builder contents, the length returns to zero.

## ◆ extend()

void extend | ( | size_t | size | ) |
| inlinenoexcept

Inserts `size` number of empty records.

Just an interface; not actually faster than calling append many times.

## ◆ form()

std::string form | ( |  | ) | const
| inlinenoexcept

Generates a unique description of the builder and its contents in the form of a JSON-like string.

## ◆ is_valid()

bool is_valid | ( | std::string & |  | ) | const
| inlinenoexcept

Checks for validity and consistency.

## ◆ length()

size_t length | ( |  | ) | const
| inlinenoexcept

Current number of records.

## ◆ parameters()

const std::string & parameters | ( |  | ) | const
| inlinenoexcept

Parameters for the builder form.

## ◆ set_id()

void set_id | ( | size_t & | id | ) |
| inlinenoexcept

Assigns a unique ID to each node.

## ◆ set_parameters()

void set_parameters | ( | std::string | parameter | ) |
| inlinenoexcept

Sets the form parameters.

## ◆ to_buffers()

void to_buffers | ( | std::map< std::string, void * > & | buffers | ) | const
| inlinenoexcept

## ◆ to_char_buffers()

void to_char_buffers | ( | std::map< std::string, uint8_t * > & | buffers | ) | const
| inlinenoexcept

Copies and concatenates all the accumulated data in the builder to a map of user-allocated buffers.

The map keys and the buffer sizes are obtained from buffer_nbytes

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

- src/awkward/_v2/cpp-headers/awkward/LayoutBuilder.h