LaneDibello / KotOR_IO

Class library that allows for the reading, writing, and constructing of file types commonly found in the Star Wars: Knights of the Old Republic source.
3 stars 2 forks source link

Other GFF Derivatives #4

Open LaneDibello opened 5 years ago

LaneDibello commented 5 years ago

Due to the heavily varied, and numerous variants of GFF files, it would be best to allow GFF to serve as a super class to a number of derivatives as Contained in GFF_Derivatives.cs.

Aside from Blueprints there are several other GFF file types as listed (NOTE: It remains to be seen whether all of these file types will be integrated):

LaneDibello commented 3 years ago

So my idea would be as follows: Create a nested Namespace within KOTOR_IO (called GFFTypes, or something similar) Within it we create these "derived" classes who's only member is just a private GFF, and the public facing side will be a set of properties that allow logical access to all of the fields for that file. I don't see the need for true inheritance anymore. In the event need to pass these to some other method that takes GFFs, we can just use a method that grants access to the private member (or maybe make the member public?).

The way I propose these different types be laid out are as follows. For all file types the Top-Level fields will just be granted properties of the same name/type that access them. Lower level fields will be handled on a class by class basis: