X-TraceC++Library
Public Member Functions
xtr::OpId Class Reference

Represents the id of an event, which should be unique within a single task. More...

#include <XtrMetadata.h>

Inheritance diagram for xtr::OpId:
xtr::Id< XTR_MAX_OP_ID_LEN >

Public Member Functions

 OpId (size_t len=4)
 Creates a new OpId with all bytes set to 0.
 OpId (const u_int8_t *from, size_t len)
 Creates a new OpId with the contents of from.
bool isValidLength (size_t len) const
 Returns true if len == 4 or len == 8.

Detailed Description

Represents the id of an event, which should be unique within a single task.


Constructor & Destructor Documentation

xtr::OpId::OpId ( size_t  len = 4)

Creates a new OpId with all bytes set to 0.

Default length is 4, and with no parameters this is the default constructor.

Parameters:
lenThe length of the new OpId. Valid lengths are 4, 8. If the len is invalid, the OpId will be created with length 4 and all 0's.
xtr::OpId::OpId ( const u_int8_t *  from,
size_t  len 
)

Creates a new OpId with the contents of from.

Parameters:
frombyte buffer to create the id from
lenthe size of the id to be created. The buffer in from MUST be of at least this size. Valid lengths are 4 and 8. If the length is invalid, the created OpId has length 4 and all 0's as content.

Member Function Documentation

bool xtr::OpId::isValidLength ( size_t  len) const [inline, virtual]

Returns true if len == 4 or len == 8.

Reimplemented from xtr::Id< XTR_MAX_OP_ID_LEN >.


The documentation for this class was generated from the following file: