Monday, November 2, 2009

Cleaning up object model in preparation for post-data munge use. Trying some heavy use of generics and a granular inheritance hierarchy.

For example, I have a class:
public class DBObjectNodeEnum<P, T, C> : DBObjectNode<P, T>, ICollection<C> where T : DBObjectNode<P, T>

and Bar:
public class Bar : DBObjectNodeEnum
<ScoreLine, Bar, Stem>

which gives bars database CRUD, linked list node (next/prev bars etc) and children. I'll use this for Scores, ScoreLines, Bars, and Stems, DBObjectNode for Notes, and just inherit from IList for Staves and Chords. Maybe DBObjectNodeEnum for notes depending on how we polish voices.

I still want multiple inheritance in C#...


Next job after this is to generate scoreline drawing brushes.

No comments:

Post a Comment