MDValue Class Reference

Metadata Object class. More...

#include <mdtype.h>

Inheritance diagram for MDValue:

RefCount IRefCount List of all members.

Public Member Functions

 MDValue (const std::string &BaseType)
 MDValue named constructor.
 MDValue (MDTypePtr BaseType)
 MDValue typed constructor.
void Init (void)
 Second part of MDValue constructors.
 ~MDValue ()
void AddChild (MDValuePtr Child, int Index=-1)
 Add a child to an MDValue continer.
void Resize (UInt32 Index)
 Add or Remove children from an MDValue continer to make a fixed size.
MDValuePtr operator[] (int Index)
 Access array member within an MDValue array.
MDValuePtr Child (int Index)
MDValuePtr operator[] (const std::string ChildName)
 Access function for child values of compound items.
MDValuePtr Child (const std::string ChildName)
MDValuePtr operator[] (const UL &Child)
 Access function for child values of compound items.
MDValuePtr Child (const UL &Child)
bool operator== (MDValuePtr &RHS)
 Value comparison.
bool operator== (MDValue &RHS)
 Value comparison.
MDValueoperator= (MDValue &RHS)
 Value copy.
void SetInt (Int32 Val)
void SetInt64 (Int64 Val)
void SetUInt (UInt32 Val)
void SetUInt64 (UInt64 Val)
void SetUint (UInt32 Val)
void SetUint64 (UInt64 Val)
void SetString (std::string Val)
Int32 GetInt (void)
Int64 GetInt64 (void)
UInt32 GetUInt (void)
UInt64 GetUInt64 (void)
UInt32 GetUint (void)
UInt64 GetUint64 (void)
std::string GetString (void)
Int32 GetInt (const char *ChildName, Int32 Default=0)
Int64 GetInt64 (const char *ChildName, Int64 Default=0)
UInt32 GetUInt (const char *ChildName, UInt32 Default=0)
UInt64 GetUInt64 (const char *ChildName, UInt64 Default=0)
UInt32 GetUint (const char *ChildName, UInt32 Default=0)
UInt64 GetUint64 (const char *ChildName, UInt64 Default=0)
std::string GetString (const char *ChildName, std::string Default="")
void SetInt (const char *ChildName, Int32 Val)
void SetInt64 (const char *ChildName, Int64 Val)
void SetUInt (const char *ChildName, UInt32 Val)
void SetUInt64 (const char *ChildName, UInt64 Val)
void SetUint (const char *ChildName, UInt32 Val)
void SetUint64 (const char *ChildName, UInt64 Val)
void SetString (const char *ChildName, std::string Val)
Int32 GetInt (const UL &Child, Int32 Default=0)
Int64 GetInt64 (const UL &Child, Int64 Default=0)
UInt32 GetUInt (const UL &Child, UInt32 Default=0)
UInt64 GetUInt64 (const UL &Child, UInt64 Default=0)
UInt32 GetUint (const UL &Child, UInt32 Default=0)
UInt64 GetUint64 (const UL &Child, UInt64 Default=0)
std::string GetString (const UL &Child, std::string Default="")
void SetInt (const UL &Child, Int32 Val)
void SetInt64 (const UL &Child, Int64 Val)
void SetUInt (const UL &Child, UInt32 Val)
void SetUInt64 (const UL &Child, UInt64 Val)
void SetUint (const UL &Child, UInt32 Val)
void SetUint64 (const UL &Child, UInt64 Val)
void SetString (const UL &Child, std::string Val)
void ReadValue (const char *ChildName, const DataChunk &Source)
void ReadValue (const char *ChildName, DataChunkPtr &Source)
void ReadValue (const UL &Child, const DataChunk &Source)
void ReadValue (const UL &Child, DataChunkPtr &Source)
size_t MakeSize (size_t NewSize)
 Set a variable to be a certain size in bytes.
size_t ReadValue (const DataChunk &Chunk)
size_t ReadValue (DataChunkPtr &Chunk)
size_t ReadValue (const UInt8 *Buffer, size_t Size, int Count=0)
 Read value from a buffer.
const DataChunkGetData (void)
 Get a reference to the data chunk (const to prevent setting!!).
DataChunkPtr PutData (void)
 Build a data chunk with all this items data (including child data).
void SetData (size_t MemSize, const UInt8 *Buffer)
 Set data into the datachunk.
const std::string & Name (void) const
MDTypePtr GetType (void)
MDTypePtr EffectiveType (void)
MDTypePtr EffectiveBase (void)

Private Attributes

MDTypePtr Type
DataChunk Data

Detailed Description

Metadata Object class.


Constructor & Destructor Documentation

MDValue ( const std::string &  BaseType  ) 

MDValue named constructor.

Builds a "blank" variable of a named type

MDValue ( MDTypePtr  BaseType  ) 

MDValue typed constructor.

Builds a "blank" variable of a specified type

~MDValue (  )  [inline]


Member Function Documentation

void Init ( void   ) 

Second part of MDValue constructors.

Builds a "blank" variable

void AddChild ( MDValuePtr  Child,
int  Index = -1 
)

Add a child to an MDValue continer.

If the container is an array the index number of the new object can be ! specified. If the index number is specified and a child already exists ! with that number it is replaced. If the index number is specified and ! it is not the next index available, extra 'empty' objects are added to ! grow the array to the appropriate size.

void Resize ( UInt32  Count  ) 

Add or Remove children from an MDValue continer to make a fixed size.

Probably only useful for resizing arrays.

MDValuePtr operator[] ( int  Index  ) 

