[ID3 Dev] Implementation question

Andy Kernahan andrew.kernahan at googlemail.com
Wed Jan 24 04:15:21 PST 2007


Hi Brian,

I use a factory which creates frames based on the frame ID.

Users can register a new frame type by specifying the frame ID and a
delegate. The delegate is responsible for returning an instance of a
ID3Frame derived type. Derived types must override the Parse method.

Unknown frames are parsed by an ID3BinaryFrame which simply reads the frame
data into an array.

Hope this helps,

Andy.

On 24/01/07, Brian Mearns <bmearns at coe.neu.edu> wrote:
>
> I have a question for developers who use an OO paradigm for ID3 work:
> Assuming there are different classes to implement different frames, but
> not neccessarily one class per frame (for instance, a class to handle
> text-frames and another to handle everything else), what pattern do you
> use to decide which class will be called on while parsing a tag? I'd
> like to keep it as abstract as possible so that, for instance, if I add
> another class to handle another type of frame later, it will be easy and
> consistent to work it in.
>
> Is that at all clear?
>
> Thanks,
> -Brian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
> For additional commands, e-mail: id3v2-help at id3.org
>
>


-- 
Andy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.id3.org/pipermail/id3v2/attachments/20070124/472d288c/attachment.html>


More information about the ID3v2 mailing list