Multiple Library Switch Layer

To allow use of a local cache of parts for a project and also local or remote databases it is necessary to have a common layer that can support various different data providers.

For SQL databases QT is used but for XML in a filesystem based library for either project cache or local filesystem based librarry. This requires an intermediate class that can access all underlaying data sources is a priority orderered way.

Support for XML data in SQL database

The xml based object classes should be able to be used as objects to be stored in later SQL databases instead of the ASVD files that are surrently used. This will still need some adaptoion since not all XML data will be stored as data but instead som will be used as other fields in the database.

Exsisting classes

LibDbMgr

Multiple SQL library interface. presently provides interface to upper level access rountines part of the schematic editor.

SQL specific access routines should be moved out to LibDbSQL and the remains of this class converted into a generic switch layer than can access LibDbSQL, LibDbXML, LibDbXML_PCache.

DbMgr

Lower level, completely SQL specific. rename to DbMgrSQL. Presently LibDbMgr is derived from this class. this must be changed.

Object Classes

These classes exsist at the moment as part, symbol, pin etc. and further broken down into line, arc, rectangle etc.

Splitting out the asvd code into separate classes so the basic parts are just data containers but can be casted to either the asvd deravitive of an xml deravitive that provide the file/io conversion. this will result in classes called

Splitting things up like this means adding of other possible storage formats becomes easier.

Individual format files may be split out into subdirectories for separation. ASVD will be depreciated in favor of xml. eventaually the SQL database will be adapted to store xml. the only advantage of the ASVD format over the xml is that it requires less storage space in the database.

Interface

The interface remains very similar to LibDbMgr has now. All SQL specific code will be extracted out and a switch layer implemented. This layer will provide the ability to assign priorities to various databases.

New functions will be added to allow adding of new database sources at runtime, perhaps as configured by config files. A Base class for all library database provider classes called LibSource will be created. This Will provide a generic interface for all library file format and sources. The project cache will always be assigned the highest priority but other sources will be user configerable.