Access array member within an MDValue array.

DRAGONS: This doesn't work well with SmartPtrs so member function Child() is also available

MDValuePtr Child ( int  Index  )  [inline]

MDValuePtr operator[] ( const std::string  ChildName  ) 

Access function for child values of compound items.

DRAGONS: This doesn't work well with SmartPtrs so member function Child() is also available

MDValuePtr Child ( const std::string  ChildName  )  [inline]

MDValuePtr operator[] ( const UL Child  ) 

Access function for child values of compound items.

DRAGONS: This doesn't work well with SmartPtrs so member function Child() is also available

MDValuePtr Child ( const UL Child  )  [inline]

bool operator== ( MDValuePtr RHS  )  [inline]

Value comparison.

bool operator== ( MDValue RHS  )  [inline]

Value comparison.

MDValue& operator= ( MDValue RHS  )  [inline]

Value copy.

void SetInt ( Int32  Val  )  [inline]

void SetInt64 ( Int64  Val  )  [inline]

void SetUInt ( UInt32  Val  )  [inline]

void SetUInt64 ( UInt64  Val  )  [inline]

void SetUint ( UInt32  Val  )  [inline]

void SetUint64 ( UInt64  Val  )  [inline]

void SetString ( std::string  Val  )  [inline]

Int32 GetInt ( void   )  [inline]

Int64 GetInt64 ( void   )  [inline]

UInt32 GetUInt ( void   )  [inline]

UInt64 GetUInt64 ( void   )  [inline]

UInt32 GetUint ( void   )  [inline]

UInt64 GetUint64 ( void   )  [inline]

std::string GetString ( void   )  [inline]

Int32 GetInt ( const char *  ChildName,
Int32  Default = 0 
) [inline]

Int64 GetInt64 ( const char *  ChildName,
Int64  Default = 0 
) [inline]

UInt32 GetUInt ( const char *  ChildName,
UInt32  Default = 0 
) [inline]

UInt64 GetUInt64 ( const char *  ChildName,
UInt64  Default = 0 
) [inline]

UInt32 GetUint ( const char *  ChildName,
UInt32  Default = 0 
) [inline]

UInt64 GetUint64 ( const char *  ChildName,
UInt64  Default = 0 
) [inline]

std::string GetString ( const char *  ChildName,
std::string  Default = "" 
) [inline]

void SetInt ( const char *  ChildName,
Int32  Val 
) [inline]

void SetInt64 ( const char *  ChildName,
Int64  Val 
) [inline]

void SetUInt ( const char *  ChildName,
UInt32  Val 
) [inline]

void SetUInt64 ( const char *  ChildName,
UInt64  Val 
) [inline]

void SetUint ( const char *  ChildName,
UInt32  Val 
) [inline]

void SetUint64 ( const char *  ChildName,
UInt64  Val 
) [inline]

void SetString ( const char *  ChildName,
std::string  Val 
) [inline]

Int32 GetInt ( const UL Child,
Int32  Default = 0 
) [inline]

Int64 GetInt64 ( const UL Child,
Int64  Default = 0 
) [inline]

UInt32 GetUInt ( const UL Child,
UInt32  Default = 0 
) [inline]

UInt64 GetUInt64 ( const UL Child,
UInt64  Default = 0 
) [inline]

UInt32 GetUint ( const UL Child,
UInt32  Default = 0 
) [inline]

UInt64 GetUint64 ( const UL Child,
UInt64  Default = 0 
) [inline]

std::string GetString ( const UL Child,
std::string  Default = "" 
) [inline]

void SetInt ( const UL Child,
Int32  Val 
) [inline]

void SetInt64 ( const UL Child,
Int64  Val 
) [inline]

void SetUInt ( const UL Child,
UInt32  Val 
) [inline]

void SetUInt64 ( const UL Child,
UInt64  Val 
) [inline]

void SetUint ( const UL Child,
UInt32  Val 
) [inline]

void SetUint64 ( const UL Child,
UInt64  Val 
) [inline]

void SetString ( const UL Child,
std::string  Val 
) [inline]

void ReadValue ( const char *  ChildName,
const DataChunk Source 
) [inline]

void ReadValue ( const char *  ChildName,
DataChunkPtr Source 
) [inline]

void ReadValue ( const UL Child,
const DataChunk Source 
) [inline]

void ReadValue ( const UL Child,
DataChunkPtr Source 
) [inline]

size_t MakeSize ( size_t  NewSize  ) 

Set a variable to be a certain size in bytes.

The old data is NOT copied. This function assumes that this is a viable thing to do!

Returns:
The size of the resized item

size_t ReadValue ( const DataChunk Chunk  )  [inline]

size_t ReadValue ( DataChunkPtr Chunk  )  [inline]

size_t ReadValue ( const UInt8 Buffer,
size_t  Size,
int  Count = 0 
)

Read value from a buffer.

Returns:
Number of bytes read

const DataChunk& GetData ( void   )  [inline]

Get a reference to the data chunk (const to prevent setting!!).

DataChunkPtr PutData ( void   ) 

Build a data chunk with all this items data (including child data).

void SetData ( size_t  MemSize,
const UInt8 Buffer 
) [inline]

Set data into the datachunk.

const std::string& Name ( void   )  const [inline]

MDTypePtr GetType ( void   )  [inline]

MDTypePtr EffectiveType ( void   )  [inline]

MDTypePtr EffectiveBase ( void   )  [inline]


Member Data Documentation

MDTypePtr Type [private]

DataChunk Data [private]


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