Specifies accepted child element types within a parent element.
More...
#include <childTypeSpec.h>
Specifies accepted child element types within a parent element.
This class is used to look up allowed ebmlElementType instances by EBML ID and to validate occurrences. Instances of this class are stored within an ebml::ebmlMasterElementType instance.
◆ childTypeSpec_t() [1/5]
| ebml::childTypeSpec_t::childTypeSpec_t |
( |
| ) |
|
◆ childTypeSpec_t() [2/5]
◆ childTypeSpec_t() [3/5]
◆ childTypeSpec_t() [4/5]
◆ childTypeSpec_t() [5/5]
◆ add() [1/2]
Adds a child type.
- Parameters
-
| spec | The specification to add. |
◆ add() [2/2]
| void ebml::childTypeSpec_t::add |
( |
const ebmlElementType * |
, |
|
|
unsigned long |
min = 0, |
|
|
long |
max = -1 |
|
) |
| |
Adds a child type with occurrence limits.
- Parameters
-
| child | Pointer to the ebml::ebmlElementType. |
| min | Minimum required occurrences. |
| max | Maximum allowed occurrences. |
◆ begin()
| ebmlElementClass_d::const_iterator ebml::childTypeSpec_t::begin |
( |
| ) |
const |
Returns an iterator pointing to the beginning of the specifications.
- Returns
- Constant iterator.
◆ count() [1/2]
| size_t ebml::childTypeSpec_t::count |
( |
ebmlID_t |
ebmlID | ) |
const |
Determines if a child type for a given EBML ID exists.
- Parameters
-
- Returns
- Count of matching specifications.
◆ count() [2/2]
Determines if an ebml::ebmlElementType instance is a child type.
- Parameters
-
| cls | Pointer to the element type. |
- Returns
- Occurrence count.
◆ end()
| ebmlElementClass_d::const_iterator ebml::childTypeSpec_t::end |
( |
| ) |
const |
Returns an iterator pointing past the end of the specifications.
- Returns
- Constant iterator.
◆ isValid()
| bool ebml::childTypeSpec_t::isValid |
( |
const ebmlElement_sp & |
elem | ) |
const |
Checks whether a given element is valid under this specification.
- Parameters
-
| elem | The EBML element smart pointer to validate. |
- Returns
- True if valid, false otherwise.
◆ occurSpec() [1/3]
| const occurSpec_d & ebml::childTypeSpec_t::occurSpec |
( |
| ) |
const |
Retrieves the complete occurrence specifications.
- Returns
- A constant reference to the occurrence specification map.
◆ occurSpec() [2/3]
Retrieves the occurrence specification for a given EBML ID.
- Parameters
-
- Returns
- The occurrence specification.
◆ occurSpec() [3/3]
Retrieves the occurrence specification for a given child type.
- Parameters
-
| cls | Pointer to the child element type. |
- Returns
- The occurrence specification.
◆ operator=() [1/4]
◆ operator=() [2/4]
◆ operator=() [3/4]
◆ operator=() [4/4]
◆ operator[]()
Retrieves the child type for a given EBML ID.
- Parameters
-
- Returns
- Pointer to the corresponding ebmlElementType.
- Exceptions
-
◆ remove()
| void ebml::childTypeSpec_t::remove |
( |
ebmlID_t |
| ) |
|
Removes child type for a given EBML ID.
- Parameters
-
| ebmlID | The EBML ID to remove. |
◆ size()
| size_t ebml::childTypeSpec_t::size |
( |
| ) |
const |
Returns the total number of child type specifications.
- Returns
- Total count.
The documentation for this class was generated from the following files: