X-TraceC++Library
|
Represents an id as an array of bytes with a maximum length. More...
#include <XtrMetadata.h>
Public Member Functions | |
Id () | |
Id (size_t _length) | |
Id (const u_int8_t *from, size_t len) | |
virtual | ~Id () |
bool | isLengthValid () const |
size_t | getLength () const |
const u_int8_t * | getBytes () const |
u_int8_t & | operator[] (size_t i) |
virtual bool | isEqual (const Id< max_len > &other) const |
void | setLength (size_t _length) |
xtr_result | setBytes (const u_int8_t *from, size_t len) |
xtr_result | pack (u_int8_t *dest, size_t *size) const |
char * | toString (char *dest, size_t size) const |
virtual bool | isValidLength (size_t len) const |
Protected Attributes | |
size_t | length |
u_int8_t | id [max_len] |
Represents an id as an array of bytes with a maximum length.
max_len | the maximum length of the id in bytes |
References xtr::Id< max_len >::isValidLength(), and xtr::Id< max_len >::length.
References xtr::Id< max_len >::isValidLength(), and xtr::Id< max_len >::length.
const u_int8_t* xtr::Id< max_len >::getBytes | ( | ) | const [inline] |
size_t xtr::Id< max_len >::getLength | ( | ) | const [inline] |
bool xtr::Id< max_len >::isEqual | ( | const Id< max_len > & | other | ) | const [virtual] |
References xtr::Id< max_len >::id, and xtr::Id< max_len >::length.
bool xtr::Id< max_len >::isLengthValid | ( | ) | const [inline] |
virtual bool xtr::Id< max_len >::isValidLength | ( | size_t | len | ) | const [inline, virtual] |
Reimplemented in xtr::TaskId, and xtr::OpId.
Referenced by xtr::Id< max_len >::Id(), and xtr::Id< XTR_MAX_TASK_ID_LEN >::isLengthValid().
u_int8_t& xtr::Id< max_len >::operator[] | ( | size_t | i | ) | [inline] |
xtr_result xtr::Id< max_len >::pack | ( | u_int8_t * | dest, |
size_t * | size | ||
) | const |
References XTR_FAIL, and XTR_SUCCESS.
xtr_result xtr::Id< max_len >::setBytes | ( | const u_int8_t * | from, |
size_t | len | ||
) |
References XTR_FAIL, and XTR_SUCCESS.
void xtr::Id< max_len >::setLength | ( | size_t | _length | ) | [inline] |
char * xtr::Id< max_len >::toString | ( | char * | dest, |
size_t | size | ||
) | const |
References xtr::xtr_btoh().
Referenced by xtr::Id< XTR_MAX_TASK_ID_LEN >::getBytes(), and xtr::Id< max_len >::isEqual().