MDTraits Class Reference

#include <mdtraits.h>

Inheritance diagram for MDTraits:

RefCount IRefCount MDTraits_BasicArray MDTraits_BasicCompound MDTraits_BasicEnum MDTraits_BasicInt MDTraits_DefaultTraits MDTraits_Int64 MDTraits_Raw MDTraits_BasicStringArray MDTraits_RawArray MDTraits_RawArrayArray MDTraits_Rational MDTraits_TimeStamp MDTraits_Int16 MDTraits_Int32 MDTraits_Int8 MDTraits_UInt64 MDTraits_Label MDTraits_UMID MDTraits_UUID List of all members.

Public Member Functions

virtual ~MDTraits ()
 Allow virtual destruction.
virtual bool HandlesSubdata (void) const
 Does this trait take control of all sub-data and build values in the values own DataChunk?
virtual std::string Name () const=0
 A unique name for this trait.

Static Public Member Functions

static bool Add (std::string Name, MDTraitsPtr Trait)
 Add a new trait to the list of known traits.
static bool Replace (std::string Name, MDTraitsPtr Trait)
 Replace the named trait in the list of known traits.
static MDTraitsPtr Find (std::string Name)
 Locate a named trait in the list of known traits.

Protected Member Functions

 MDTraits ()
 Protected constructor so all traits need to be created via Create().
virtual void SetInt (MDValuePtr Object, Int32 Val)
virtual void SetInt64 (MDValuePtr Object, Int64 Val)
virtual void SetUInt (MDValuePtr Object, UInt32 Val)
virtual void SetUInt64 (MDValuePtr Object, UInt64 Val)
virtual void SetString (MDValuePtr Object, std::string Val)
virtual Int32 GetInt (MDValuePtr Object)
virtual Int64 GetInt64 (MDValuePtr Object)
virtual UInt32 GetUInt (MDValuePtr Object)
virtual UInt64 GetUInt64 (MDValuePtr Object)
virtual std::string GetString (MDValuePtr Object)
virtual size_t ReadValue (MDValuePtr Object, const UInt8 *Buffer, size_t Size, int Count=0)
void SetUint (MDValuePtr Object, UInt32 Val)
 Support old capitalization of SetUInt.
void SetUint64 (MDValuePtr Object, UInt64 Val)
 Support old capitalization of SetUInt64.
UInt32 GetUint (MDValuePtr Object)
 Support old capitalization of GetUInt.
UInt64 GetUint64 (MDValuePtr Object)
 Support old capitalization of GetUInt64.

Static Protected Attributes

static MDTraitsMap AllTraits
 List of all traits that exist.

Friends

class MDValue

Constructor & Destructor Documentation

MDTraits (  )  [inline, protected]

Protected constructor so all traits need to be created via Create().

virtual ~MDTraits (  )  [inline, virtual]

Allow virtual destruction.


Member Function Documentation

virtual bool HandlesSubdata ( void   )  const [inline, virtual]

Does this trait take control of all sub-data and build values in the values own DataChunk?

Normally any contained sub-types (such as array items or compound members) hold their own data

Reimplemented in MDTraits_Raw, MDTraits_UUID, MDTraits_Label, and MDTraits_UMID.

virtual std::string Name (  )  const [pure virtual]

A unique name for this trait.

Implemented in MDTraits_DefaultTraits, MDTraits_BasicInt, MDTraits_Int8, MDTraits_UInt8, MDTraits_Int16, MDTraits_UInt16, MDTraits_Int32, MDTraits_UInt32, MDTraits_Int64, MDTraits_UInt64, MDTraits_ISO7, MDTraits_UTF16, MDTraits_Raw, MDTraits_BasicArray, MDTraits_BasicStringArray, MDTraits_UTF16String, MDTraits_RawArray, MDTraits_UUID, MDTraits_Label, MDTraits_UMID, MDTraits_RawArrayArray, MDTraits_BasicCompound, MDTraits_BasicEnum, MDTraits_Rational, and MDTraits_TimeStamp.

bool Add ( std::string  Name,
MDTraitsPtr  Trait 
) [static]

