3#ifndef AWKWARD_FILLABLE_H_
4#define AWKWARD_FILLABLE_H_
27 copy_buffer(
const std::string& name,
const void* source, int64_t num_bytes) = 0;
31 full_buffer(
const std::string& name, int64_t length, int64_t value,
const std::string& dtype) = 0;
49 virtual const std::string
54 virtual const std::string
93 datetime(int64_t x,
const std::string& unit) = 0;
109 string(
const char* x, int64_t length,
const char* encoding) = 0;
158 field(
const char* key,
bool check) = 0;
Abstract class to represent the output of ak.to_buffers. In Python, this would be a dict of NumPy arr...
Definition Builder.h:20
virtual void full_buffer(const std::string &name, int64_t length, int64_t value, const std::string &dtype)=0
Create an array initialized to a given fill value.
virtual void * empty_buffer(const std::string &name, int64_t num_bytes)=0
virtual void copy_buffer(const std::string &name, const void *source, int64_t num_bytes)=0
Copy data at source with num_bytes into the BuffersContainer with name.
Abstract base class for nodes within an ArrayBuilder that cumulatively discover an array's type and f...
Definition Builder.h:41
virtual const BuilderPtr integer(int64_t x)=0
Adds an integer value x to the accumulated data.
virtual ~Builder()
Virtual destructor acts as a first non-inline virtual function that determines a specific translation...
virtual const std::string to_buffers(BuffersContainer &container, int64_t &form_key_id) const =0
Copy the current snapshot into the BuffersContainer and return a Form as a std::string (JSON).
virtual void field(const char *key, bool check)=0
Sets the pointer to a given record field key; the next command will fill that slot.
virtual const BuilderPtr datetime(int64_t x, const std::string &unit)=0
Adds a datetime value x to the accumulated data.
virtual const BuilderPtr endlist()=0
Ends a nested list.
virtual void clear()=0
Removes all accumulated data without resetting the type knowledge.
virtual bool active() const =0
If true, this node has started but has not finished a multi-step command (e.g. beginX ....
virtual const BuilderPtr beginlist()=0
Begins building a nested list.
virtual const BuilderPtr string(const char *x, int64_t length, const char *encoding)=0
Adds a string value x with a given length and encoding to the accumulated data.
virtual const BuilderPtr null()=0
Adds a null value to the accumulated data.
virtual const BuilderPtr endtuple()=0
Ends a tuple.
virtual const std::string classname() const =0
User-friendly name of this class.
virtual const BuilderPtr timedelta(int64_t x, const std::string &unit)=0
Adds a timedelta value x to the accumulated data.
virtual const BuilderPtr complex(std::complex< double > x)=0
Adds a complex value x to the accumulated data.
virtual const BuilderPtr index(int64_t index)=0
Sets the pointer to a given tuple field index; the next command will fill that slot.
virtual const BuilderPtr beginrecord(const char *name, bool check)=0
Begins building a record with an optional name.
virtual const BuilderPtr begintuple(int64_t numfields)=0
Begins building a tuple with a fixed number of fields.
virtual const BuilderPtr boolean(bool x)=0
Adds a boolean value x to the accumulated data.
virtual const BuilderPtr endrecord()=0
Ends a record.
virtual int64_t length() const =0
Current length of the accumulated array.
virtual const BuilderPtr real(double x)=0
Adds a real value x to the accumulated data.
#define EXPORT_SYMBOL
Definition common.h:25
Definition ArrayBuilder.h:14
std::shared_ptr< Builder > BuilderPtr
Definition ArrayBuilder.h:16