3#ifndef AWKWARD_UNIONBUILDER_H_ 
    4#define AWKWARD_UNIONBUILDER_H_ 
   76      datetime(int64_t x, 
const std::string& unit) 
override;
 
   79      timedelta(int64_t x, 
const std::string& unit) 
override;
 
   82      string(
const char* x, int64_t 
length, 
const char* encoding) 
override;
 
  103      field(
const char* key, 
bool check) 
override;
 
  117    const std::vector<BuilderPtr>& 
contents()
 const { 
return contents_; }
 
  118    std::vector<BuilderPtr>& 
builders() { 
return contents_; }
 
  126    std::vector<BuilderPtr> contents_;
 
 
Abstract class to represent the output of ak.to_buffers. In Python, this would be a dict of NumPy arr...
Definition Builder.h:20
 
Abstract base class for nodes within an ArrayBuilder that cumulatively discover an array's type and f...
Definition Builder.h:41
 
Discontiguous, one-dimensional buffer (which consists of multiple contiguous, one-dimensional panels)...
Definition GrowableBuffer.h:233
 
Builder node for accumulated records.
Definition RecordBuilder.h:18
 
Builder node for accumulated tuples.
Definition TupleBuilder.h:18
 
const BuilderPtr real(double x) override
Adds a real value x to the accumulated data.
 
const BuilderPtr endlist() override
Ends a nested list.
 
const BuilderPtr timedelta(int64_t x, const std::string &unit) override
Adds a timedelta value x to the accumulated data.
 
void field(const char *key, bool check) override
Sets the pointer to a given record field key; the next command will fill that slot.
 
const BuilderPtr complex(std::complex< double > x) override
Adds a complex value x to the accumulated data.
 
const BuilderPtr index(int64_t index) override
Sets the pointer to a given tuple field index; the next command will fill that slot.
 
int64_t length() const override
Current length of the accumulated array.
 
const BuilderPtr endrecord() override
Ends a record.
 
bool active() const override
If true, this node has started but has not finished a multi-step command (e.g. beginX ....
 
const BuilderPtr string(const char *x, int64_t length, const char *encoding) override
Adds a string value x with a given length and encoding to the accumulated data.
 
const BuilderOptions & options() const
Definition UnionBuilder.h:109
 
static const BuilderPtr fromsingle(const BuilderOptions &options, const BuilderPtr &firstcontent)
 
const BuilderPtr integer(int64_t x) override
Adds an integer value x to the accumulated data.
 
int8_t current()
Definition UnionBuilder.h:120
 
GrowableBuffer< int64_t > & index_buffer()
Definition UnionBuilder.h:115
 
const GrowableBuffer< int8_t > & tags() const
Definition UnionBuilder.h:111
 
UnionBuilder(const BuilderOptions &options, GrowableBuffer< int8_t > tags, GrowableBuffer< int64_t > index, std::vector< BuilderPtr > &contents)
Create a UnionBuilder from a full set of parameters.
 
const BuilderPtr datetime(int64_t x, const std::string &unit) override
Adds a datetime value x to the accumulated data.
 
const BuilderPtr beginrecord(const char *name, bool check) override
Begins building a record with an optional name.
 
GrowableBuffer< int8_t > & tags_buffer()
Definition UnionBuilder.h:112
 
const BuilderPtr null() override
Adds a null value to the accumulated data.
 
const GrowableBuffer< int64_t > & index() const
Definition UnionBuilder.h:114
 
const std::vector< BuilderPtr > & contents() const
Definition UnionBuilder.h:117
 
const std::string to_buffers(BuffersContainer &container, int64_t &form_key_id) const override
Copy the current snapshot into the BuffersContainer and return a Form as a std::string (JSON).
 
const BuilderPtr beginlist() override
Begins building a nested list.
 
const BuilderPtr boolean(bool x) override
Adds a boolean value x to the accumulated data.
 
std::vector< BuilderPtr > & builders()
Definition UnionBuilder.h:118
 
const BuilderPtr begintuple(int64_t numfields) override
Begins building a tuple with a fixed number of fields.
 
const BuilderPtr endtuple() override
Ends a tuple.
 
const std::string classname() const override
User-friendly name of this class: "UnionBuilder".
 
void clear() override
Removes all accumulated data without resetting the type knowledge.
 
#define EXPORT_SYMBOL
Definition common.h:14
 
Definition ArrayBuilder.h:14
 
Options< int64_t, double > BuilderOptions
Definition BuilderOptions.h:56
 
std::shared_ptr< Builder > BuilderPtr
Definition ArrayBuilder.h:16