Tanl Linguistic Pipeline |
Fixed size fields. More...
#include <metaclass.h>
Public Types | |
typedef T | value_type |
Public Member Functions | |
FixedField (char const *name, Size offset, Size maxLength, IndexType indexType, char const *merge=0) | |
virtual Field * | clone () const |
virtual MetaClass * | itemClass () const |
The metaclass of items. | |
virtual Size | size () |
Size in bytes of field. | |
virtual Size | length (byte *base) |
Number of items, if field contains pointer (or else its size). | |
virtual Size | packSize (byte *) |
Compute size of record needed for storing the field. | |
virtual std::ostream & | print (std::ostream &out) |
Display the Field information. | |
virtual Item * | item () |
Create an Item to store a value for the Field. | |
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 byte * | store (byte *&dst, byte *src) |
Method to store fields into a buffer. | |
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 void | setKey (byte *dst, int8 const value) |
Needed for storing a fixed size value, specific field method will cast to appropriate type. | |
template<> | |
Size | length (byte *base) |
Number of items, if field contains pointer (or else its size). | |
template<> | |
byte * | fetch (byte *dst, byte *&row) |
Method to fetch fields from a buffer. | |
template<> | |
byte * | store (byte *&row, byte *src) |
Method to store fields into a buffer. | |
template<> | |
Size | packSize (byte *base) |
Compute size of record needed for storing the field. | |
template<> | |
Size | length (byte *base) |
Number of items, if field contains pointer (or else its size). | |
template<> | |
byte * | fetch (byte *dst, byte *&row) |
Method to fetch fields from a buffer. | |
template<> | |
byte * | store (byte *&row, byte *src) |
Method to store fields into a buffer. | |
template<> | |
Size | packSize (byte *base) |
Compute size of record needed for storing the field. |
Fixed size fields.
byte * IXE::FixedField< std::string >::fetch | ( | byte * | dst, | |
byte *& | src | |||
) | [inline, 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.
byte * IXE::FixedField< std::string >::fetch | ( | byte * | dst, | |
byte *& | src | |||
) | [inline, 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.
References IXE::FixedField< T >::length().
virtual byte* IXE::FixedField< T >::fetch | ( | byte * | dst, | |
byte *& | src | |||
) | [inline, 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::FixedField< T >::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::FixedField< std::string >::packSize | ( | byte * | base | ) | [inline, 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.
Size IXE::FixedField< std::string >::packSize | ( | byte * | base | ) | [inline, 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::FixedField< T >::length(), and IXE::Field::offset.
virtual Size IXE::FixedField< T >::packSize | ( | byte * | base | ) | [inline, 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.
virtual std::ostream& IXE::FixedField< T >::print | ( | std::ostream & | out | ) | [inline, virtual] |
Display the Field information.
out | the output stream |
Implements IXE::Field.
References IXE::FixedField< T >::size(), and IXE::Field::type.
virtual void IXE::FixedField< T >::setKey | ( | byte * | row, | |
int8 const | value | |||
) | [inline, virtual] |
Needed for storing a fixed size value, specific field method will cast to appropriate type.
Used only for FixedField. Does not advance row.
Reimplemented from IXE::Field.
byte * IXE::FixedField< std::string >::store | ( | byte *& | dst, | |
byte * | src | |||
) | [inline, virtual] |
Method to store fields into a buffer.
Advances dst to next field.
dst | the buffer where to store the field; it is advanced to the next field. | |
src | the field in the object being stored. |
Implements IXE::Field.
byte * IXE::FixedField< std::string >::store | ( | byte *& | dst, | |
byte * | src | |||
) | [inline, virtual] |
Method to store fields into a buffer.
Advances dst to next field.
dst | the buffer where to store the field; it is advanced to the next field. | |
src | the field in the object being stored. |
Implements IXE::Field.
References IXE::FixedField< T >::length().
virtual byte* IXE::FixedField< T >::store | ( | byte *& | dst, | |
byte * | src | |||
) | [inline, virtual] |
Method to store fields into a buffer.
Advances dst to next field.
dst | the buffer where to store the field; it is advanced to the next field. | |
src | the field in the object being stored. |
Implements IXE::Field.
virtual Size IXE::FixedField< T >::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.