#include <AttributeAccessorImpl.h>
Inheritance diagram for FixedWidthNetworkAccessor16:
Public Member Functions | |
void | unmarshalValue (TupleAccessor const &tupleAccessor, TupleDatum &value) const |
Unmarshals the attribute's value by setting up the data pointer, length, and null indicator; does not actually copy any data. | |
void | marshalValueData (PBuffer pDestData, TupleDatum const &value) const |
Marshals value data for the attribute. | |
bool | unmarshalNullableValue (TupleAccessor const &tupleAccessor, TupleDatum &value) const |
Tests the null indicator for this attribute in the tuple's null bit array. | |
Public Attributes | |
uint | iNullBit |
Index of this attribute's null indicator bit in the tuple's bit array, or MAXU for a NOT NULL attribute. | |
uint | iFixedOffset |
Byte offset of this attribute within a stored tuple image, or MAXU if the start is variable. | |
uint | iEndIndirectOffset |
Indirect offset of the end of this attribute within a stored tuple image, or MAXU if the end is fixed. | |
uint | iValueBit |
Index of this attribute's value in the tuple's bit array, or MAXU for a non-bit attribute. | |
TupleStorageByteLength | cbStorage |
Copied from TupleAttributeDescriptor.cbStorage. |
Definition at line 97 of file AttributeAccessorImpl.h.
void FixedWidthNetworkAccessor16::unmarshalValue | ( | TupleAccessor const & | tupleAccessor, | |
TupleDatum & | value | |||
) | const [inline, virtual] |
Unmarshals the attribute's value by setting up the data pointer, length, and null indicator; does not actually copy any data.
tupleAccessor | containing TupleAccessor set up with the current tuple image to be accessed | |
value | receives the reference to the unmarshalled value |
Reimplemented from FixedWidthAccessor.
Definition at line 101 of file AttributeAccessorImpl.h.
References TupleDatum::cbData, TupleDatum::data16, TupleDatum::pData, and FixedWidthAccessor::unmarshalValue().
00103 { 00104 assert(value.cbData == sizeof(uint16_t)); 00105 FixedWidthAccessor::unmarshalValue(tupleAccessor,value); 00106 value.data16 = ntohs(*reinterpret_cast<uint16_t const *>(value.pData)); 00107 value.pData = reinterpret_cast<PConstBuffer>(&(value.data16)); 00108 }
void FixedWidthNetworkAccessor16::marshalValueData | ( | PBuffer | pDestData, | |
TupleDatum const & | value | |||
) | const [inline, virtual] |
Marshals value data for the attribute.
Only deals with the data bytes, not length and null indicators.
pDestData | the target address where the data should be marshalled | |
value | the value to be marshalled |
Reimplemented from AttributeAccessorImpl.
Definition at line 110 of file AttributeAccessorImpl.h.
References TupleDatum::cbData, and TupleDatum::pData.
00113 { 00114 assert(value.cbData == sizeof(uint16_t)); 00115 *reinterpret_cast<uint16_t *>(pDestData) = 00116 htons(*reinterpret_cast<uint16_t const *>(value.pData)); 00117 }
bool AttributeAccessorImpl::unmarshalNullableValue | ( | TupleAccessor const & | tupleAccessor, | |
TupleDatum & | value | |||
) | const [inline, inherited] |
Tests the null indicator for this attribute in the tuple's null bit array.
tupleAccessor | containing TupleAccessor set up with the current tuple image to be accessed | |
value | receives the null bit |
Definition at line 60 of file AttributeAccessorImpl.h.
References TupleAccessor::getBitFields(), and TupleDatum::pData.
00062 { 00063 if (tupleAccessor.getBitFields()[iNullBit]) { 00064 value.pData = NULL; 00065 return true; 00066 } else { 00067 return false; 00068 } 00069 }
uint AttributeAccessor::iNullBit [inherited] |
Index of this attribute's null indicator bit in the tuple's bit array, or MAXU for a NOT NULL attribute.
Definition at line 53 of file AttributeAccessor.h.
Referenced by AttributeAccessorImpl::AttributeAccessorImpl(), TupleAccessor::compute(), Java_net_sf_farrago_fennel_FennelStorage_getAccessorXmiForTupleDescriptor(), TupleAccessor::marshal(), and TupleAccessor::unmarshal().
uint AttributeAccessor::iFixedOffset [inherited] |
Byte offset of this attribute within a stored tuple image, or MAXU if the start is variable.
Definition at line 59 of file AttributeAccessor.h.
Referenced by AttributeAccessorImpl::AttributeAccessorImpl(), TupleAccessor::compute(), TupleAccessor::initFixedAccessors(), TupleAccessor::marshal(), TupleAccessor::unmarshal(), and FixedOffsetVarWidthAccessor< network >::unmarshalValue().
uint AttributeAccessor::iEndIndirectOffset [inherited] |
Indirect offset of the end of this attribute within a stored tuple image, or MAXU if the end is fixed.
Definition at line 65 of file AttributeAccessor.h.
Referenced by AttributeAccessorImpl::AttributeAccessorImpl(), TupleAccessor::marshal(), TupleAccessor::unmarshal(), VarOffsetAccessor< network >::unmarshalValue(), and FixedOffsetVarWidthAccessor< network >::unmarshalValue().
uint AttributeAccessor::iValueBit [inherited] |
Index of this attribute's value in the tuple's bit array, or MAXU for a non-bit attribute.
Definition at line 71 of file AttributeAccessor.h.
Referenced by AttributeAccessorImpl::AttributeAccessorImpl(), TupleAccessor::marshal(), and TupleAccessor::unmarshal().
TupleStorageByteLength AttributeAccessor::cbStorage [inherited] |
Copied from TupleAttributeDescriptor.cbStorage.
This is not used for anything except assertions.
Definition at line 77 of file AttributeAccessor.h.
Referenced by AttributeAccessorImpl::AttributeAccessorImpl(), TupleAccessor::compute(), TupleAccessor::marshal(), TupleAccessor::unmarshal(), VarOffsetAccessor< network >::unmarshalValue(), and FixedOffsetVarWidthAccessor< network >::unmarshalValue().