Tanl Linguistic Pipeline |
Composite fields. More...
#include <metaclass.h>
Public Member Functions | |
CompositeField (char const *name, Size offset, Size fsize, IndexType indexType, MetaClass *metaClass, std::type_info const *type, char const *merge=0) | |
virtual Field * | clone () const |
virtual void | clear (void **fieldPtr) |
for avoiding destructors | |
virtual Size | size () |
Size in bytes of field. | |
virtual Size | packSize (byte *) |
Compute size of record needed for storing the field. | |
virtual bool | isType (Type t) |
Check Field type. | |
virtual Item * | item () |
Create an Item to store a value for the Field. | |
virtual MetaClass * | itemClass () const |
The metaclass of items. | |
virtual byte * | store (byte *&dst, byte *src) |
CompositeField. | |
virtual Size | storeKey (byte *dst, byte *src) |
Same as store() but without field header information, and BigEndian order to ensure comparison by bt_compare works. | |
virtual byte * | fetch (byte *dst, byte *&src) |
Method to fetch fields from a buffer. | |
virtual byte * | fetchKey (byte *dst, byte *src) |
Same as fetch() from key data, without header information, which gets converted from BigEndian order to host order. | |
virtual std::ostream & | print (std::ostream &out) |
Display the Field information. | |
Protected Attributes | |
MetaClass * | metaClass |
Size | fsize |
Composite fields.
byte * IXE::CompositeField::fetch | ( | byte * | dst, | |
byte *& | src | |||
) | [virtual] |
Method to fetch fields from a buffer.
dst | the location of the field. | |
src | the buffer from which the field is fetched; it is advanced to the next field |
Implements IXE::Field.
virtual byte* IXE::CompositeField::fetchKey | ( | byte * | dst, | |
byte * | src | |||
) | [inline, virtual] |
Same as fetch() from key data, without header information, which gets converted from BigEndian order to host order.
dst | the location of the field. | |
src | the buffer from which the field is fetched. |
Implements IXE::Field.
Size IXE::CompositeField::packSize | ( | byte * | base | ) | [virtual] |
Compute size of record needed for storing the field.
This includes header information (eg. length) and padding for alignment
base | the location of the object to be stored. If base == 0, return the maximum size. |
Implements IXE::Field.
References IXE::Field::offset, and IXE::MetaClass::recordSize().
virtual std::ostream& IXE::CompositeField::print | ( | std::ostream & | out | ) | [virtual] |
virtual Size IXE::CompositeField::storeKey | ( | byte * | dst, | |
byte * | src | |||
) | [inline, virtual] |
Same as store() but without field header information, and BigEndian order to ensure comparison by bt_compare works.
dst | the buffer where to store the field. | |
src | the field in the object being stored. |
Implements IXE::Field.