Magnum::OpenDdl::Validation::Structure class

Structure spec for validation.

Example usage (excerpt from OpenGEX specification of Texture structure):

{Texture,
    // Requiring string attrib property, optional integer texcoord property
    Properties{{attrib, PropertyType::String, RequiredProperty},
               {texcoord, PropertyType::UnsignedInt, OptionalProperty}},

    // Requiring exactly one primitive substructure with exactly one string
    // value for filename
    Primitives{Type::String}, 1, 1,

    // There can be any number of Transform, Translation, Rotation, Scale and
    // Animation substructures
    Structures{{Transform, {}},
               {Translation, {}},
               {Rotation, {}},
               {Scale, {}},
               {Animation, {}}}}

Constructors, destructors, conversion operators

Structure(Int identifier, Properties properties, Primitives primitives, std::size_t primitiveCount, std::size_t primitiveArraySize, Structures structures = {})
Constructor.
Structure(Int identifier, Primitives primitives, std::size_t primitiveCount, std::size_t primitiveArraySize, Structures structures = {})
Structure(Int identifier, Properties properties, Structures structures = {})
Structure(Int identifier, Structures structures = {})

Function documentation

Magnum::OpenDdl::Validation::Structure::Structure(Int identifier, Properties properties, Primitives primitives, std::size_t primitiveCount, std::size_t primitiveArraySize, Structures structures = {})

Constructor.

Parameters
identifier Structure identifier
properties List of allowed properties
primitives List of allowed primitive types
primitiveCount Expected primitive sub-structure count
primitiveArraySize Expected primitive array size
structures List of allowed custom sub-structures

Setting primitiveCount to 0 means that there is no requirement on primitive array count. Setting primitiveArraySize to 0 means that there is no requirement on primitive array size.

Magnum::OpenDdl::Validation::Structure::Structure(Int identifier, Primitives primitives, std::size_t primitiveCount, std::size_t primitiveArraySize, Structures structures = {})

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::OpenDdl::Validation::Structure::Structure(Int identifier, Properties properties, Structures structures = {})

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::OpenDdl::Validation::Structure::Structure(Int identifier, Structures structures = {})

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.