Difference between revisions of "DOM resolver subsystem"

From COLLADA Public Wiki
Jump to navigation Jump to search
m (→‎Related classes and functions: chg how article sorts in catg--caps)
Line 1: Line 1:
'''Summary:''' The '''resolver subsystem''' manages the resolution of [[URI]]s based on various URI schemes and filename extensions.
+
'''Summary:''' The '''resolver subsystem''' manages the resolution of [[URI]]s based on a URI's scheme and filename extensions.
  
 
==Purpose==
 
==Purpose==
:''Anything more detailed about its purpose''
 
  
Text here...
+
The '''resolver subsystem''' allows for custom URI resolvers to be written and added to the [[COLLADA DOM]]. These resolvers can be used to load various types of external references, i.e. binary representations of mesh data, or provide access to different data systems, i.e. using a database to access elements.
  
 
==Default behavior==
 
==Default behavior==
:''What kinds of default behavior does this subsystem exhibit and in what circumstances? Can you change the default?''
 
  
By default, this subsystem resolves only [[COLLADA document]]s, whether internal or external references...
+
By default, the [[COLLADA DOM]] has only two resolvers. The main resolver, daeLIBXMLResolver resolves elements from [[COLLADA document]]s (.dae or .xml) with the ''file'' or ''http'' URI scheme. This can resolve elements from the same docuemnt or external document references.
  
''More text here...''
+
The newly added [[DOM raw resolver class]], daeRawResolver, resolves only .raw files with the ''file'' URI scheme. A .raw file contains COLLADA source element float_array and int_array data in binary form.
 +
 
 +
Instantiating an object of a class that inherits from daeURIResolver adds a custom resolver to the [[COLLADA DOM]].
  
 
==How it works==
 
==How it works==
:''How does this subsystem operate?''
 
 
Each blah blah blah
 
  
==Resolver example==
+
The base class daeURIResolver contains a static array of resolvers named _KnownResolvers. The constuctor for daeURIResolver adds a reference to ''this'' to this list of resolvers. When a [[DOM URI class]] attempts to resolve itself it searches through the _KnownResolvers list for a resolver that matches it's URI scheme and file extension. When an appropriate resolver is found, the resolver is then asked to resolve the current URI.
:''Describe an example use of the resolver subsystem''
 
  
 
==Related classes and functions==
 
==Related classes and functions==
*[[DOM resolver class]]: ''summary text here, e.g.:'' An interface to inherit from for creating resolvers.   
+
*[[DOM resolver class]]: An interface to inherit from for creating URI resolvers.   
* ''other?''
+
*[[DOM URI class]]: The class used to represent URIs in a [[COLLADA document]].
  
 
[[Category:DOM project|Resolver subsystem]]
 
[[Category:DOM project|Resolver subsystem]]

Revision as of 21:54, 20 March 2007

Summary: The resolver subsystem manages the resolution of URIs based on a URI's scheme and filename extensions.

Purpose

The resolver subsystem allows for custom URI resolvers to be written and added to the COLLADA DOM. These resolvers can be used to load various types of external references, i.e. binary representations of mesh data, or provide access to different data systems, i.e. using a database to access elements.

Default behavior

By default, the COLLADA DOM has only two resolvers. The main resolver, daeLIBXMLResolver resolves elements from COLLADA documents (.dae or .xml) with the file or http URI scheme. This can resolve elements from the same docuemnt or external document references.

The newly added DOM raw resolver class, daeRawResolver, resolves only .raw files with the file URI scheme. A .raw file contains COLLADA source element float_array and int_array data in binary form.

Instantiating an object of a class that inherits from daeURIResolver adds a custom resolver to the COLLADA DOM.

How it works

The base class daeURIResolver contains a static array of resolvers named _KnownResolvers. The constuctor for daeURIResolver adds a reference to this to this list of resolvers. When a DOM URI class attempts to resolve itself it searches through the _KnownResolvers list for a resolver that matches it's URI scheme and file extension. When an appropriate resolver is found, the resolver is then asked to resolve the current URI.

Related classes and functions