isobmff-builder-0.9.0.0: A (bytestring-) builder for the ISO-14496-12 base media file format

Safe HaskellNone
LanguageHaskell2010

Data.ByteString.IsoBaseFileFormat.Boxes.Brand

Description

Brand/Box-validation

Synopsis

Documentation

class KnownNat (GetVersion brand) => IsBrand brand Source #

A class that describes (on the type level) how a box can be nested into other boxes (see 'Boxes).

Associated Types

type BoxLayout brand :: BoxForrest Source #

type GetVersion brand :: Nat Source #

Instances

KnownNat v => IsBrand * (Dash v) Source #

A BoxLayout which contains the stuff needed for the dash brand. TODO incomplete

Associated Types

type BoxLayout (Dash v) (brand :: Dash v) :: BoxForrest Source #

type GetVersion (Dash v) (brand :: Dash v) :: Nat Source #

type ValidBox b t = IsBrandConform b (Just t) '[] Source #

Convenience wrapper around (IsBrandConform b ('Just t) '[])

type ValidContainerBox b t ts = IsBrandConform b (Just t) ts Source #

Convenience wrapper around (IsBrandConform b ('Just t) ts)

type ValidTopLevel b ts = IsBrandConform b Nothing ts Source #

Convenience wrapper around (IsBrandConform b 'Nothing ts)

type family IsBrandConform (b :: Type) (parent :: Maybe Type) (ts :: [Type]) :: Constraint where ... Source #

Boxes that valid according to the box structure defined in a IsBrand instance, i.e. where IsBrandConform holds.

Equations

IsBrandConform b Nothing ts = IsBrandConformImpl b (TopLevel b) ts (BoxLayout b) 
IsBrandConform b (Just parent) ts = IsBrandConformImpl b parent ts (LookUpSubtrees parent (BoxLayout b)) 

data BoxTree Source #

Define the cardinality and valid child boxes of a box.

type BoxForrest = [BoxTree] Source #

A list of BoxTrees

type OM b bs = OnceMandatory b bs Source #

Mandatory, container box, exactly one

type OM_ b = OnceMandatory b '[] Source #

Mandatory, exactly one, no children

type OO b bs = OnceOptional b bs Source #

Optional, container box, zero or one

type OO_ b = OnceOptional b '[] Source #

Optional, zero or one, no children

type SM b bs = SomeMandatory b bs Source #

Mandatory, container box, one or more

type SM_ b = SomeMandatory b '[] Source #

Mandatory, one or more, no children

type SO b bs = SomeOptional b bs Source #

Optional, container box, zero or more

type SO_ b = SomeOptional b '[] Source #

Optional, zero or more, no children