10#ifndef _SWATDB_DATA_H_
11#define _SWATDB_DATA_H_
56 Data(std::uint32_t
size,
const char* other_data);
145 Data *dst, std::uint32_t dst_offset, std::uint32_t len);
void setSize(std::uint32_t new_size)
Setter for size.
static void _copyDataValue(Data *src, std::uint32_t src_offset, Data *dst, std::uint32_t dst_offset, std::uint32_t len)
copy data from one Data object to another
std::uint32_t getCapacity()
Getter for capacity.
Data(const Data &other)=delete
Disable copy constructor.
Data(std::uint32_t capacity)
Constructor with given capacity.
void _getOffsetLength(FieldId field_id, FieldOffset *offset, FieldOffset *length, FieldId num_fields)
helper method to calculate the offset value and field length given a field_id.
char * data
Definition data.h:218
static bool _compareFromBuff(char *data1, char *data2, Comp comp_op, FieldType field_type, FieldOffset length1, FieldOffset length2)
helper function for _compareFieldValue that does low level compare on data char bufs
static void _copyFromBuff(char *src, char *dst, std::uint32_t len)
helper function for _copyDataValue that does low level copy from char bufs
Data()=delete
Disable base constructor.
Data & operator=(const Data &other)=delete
Disable copy assignment constructor.
std::uint32_t getSize()
Getter for size.
std::uint32_t capacity
Definition data.h:228
char * getData()
Getter for data char array.
std::uint32_t size
Definition data.h:223
Data(std::uint32_t size, const char *other_data)
Constructor with given char array and size.
static bool _compareFieldValue(Data *data1, FieldId field_id1, FieldId num_fields1, Data *data2, FieldId field_id2, FieldId num_fields2, Comp comp_op, FieldType field_type)
compare a field value from one Data object to another (data1 comp_op data2)
Data(std::uint32_t size, std::uint32_t capacity)
Constructor with given size and capacity.
std::uint32_t FieldId
Definition swatdb_types.h:86
std::uint16_t FieldOffset
Definition swatdb_types.h:92
FieldType
Definition swatdb_types.h:97