Partition Class Reference

Holds data relating to a single partition. More...

#include <partition.h>

Inheritance diagram for Partition:

ObjectInterface RefCount IRefCount List of all members.

Public Member Functions

 Partition (const char *BaseType)
 Partition (MDOTypePtr BaseType)
 Partition (const UL &BaseUL)
 Partition (ULPtr BaseUL)
void UpdateMetadata (ObjectInterface *NewObject)
 Reload the metadata tree - DRAGONS: not an ideal way of doing this.
void UpdateMetadata (MDObjectPtr NewObject)
 Reload the metadata tree - DRAGONS: not an ideal way of doing this.
void AddMetadata (ObjectInterface *NewObject)
 Add a metadata object to the header metadata belonging to a partition.
void AddMetadata (MDObjectPtr NewObject)
 Add a metadata object to the header metadata belonging to a partition.
void ClearMetadata (void)
 Clear all header metadata for this partition (including the primer).
Length ReadMetadata (void)
 Read a full set of header metadata from this partition's source file (including primer).
Length ReadMetadata (MXFFilePtr File, Length Size)
 Read a full set of header metadata from a file (including primer).
MetadataPtr ParseMetadata (void)
 Parse the current metadata sets into higher-level sets.
MDObjectListPtr ReadIndex (void)
 Read any index table segments from this partition's source file.
MDObjectListPtr ReadIndex (MXFFilePtr File, UInt64 Size)
 Read any index table segments from a file.
bool ReadIndex (IndexTablePtr Table)
 Read any index segments from this partition's source file, and add them to a given table.
DataChunkPtr ReadIndexChunk (void)
 Read raw index table data from this partition's source file.
void SetKAG (UInt64 KAG)
 Set the KAG for this partition.
std::map< UUID, MDObjectPtr > & GetRefTargets (void)
std::multimap< UUID, MDObjectPtr > & GetUnmatchedRefs (void)
bool IsComplete (void)
 Determine if the partition object is currently set as complete.
bool IsClosed (void)
 Determine if the partition object is currently set as closed.
bool IsMetadataComplete (void)
 Determine if the metadata in this partition is actually "complete".
bool SeekEssence (void)
 Locate start of Essence Container.
MDObjectParent FindLinkParent (MDObjectPtr &Child)
 Locate the set that refers to the given set (with a strong reference).
MDObjectParent FindLinkParent (MDObjectParent &Child)
 Locate the set that refers to the given set (with a strong reference).
bool StartElements ()
KLVObjectPtr NextElement ()

Public Attributes

PrimerPtr PartitionPrimer
 The Primer for this partition.
MDObjectList AllMetadata
 List of all header metadata sets in the partition.
MDObjectList TopLevelMetadata
 List of all metadata items int the partition not linked from another.

Protected Member Functions

UInt64 Skip (UInt64 start)
UInt64 SkipFill (UInt64 start)

Private Member Functions

void ProcessChildRefs (MDObjectPtr ThisObject)
 Satisfy, or record as un-matched, all outgoing references.

Private Attributes

std::map< UUID, MDObjectPtrRefTargets
 Map of UUID of all reference targets to objects.
std::multimap< UUID, MDObjectPtrUnmatchedRefs
 Map of UUID of all strong or weak refs not yet linked.
UInt64 _BodyLocation
UInt64 _NextBodyLocation

Detailed Description

Holds data relating to a single partition.


Constructor & Destructor Documentation

Partition ( const char *  BaseType  )  [inline]

Partition ( MDOTypePtr  BaseType  )  [inline]

Partition ( const UL BaseUL  )  [inline]

Partition ( ULPtr  BaseUL  )  [inline]


Member Function Documentation

void UpdateMetadata ( ObjectInterface NewObject  )  [inline]

Reload the metadata tree - DRAGONS: not an ideal way of doing this.

void UpdateMetadata ( MDObjectPtr  NewObject  )  [inline]

Reload the metadata tree - DRAGONS: not an ideal way of doing this.

void AddMetadata ( ObjectInterface NewObject  )  [inline]

Add a metadata object to the header metadata belonging to a partition.

Note that any strongly linked objects are also added

void AddMetadata ( MDObjectPtr  NewObject  ) 

Add a metadata object to the header metadata belonging to a partition.

Note that any strongly linked objects are also added

void ClearMetadata ( void   )  [inline]

Clear all header metadata for this partition (including the primer).

Length ReadMetadata ( void   ) 

Read a full set of header metadata from this partition's source file (including primer).

Returns:
The number of bytes read (including any preceeding filler)

0 if no header metadata in this partition

Length ReadMetadata ( MXFFilePtr  File,
Length  Size 
)

Read a full set of header metadata from a file (including primer).

Note:
The value of "Size" does not include the size of any filler before the primer, but the return value does
Returns:
The number of bytes read (including any preceeding filler)

MetadataPtr ParseMetadata ( void   ) 

Parse the current metadata sets into higher-level sets.

MDObjectListPtr ReadIndex ( void   ) 

Read any index table segments from this partition's source file.

MDObjectListPtr ReadIndex ( MXFFilePtr  File,
UInt64  Size 
)

Read any index table segments from a file.

bool ReadIndex ( IndexTablePtr  Table  ) 

Read any index segments from this partition's source file, and add them to a given table.

true if all OK

DataChunkPtr ReadIndexChunk ( void   ) 

Read raw index table data from this partition's source file.

void SetKAG ( UInt64  KAG  )  [inline]

Set the KAG for this partition.

std::map<UUID, MDObjectPtr>& GetRefTargets ( void   )  [inline]

std::multimap<UUID, MDObjectPtr>& GetUnmatchedRefs ( void   )  [inline]

bool IsComplete ( void   ) 

Determine if the partition object is currently set as complete.

bool IsClosed ( void   ) 

Determine if the partition object is currently set as closed.

bool IsMetadataComplete ( void   )  [inline]

Determine if the metadata in this partition is actually "complete".

true if all required properties exist in the metadata sets and no best-effort property is set to its destinguished value false in all other cases, or if there is no metadata loaded

Note:
This is not a guarantee that the metadata is valid!

bool SeekEssence ( void   ) 

Locate start of Essence Container.

Moves the file pointer for the parent file to the start of the essence container in this partition

Note:
If there is no essence in this partition the pointer will be moved to the start of the following partition (or the start of the RIP if this is the footer)

MDObjectParent FindLinkParent ( MDObjectPtr Child  ) 

Locate the set that refers to the given set (with a strong reference).

MDObjectParent FindLinkParent ( MDObjectParent Child  )  [inline]

Locate the set that refers to the given set (with a strong reference).

bool StartElements (  ) 

KLVObjectPtr NextElement (  ) 

UInt64 Skip ( UInt64  start  )  [protected]

UInt64 SkipFill ( UInt64  start  )  [protected]

void ProcessChildRefs ( MDObjectPtr  ThisObject  )  [private]

Satisfy, or record as un-matched, all outgoing references.


Member Data Documentation

PrimerPtr PartitionPrimer

The Primer for this partition.

Or NULL if no primer pack active (only valid if there is no header metadata in this partition OR it has not yet been written)

MDObjectList AllMetadata

List of all header metadata sets in the partition.

MDObjectList TopLevelMetadata

List of all metadata items int the partition not linked from another.

std::map<UUID, MDObjectPtr> RefTargets [private]

Map of UUID of all reference targets to objects.

std::multimap<UUID, MDObjectPtr> UnmatchedRefs [private]

Map of UUID of all strong or weak refs not yet linked.

UInt64 _BodyLocation [private]

UInt64 _NextBodyLocation [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