These are represented as normal references to an AudioTrackUid object
with a zero ID.
Because these objects don't exist and therefore never have any
references or parameters, getReference, setReference and set (for non-id
types) throw exceptions.
Various changes are made to support this:
AudioTrackUid::isSilent is added to make it easier to check for these
references.
AudioTrackUid::getSilent is added to make it easier to create a silent
AudioTrackUid to reference
The default ID value can no longer be zero, as this is used to check
whether an element has an ID.
When adding a silent AudioTrackUid to a document, ID assignment and
reference chasing is skipped.
When adding a silent AudioTrackUid to an AudioObject the uniqueness
check is skipped.
When the id of an AudioTrackUid is set to zero, an exception is thrown
if there are any parameters or references, to make sure the ID and
content stays consistent.
In the XML parser, the reference lookup now has a special case for
audioTrackUID references that makes a silent AudioTrackUid rather than
looking one up by ID.
In the XML writer, these elements are skipped when writing the actual
audioTrackUID elements.
Isues:
is it OK that more than one silent track can be added to a document? I think this shouldn't really cause problems, but it would be preventable.
is it really sensible to throw exceptions from getReference? this causes some complications, and users should really be checking that the shared_ptr returned is not null anyway (since this can already happen with odd XML)
the route tracer needs fixing / testing (unless getReference is changed to not throw)
These are represented as normal references to an AudioTrackUid object with a zero ID.
Because these objects don't exist and therefore never have any references or parameters, getReference, setReference and set (for non-id types) throw exceptions.
Various changes are made to support this:
AudioTrackUid::isSilent is added to make it easier to check for these references.
AudioTrackUid::getSilent is added to make it easier to create a silent AudioTrackUid to reference
The default ID value can no longer be zero, as this is used to check whether an element has an ID.
When adding a silent AudioTrackUid to a document, ID assignment and reference chasing is skipped.
When adding a silent AudioTrackUid to an AudioObject the uniqueness check is skipped.
When the id of an AudioTrackUid is set to zero, an exception is thrown if there are any parameters or references, to make sure the ID and content stays consistent.
In the XML parser, the reference lookup now has a special case for audioTrackUID references that makes a silent AudioTrackUid rather than looking one up by ID.
In the XML writer, these elements are skipped when writing the actual audioTrackUID elements.
Isues:
closes #145 closes #151