Handle all operations on an EBML element that contains other EBML elements. More...
#include <EbmlMaster.h>
Public Member Functions | |
EbmlMaster (const EbmlSemanticContext &aContext, bool bSizeIsKnown=true) | |
EbmlMaster (const EbmlMaster &ElementToClone) | |
virtual bool | ValidateSize () const |
virtual | ~EbmlMaster () |
filepos_t | RenderData (IOCallback &output, bool bForceRender, bool bWithDefault=false) |
filepos_t | ReadData (IOCallback &input, ScopeMode ReadFully) |
filepos_t | UpdateSize (bool bWithDefault=false, bool bForceRender=false) |
bool | SetSizeInfinite (bool aIsInfinite=true) |
Set wether the size is finite (size is known in advance when writing, or infinite size is not known on writing). | |
bool | PushElement (EbmlElement &element) |
uint64 | GetSize () const |
update the Size of the Data stored | |
uint64 | GetDataStart () const |
EbmlElement * | FindElt (const EbmlCallbacks &Callbacks) const |
find the element corresponding to the ID of the element, NULL if not found | |
EbmlElement * | FindFirstElt (const EbmlCallbacks &Callbacks, bool bCreateIfNull) |
find the first element corresponding to the ID of the element | |
EbmlElement * | FindFirstElt (const EbmlCallbacks &Callbacks) const |
EbmlElement * | FindNextElt (const EbmlElement &PastElt, bool bCreateIfNull) |
find the element of the same type of PasElt following in the list of elements | |
EbmlElement * | FindNextElt (const EbmlElement &PastElt) const |
EbmlElement * | AddNewElt (const EbmlCallbacks &Callbacks) |
bool | InsertElement (EbmlElement &element, size_t position=0) |
add an element at a specified location | |
bool | InsertElement (EbmlElement &element, const EbmlElement &before) |
void | Read (EbmlStream &inDataStream, const EbmlSemanticContext &Context, int &UpperEltFound, EbmlElement *&FoundElt, bool AllowDummyElt, ScopeMode ReadFully=SCOPE_ALL_DATA) |
Read the data and keep the known children. | |
void | Sort () |
sort Data when they can | |
size_t | ListSize () const |
EBML_MASTER_ITERATOR | begin () |
EBML_MASTER_ITERATOR | end () |
EBML_MASTER_RITERATOR | rbegin () |
EBML_MASTER_RITERATOR | rend () |
EBML_MASTER_CONST_ITERATOR | begin () const |
EBML_MASTER_CONST_ITERATOR | end () const |
EBML_MASTER_CONST_RITERATOR | rbegin () const |
EBML_MASTER_CONST_RITERATOR | rend () const |
EbmlElement * | operator[] (unsigned int position) |
const EbmlElement * | operator[] (unsigned int position) const |
bool | IsDefaultValue () const |
virtual bool | IsMaster () const |
bool | CheckMandatory () const |
verify that all mandatory elements are present | |
void | Remove (size_t Index) |
Remove an element from the list of the master. | |
void | Remove (EBML_MASTER_ITERATOR &Itr) |
void | Remove (EBML_MASTER_RITERATOR &Itr) |
void | RemoveAll () |
remove all elements, even the mandatory ones | |
filepos_t | WriteHead (IOCallback &output, int SizeLength, bool bWithDefault=false) |
facility for Master elements to write only the head and force the size later | |
void | EnableChecksum (bool bIsEnabled=true) |
bool | HasChecksum () const |
bool | VerifyChecksum () const |
uint32 | GetCrc32 () const |
void | ForceChecksum (uint32 NewChecksum) |
std::vector< std::string > | FindAllMissingElements () |
drill down all sub-elements, finding any missing elements | |
Protected Attributes | |
std::vector< EbmlElement * > | ElementList |
const EbmlSemanticContext & | Context |
bool | bChecksumUsed |
EbmlCrc32 | Checksum |
Handle all operations on an EBML element that contains other EBML elements.
EbmlMaster::~EbmlMaster | ( | ) | [virtual] |
bool EbmlMaster::CheckMandatory | ( | ) | const |
verify that all mandatory elements are present
EbmlElement * EbmlMaster::FindNextElt | ( | const EbmlElement & | PastElt, | |
bool | bCreateIfNull | |||
) |
find the element of the same type of PasElt following in the list of elements
only return elements that are from the same type !
the element might be the unique in the context !
bool EbmlMaster::PushElement | ( | EbmlElement & | element | ) |
void EbmlMaster::Read | ( | EbmlStream & | inDataStream, | |
const EbmlSemanticContext & | sContext, | |||
int & | UpperEltFound, | |||
EbmlElement *& | FoundElt, | |||
bool | AllowDummyElt, | |||
ScopeMode | ReadFully = SCOPE_ALL_DATA | |||
) | [virtual] |
Read the data and keep the known children.
Method to help reading a Master element and all subsequent children quickly.
add an option to discard even unknown elements
handle when a mandatory element is not found
Reimplemented from EbmlElement.
filepos_t EbmlMaster::ReadData | ( | IOCallback & | input, | |
ScopeMode | ReadFully | |||
) | [virtual] |
Implements EbmlElement.
filepos_t EbmlMaster::RenderData | ( | IOCallback & | output, | |
bool | bForceRender, | |||
bool | bWithDefault = false | |||
) | [virtual] |
handle exception on errors
write all the Mandatory elements in the Context, otherwise assert
Implements EbmlElement.
bool EbmlMaster::VerifyChecksum | ( | ) | const |
filepos_t EbmlMaster::WriteHead | ( | IOCallback & | output, | |
int | SizeLength, | |||
bool | bWithDefault = false | |||
) |
facility for Master elements to write only the head and force the size later