moritz at bunkus.org
Thu Jul 24 22:39:38 CEST 2003
robux, I need a way to create an EbmlMaster, but that Master must not
create its mandatory children. I need that for tag parsing.
Now I've though about adding a "bool bCreateMandatory = false" to
EbmlMaster's ctor, but that won't work with GetChild. Problem is that
FindFirstElt uses the Create method to create the elements, which of
course can't pass the bCreateMandatory through...
Why do I need this?
Well when reading the XML document I create the elements on the fly. So
e.g. I encounter <MultiDate>, <Date> and then <DateType>. When I've
encountered <Data> I create a KaxTagDate. Later, when I encounter
<DateType>, I use FindElt<KaxTagMultiDateType>(date) to see if such an
element already exists. Of course it does - because it was automatically
created. But I'd like to show my user a nice error message, like 'sorry,
only one instance of DateType allowed under Date'. This is not possible
now - or only with double book keeping on my side. This will enlarge my
code by 150%, and I cannot do that before the release.
So please help me... I need a way to elegantly create these children
without the mandatory elements!
==> Ciao, Mosu (Moritz Bunkus)
More information about the Matroska-devel