#include <deftypes.h>
Inheritance diagram for Label:
Public Member Functions | |
std::string | GetName (void) |
Get the name of this label. | |
std::string | GetDetail (void) |
Get the detail for this label. | |
bool | HasMask (void) |
Return true if this label uses a (non-zero) mask. | |
Static Public Member Functions | |
static bool | Insert (std::string Name, std::string Detail, const UInt8 *LabelValue, const UInt8 *LabelMask=NULL) |
Construct and add a label from a byte array. | |
static bool | Insert (std::string Name, std::string Detail, const ULPtr &LabelValue, const UInt8 *LabelMask=NULL) |
Construct and add a label from a UL smart pointer. | |
static bool | Insert (std::string Name, std::string Detail, const UL &LabelValue, const UInt8 *LabelMask=NULL) |
Construct and add a label from a UL reference. | |
static bool | Insert (std::string Name, std::string Detail, const UUIDPtr &LabelValue, const UInt8 *LabelMask=NULL) |
Construct and add a label from a UUID smart pointer. | |
static bool | Insert (std::string Name, std::string Detail, const mxflib::UUID &LabelValue, const UInt8 *LabelMask=NULL) |
Construct and add a label from a UUID reference. | |
static LabelPtr | Find (const UL &LabelValue) |
Find a label with a given value, from a UL reference. | |
static LabelPtr | Find (const ULPtr &LabelValue) |
Find a label with a given value, from a ULPtr. | |
static LabelPtr | Find (const UInt8 *LabelValue) |
Find a label with a given value, from the label bytes. | |
Protected Types | |
typedef std::map< UL, LabelPtr > | LabelULMap |
Type of the Label map (map of UL to LabelPtr). | |
typedef std::multimap< UL, LabelPtr > | LabelULMultiMap |
Type of the Label multi-map (map of UL to LabelPtr). | |
Protected Member Functions | |
Label (std::string LabelName, std::string Detail, const UInt8 *LabelUL, const UInt8 *LabelMask) | |
Label (std::string LabelName, std::string Detail, const UUID &LabelULasUUID, const UInt8 *LabelMask) | |
void | Init (std::string LabelName, const UInt8 *LabelMask) |
Protected Attributes | |
UL | Value |
The value of this label. | |
UInt8 | Mask [16] |
Mask of ignore bits, each set bit flags a bit to be ignored when comparing. | |
bool | NonZeroMask |
True if there is a non-zero mask. | |
std::string | Name |
The XML-Tag-valid name for this label. | |
std::string | Detail |
The human-readable description for this label. | |
Static Protected Attributes | |
static LabelULMap | LabelMap |
Map of all existing labels that don't use masking. | |
static LabelULMultiMap | LabelMultiMap |
Map of all existing labels that use masking - this is a multimap to allow the same base with different masks. |
typedef std::map<UL, LabelPtr> LabelULMap [protected] |
typedef std::multimap<UL, LabelPtr> LabelULMultiMap [protected] |
Label | ( | std::string | LabelName, | |
std::string | Detail, | |||
const UInt8 * | LabelUL, | |||
const UInt8 * | LabelMask | |||
) | [inline, protected] |
Label | ( | std::string | LabelName, | |
std::string | Detail, | |||
const UUID & | LabelULasUUID, | |||
const UInt8 * | LabelMask | |||
) | [inline, protected] |
void Init | ( | std::string | LabelName, | |
const UInt8 * | LabelMask | |||
) | [inline, protected] |
std::string GetName | ( | void | ) | [inline] |
Get the name of this label.
std::string GetDetail | ( | void | ) | [inline] |
Get the detail for this label.
bool HasMask | ( | void | ) | [inline] |
Return true if this label uses a (non-zero) mask.
bool Insert | ( | std::string | Name, | |
std::string | Detail, | |||
const UInt8 * | LabelValue, | |||
const UInt8 * | LabelMask = NULL | |||
) | [static] |
Construct and add a label from a byte array.
bool Insert | ( | std::string | Name, | |
std::string | Detail, | |||
const mxflib::UUID & | LabelValue, | |||
const UInt8 * | LabelMask = NULL | |||
) | [static] |
Find a label with a given value, from a UL reference.
If more than one masked label matches, the value with the least mask bits is returned. If more than one have the same number of mask bits, the last one found will be returned - which this is is undefined.
Find a label with a given value, from a ULPtr.
Find a label with a given value, from the label bytes.
Mask of ignore bits, each set bit flags a bit to be ignored when comparing.
bool NonZeroMask [protected] |
True if there is a non-zero mask.
std::string Name [protected] |
The XML-Tag-valid name for this label.
std::string Detail [protected] |
The human-readable description for this label.
Label::LabelULMap LabelMap [static, protected] |
Map of all existing labels that don't use masking.
Label::LabelULMultiMap LabelMultiMap [static, protected] |
Map of all existing labels that use masking - this is a multimap to allow the same base with different masks.