Label Class Reference

A UL or end-swapped UUID label. More...

#include <deftypes.h>

Inheritance diagram for Label:

RefCount IRefCount List of all members.

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, LabelPtrLabelULMap
 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.

Detailed Description

A UL or end-swapped UUID label.


Member Typedef Documentation

typedef std::map<UL, LabelPtr> LabelULMap [protected]

Type of the Label map (map of UL to LabelPtr).

typedef std::multimap<UL, LabelPtr> LabelULMultiMap [protected]

Type of the Label multi-map (map of UL to LabelPtr).


Constructor & Destructor Documentation

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]


Member Function Documentation

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.

Returns:
true if succeeded, else false

bool Insert ( std::string  Name,
std::string  Detail,
const ULPtr LabelValue,
const UInt8 LabelMask = NULL 
) [static]

Construct and add a label from a UL smart pointer.

Returns:
true if succeeded, else false

bool Insert ( std::string  Name,
std::string  Detail,
const UL LabelValue,
const UInt8 LabelMask = NULL 
) [static]

Construct and add a label from a UL reference.

Returns:
true if succeeded, else false

bool Insert ( std::string  Name,
std::string  Detail,
const UUIDPtr LabelValue,
const UInt8 LabelMask = NULL 
) [static]

Construct and add a label from a UUID smart pointer.

Returns:
true if succeeded, else false

bool Insert ( std::string  Name,
std::string  Detail,
const mxflib::UUID LabelValue,
const UInt8 LabelMask = NULL 
) [static]

Construct and add a label from a UUID reference.

Returns:
true if succeeded, else false

LabelPtr Find ( const UL LabelValue  )  [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.

static LabelPtr Find ( const ULPtr LabelValue  )  [inline, static]

Find a label with a given value, from a ULPtr.

static LabelPtr Find ( const UInt8 LabelValue  )  [inline, static]

Find a label with a given value, from the label bytes.


Member Data Documentation

UL Value [protected]

The value of this label.

UInt8 Mask[16] [protected]

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.


The documentation for this class was generated from the following files:
Generated on Mon Apr 2 15:20:57 2007 for MXFLib by  doxygen 1.5.1-p1