Add a new trait to the list of known traits.

True is all went well, else false

bool Replace ( std::string  Name,
MDTraitsPtr  Trait 
) [static]

Replace the named trait in the list of known traits.

True is all went well, else false

MDTraitsPtr Find ( std::string  Name  )  [static]

Locate a named trait in the list of known traits.

A pointer to the named trait, or NULL if not found

void SetInt ( MDValuePtr  Object,
Int32  Val 
) [protected, virtual]

Reimplemented in MDTraits_Int8, MDTraits_Int16, MDTraits_Int32, MDTraits_Int64, and MDTraits_BasicArray.

void SetInt64 ( MDValuePtr  Object,
Int64  Val 
) [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_Int64, and MDTraits_BasicArray.

void SetUInt ( MDValuePtr  Object,
UInt32  Val 
) [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_Int64, and MDTraits_BasicArray.

void SetUInt64 ( MDValuePtr  Object,
UInt64  Val 
) [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_Int64, and MDTraits_BasicArray.

void SetString ( MDValuePtr  Object,
std::string  Val 
) [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_Int64, MDTraits_ISO7, MDTraits_UTF16, MDTraits_Raw, MDTraits_BasicArray, MDTraits_BasicStringArray, MDTraits_UTF16String, MDTraits_RawArray, MDTraits_UUID, MDTraits_Label, MDTraits_UMID, MDTraits_RawArrayArray, MDTraits_BasicCompound, MDTraits_BasicEnum, MDTraits_Rational, and MDTraits_TimeStamp.

Int32 GetInt ( MDValuePtr  Object  )  [protected, virtual]

Reimplemented in MDTraits_Int8, MDTraits_Int16, MDTraits_Int32, MDTraits_Int64, MDTraits_Raw, and MDTraits_BasicArray.

Int64 GetInt64 ( MDValuePtr  Object  )  [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_Int64, MDTraits_Raw, and MDTraits_BasicArray.

UInt32 GetUInt ( MDValuePtr  Object  )  [protected, virtual]

Reimplemented in MDTraits_Int8, MDTraits_Int16, MDTraits_Int32, MDTraits_Int64, MDTraits_Raw, and MDTraits_BasicArray.

UInt64 GetUInt64 ( MDValuePtr  Object  )  [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_Int64, MDTraits_Raw, and MDTraits_BasicArray.

std::string GetString ( MDValuePtr  Object  )  [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_UInt8, MDTraits_UInt16, MDTraits_UInt32, MDTraits_Int64, MDTraits_UInt64, MDTraits_ISO7, MDTraits_UTF16, MDTraits_Raw, MDTraits_BasicArray, MDTraits_BasicStringArray, MDTraits_UTF16String, MDTraits_RawArray, MDTraits_UUID, MDTraits_Label, MDTraits_UMID, MDTraits_RawArrayArray, MDTraits_BasicCompound, MDTraits_BasicEnum, MDTraits_Rational, and MDTraits_TimeStamp.

size_t ReadValue ( MDValuePtr  Object,
const UInt8 Buffer,
size_t  Size,
int  Count = 0 
) [protected, virtual]

Reimplemented in MDTraits_BasicInt, MDTraits_UInt8, MDTraits_UInt16, MDTraits_UInt32, MDTraits_UInt64, MDTraits_Raw, MDTraits_BasicArray, and MDTraits_BasicCompound.

void SetUint ( MDValuePtr  Object,
UInt32  Val 
) [inline, protected]

Support old capitalization of SetUInt.

void SetUint64 ( MDValuePtr  Object,
UInt64  Val 
) [inline, protected]

Support old capitalization of SetUInt64.

UInt32 GetUint ( MDValuePtr  Object  )  [inline, protected]

Support old capitalization of GetUInt.

UInt64 GetUint64 ( MDValuePtr  Object  )  [inline, protected]

Support old capitalization of GetUInt64.


Friends And Related Function Documentation

friend class MDValue [friend]


Member Data Documentation

mxflib::MDTraitsMap AllTraits [static, protected]

List of all traits that exist.


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