Redesign input file header management

Create issue
Issue #85 new
Roy Walmsley created an issue

The SoDB and SoDBP files manage the recognition of valid headers on input files. The list of headers is getting quite long, and the addition of X3D (issue #80) will add more. For example, there are several versions of X3D (3.0, 3.1, 3.2, 3.3) and probably more to follow. Then there are three encodings for each version (xml, classic VRML and compressed binary). Covering all possibilities, well...

So I am proposing to proceed as follows:

Modify the whole scheme so that headers are recognised by

1) File type - four initial examples #Inventor, #VRML , #X3D and <?xml. 2) Version number - Vx.x(.x) where x is one or more digits 3) Encoding - ascii, binary, utf-8.

The SoDB::init code will define all the acceptable types, and the maximum version number acceptable for each type.

Code to check test strings would be maintained. When reading in files recognition of header types would generate an appropriate enum value to specify the type of nodes to read, e.g. Inventor, VRML or X3D.

Comments (0)

  1. Log in to comment