famouso::mw::attributes::access::AttributeHeader_RT Struct Reference
A structure that provides functionality to access attribute header fields at a higher level. More...
#include <AttributeHeader_RT.h>
Public Member Functions | |
bool | isHighDensity () const |
Returns true if the attribute is encoded with high density. | |
uint8_t | getID () const |
Returns the encoded attribute ID no matter if it is encoded with high or low density. | |
uint16_t | valueLength () const |
Returns the length of this attribute's encoded value. | |
uint8_t | headerLength () const |
Runtime accessor for the number of bytes needed by this attribute header. | |
Protected Types | |
typedef famouso::mw::attributes::detail::AttributeElementHeader | elemHeader_t |
Protected Member Functions | |
AttributeHeader_RT () | |
const elemHeader_t *const | asElementHeader () const |
elemHeader_t *const | asElementHeader () |
Detailed Description
A structure that provides functionality to access attribute header fields at a higher level.
It is considered to be the base type of the attribute type hierarchy since basic functionality related to header field access is provided here. This type basically provides methods for accessing the ID, the extension bit and the encoded value length of the attribute. The number of bytes used by the header only can also be calculated.
It is not constructible itself since it has its constructor declared protected. It is assumed that this type is derived by a type for which 'this' directly points to the first byte of an encoded attribute.
Member Typedef Documentation
typedef famouso::mw::attributes::detail::AttributeElementHeader famouso::mw::attributes::access::AttributeHeader_RT::elemHeader_t [protected] |
Constructor & Destructor Documentation
famouso::mw::attributes::access::AttributeHeader_RT::AttributeHeader_RT | ( | ) | [inline, protected] |
Member Function Documentation
elemHeader_t* const famouso::mw::attributes::access::AttributeHeader_RT::asElementHeader | ( | ) | [inline, protected] |
const elemHeader_t* const famouso::mw::attributes::access::AttributeHeader_RT::asElementHeader | ( | ) | const [inline, protected] |
uint8_t famouso::mw::attributes::access::AttributeHeader_RT::getID | ( | ) | const [inline] |
Returns the encoded attribute ID no matter if it is encoded with high or low density.
References asElementHeader(), and isHighDensity().
uint8_t famouso::mw::attributes::access::AttributeHeader_RT::headerLength | ( | ) | const [inline] |
Runtime accessor for the number of bytes needed by this attribute header.
It has the same semantics as type::size
- Returns:
- The number of bytes needed by this attribute header
References asElementHeader(), and famouso::mw::attributes::detail::CaseSelector< ResultType, res1, res2, res3, res4, res5, res6 >::select_rt().
Referenced by famouso::mw::attributes::access::Attribute_RT::length().
bool famouso::mw::attributes::access::AttributeHeader_RT::isHighDensity | ( | ) | const [inline] |
Returns true if the attribute is encoded with high density.
References asElementHeader().
Referenced by getID(), and valueLength().
uint16_t famouso::mw::attributes::access::AttributeHeader_RT::valueLength | ( | ) | const [inline] |
Returns the length of this attribute's encoded value.
The returned length is determined considering all fields of the header, that is it always returns the correct length for all possible header structures The returned value should be interpreted as the number of bytes needed by the attribute's value, so for the special case of a high density attribute with its value encoded in the header 0 respective 1 will be returned.
- Returns:
- The bytes needed for encoding this attribute's value
References asElementHeader(), and isHighDensity().
Referenced by famouso::mw::attributes::access::Attribute_RT::length().
The documentation for this struct was generated from the following file:
- include/mw/attributes/access/AttributeHeader_RT.h