dtab-1.0: Harmonix (Guitar Hero, Rock Band) DTA/DTB metadata library

Safe HaskellNone
LanguageHaskell2010

Data.DTA.Serialize

Synopsis

Documentation

class ToChunks a where Source

Values which are stored as one or many chunks. Scalar types become one chunk, while lists and record types can make more.

Methods

toChunks :: a -> [Chunk] Source

Instances

ToChunks Bool

An integer 0 or 1.

ToChunks Float 
ToChunks Integer 
ToChunks ByteString

A String, not a Key.

ToChunks Chunk 
ToChunks DTA 
ToChunks Keyword 
ToChunks AudioFile 
ToChunks DrumLayout 
ToChunks Tracks 
ToChunks DryVoxPart 
ToChunks DryVox 
ToChunks AutogenTheme 
ToChunks Midi 
ToChunks Metadata 
ToChunks Percussion 
ToChunks Gender 
ToChunks Gamedata 
ToChunks Languages 
ToChunks AlbumArt 
ToChunks Project 
ToChunks RBProj 
ToChunks DrumSounds 
ToChunks Song 
ToChunks AnimTempo 
ToChunks Tonality 
ToChunks Pitch 
ToChunks SongPackage 
ToChunks a => ToChunks [a]

Each value is stored as one chunk in the list.

ToChunks a => ToChunks (Maybe a)

Represents Nothing with an empty chunk list.

ToChunks a => ToChunks (InParens a) 
ToChunks a => ToChunks (Dict a) 
(ToChunks a, ToChunks b) => ToChunks (Either a b)

Uses whichever toChunks is applicable. Does not tag which type is used.

(ToChunks a, ToChunks b) => ToChunks (a, b)

Stored as two chunks. Each subtype should be a single chunk.

class FromChunks a where Source

Values which can be read from one or many chunks.

newtype Dict a Source

A key-value structure which is stored as a sequence of (tag rest...) chunks.

Constructors

Dict 

Fields

fromDict :: Map ByteString a
 

Instances

Functor Dict 
Foldable Dict 
Traversable Dict 
Eq a => Eq (Dict a) 
Ord a => Ord (Dict a) 
Read a => Read (Dict a) 
Show a => Show (Dict a) 
FromChunks a => FromChunks (Dict a) 
ToChunks a => ToChunks (Dict a) 

newtype InParens a Source

A value which is DTA-stored as a parenthesized subtree around the normal representation.

Constructors

InParens 

Fields

fromInParens :: a
 

Instances

Eq a => Eq (InParens a) 
Ord a => Ord (InParens a) 
Read a => Read (InParens a) 
Show a => Show (InParens a) 
FromChunks a => FromChunks (InParens a) 
ToChunks a => ToChunks (InParens a) 

newtype Keyword Source

Stored as a Key, unlike the ByteString instance which is a String.

Constructors

Keyword