Fennel: BinaryType Class Reference (original) (raw)
Inheritance diagram for BinaryType:

| Public Types | |
|---|---|
| typedef uint | Ordinal |
| Each type must have a unique positive integer ordinal associated with it. | |
| Private Member Functions | |
| virtual Ordinal | getOrdinal () const |
| **Returns:**the ordinal representing this type. | |
| virtual uint | getBitCount () const |
| **Returns:**number of bits in marshalled representation, or 0 for a non-bit type; currently only 0 or 1 is supported | |
| virtual uint | getFixedByteCount () const |
| **Returns:**the width in bytes for a fixed-width non-bit type which admits no per-attribute precision, or 0 for types with per-attribute precision; for bit types, this yields the size of the unmarshalled representation | |
| virtual uint | getMinByteCount (uint cbMaxWidth) const |
| Gets the number of bytes required to store the narrowest value with this type, given a particular max byte count. | |
| virtual uint | getAlignmentByteCount (uint cbWidth) const |
| Gets the alignment size in bytes required for values of this type, given a particular max byte count. | |
| virtual void | visitValue (DataVisitor &dataVisitor, void const *pData, TupleStorageByteLength cbData) const |
| Visits a value of this type. | |
| virtual int | compareValues (void const *pData1, TupleStorageByteLength cbData1, void const *pData2, TupleStorageByteLength cbData2) const |
| Compares two values of this type. |
Detailed Description
Definition at line 396 of file StandardTypeDescriptor.cpp.
Member Typedef Documentation
Each type must have a unique positive integer ordinal associated with it.
This is used to reconstruct a StoredTypeDescriptor object from a stored attribute definition.
Definition at line 44 of file StoredTypeDescriptor.h.
Member Function Documentation
| virtual Ordinal BinaryType::getOrdinal | ( | | ) | const [inline, private, virtual] | | --------------------------------------------------------------------------------------------------------- | - | | - | ---------------------------------- |
| virtual uint BinaryType::getBitCount | ( | | ) | const [inline, private, virtual] | | ------------------------------------------------------------------------------------------------- | - | | - | ---------------------------------- |
| virtual uint BinaryType::getFixedByteCount | ( | | ) | const [inline, private, virtual] | | ------------------------------------------------------------------------------------------------------- | - | | - | ---------------------------------- |
Returns:
the width in bytes for a fixed-width non-bit type which admits no per-attribute precision, or 0 for types with per-attribute precision; for bit types, this yields the size of the unmarshalled representation
Implements StoredTypeDescriptor.
Definition at line 408 of file StandardTypeDescriptor.cpp.
00409 { 00410 return 0; 00411 }
| virtual uint BinaryType::getMinByteCount | ( | uint | cbMaxWidth | ) | const [inline, private, virtual] |
|---|
Gets the number of bytes required to store the narrowest value with this type, given a particular max byte count.
For a fixed-width type, the return value is the same as the input.
Parameters:
| cbMaxWidth | maximum width for which to compute the minimum |
|---|
Returns:
number of bytes
Implements StoredTypeDescriptor.
Definition at line 413 of file StandardTypeDescriptor.cpp.
00414 { 00415 return cbMaxWidth; 00416 }
| virtual uint BinaryType::getAlignmentByteCount | ( | uint | cbWidth | ) | const [inline, private, virtual] |
|---|
Gets the alignment size in bytes required for values of this type, given a particular max byte count.
This must be 1, 2, 4, or 8, and may not be greater than 2 for variable-width datatypes. For fixed-width datatypes, the width must be a multiple of the alignment size.
Parameters:
| cbWidth | width for which to compute the alignment |
|---|
Returns:
number of bytes
Implements StoredTypeDescriptor.
Definition at line 418 of file StandardTypeDescriptor.cpp.
00419 { 00420 return 1; 00421 }
Compares two values of this type.
Parameters:
| pData1 | the address of the first data value |
|---|---|
| cbData1 | the width of the first data value in bytes |
| pData2 | the address of the second data value |
| cbData2 | the width of the second data value in bytes |
Returns:
negative if the first data value is less than the second; positive if greater; zero if equal
Implements StoredTypeDescriptor.
Definition at line 431 of file StandardTypeDescriptor.cpp.
00436 { 00437 assert(cbData1 == cbData2); 00438 return memcmp(pData1,pData2,cbData1); 00439 }
The documentation for this class was generated from the following file:
- /home/pub/open/dev/fennel/tuple/StandardTypeDescriptor.cpp
