Okay, I've made a few updates in the last few days, don't know if anyone follows that particular branch of the CVS or not

So here's some update notes (minus test driver code that is in the changelog), and some details of what I'm currently working on.
Code: Select all
[color=yellow]3rd March, 2006 - Maarc[/color]
Added ToInt32( byte[] toConvert, int offset ) and ToUInt32( byte[] toConvert, int offset ) to the Conversion class
Added automatic parsing of a book's serial from the filename, if it's constructed via a filename
Exposed the book's Serial, Title, Author, NumPages and Pages as properties
Added basic classes to parse message boards. This is done through MessageBoardScript and MessageBoardSection.
Added basic constructor to Section() that accepts just a StreamReader
Added functionality to be able to set the line of a page of a book through indexing
Hid Sections from ClassicBookScript and MessageBoardScript
Updated TrimCommentAndWhitespace to remove NULLs
Added a TrimTrailingWhitespace command (in the event we don't want to actually trim a comment)
[color=yellow]3rd March, 2006 - Maarc[/color]
Added Save() routines to ClassicBookScript and ClassicBookSection, and validated them against test books
Adjusted some protection levels on some functions
Added ToByteArray() functions that accept int/uint, short/ushort, or string, and chunk out a byte array of a particular length
[color=yellow]3rd March, 2006 - Maarc[/color]
Added a ToString() function to Conversion. It takes either a byte[] or char[] and returns a valid string
Added InternalReset() functionality to the BaseScript and Section classes. This allows pre-retrieval resetting of vars for constructed objects (child classes override as necessary)
Updated and tested the ClassicBookScript and ClassicBookSection classes. They now read a valid book/pages, but currently does *not* write out! Saving of books is currently unimplemented
Added indexing capabilities to ClassicBookScript and ClassicBookSection, as well as hiding some unnecessary functions
The indexing ensures that a valid page/line is selected (if it doesn't, it returns NULL)
[color=yellow]2nd March, 2006 - Maarc[/color]
Added a basic ClassicBookScript and ClassicBookSection class. Note that this is *incomplete*, and requires testing against real data (which I don't have at the moment).
Added a very basic DictionaryScript and UOXIni class. They are a subclass of Script, with no additional information. Essentially, they just *are* normal Scripts, but this way, we can conceptualise it a bit better.
[color=yellow]1st March, 2006 - Maarc[/color]
Added a AccountScript and AccountSection class, for dealing with Accounts files
Fixed a possible bug with script parsing that only became apparent with AccountScript (if the delimiter appeared more than once, we weren't adding it in properly for the value part)
Added an AddSection routine to BaseScript, so one you create you can readily add in
[color=yellow]28th February, 2006 - Maarc[/color]
Updated DefinitionTree so you can get a Collection based on the DFN Category you want (GetCollection() method)
Added empty constructors for BaseScript(), WorldFile90() and Script(), so that we can create empty ones for populating later (not forced reads)
As for what I'm currently working on, it's DFN validation stuff. It won't be entirely transparent (ie it won't validate when it reads in), but it's an optional system by which people can validate DFNs. At the moment, it has the current goals
* Different schemas for different parts of the DFNs. A Race validates differently than an Item
* Flexible and easy to use, with an easy way to determine which schema you need to use
* Validates that a section only includes the TAGs that are actually valid for it
* Validates the value that accompanies a tag. If we're expecting a numeric, make sure it is. Expanded to include strings, uppercase strings, numerics, floats, double numerics (ie like TAG=10 30), and double floats (ie like TAG=10.5 11.5)
* Provides the capability to actually log errors that are found during validation
* Provide a way to sanitise a section. At the moment, I see this as stripping out invalid TAGs, as well as stripping out tag/value pairs, where the value is not in the right format (ie you specified a string rather than a numeric). This is also error logged.
Thoughts? Ideas? Suggestions?
As it stands, I have a basic schema in place for the general Race DFNs. I'll be going on to others soon.