Difference between revisions of "Uno/Spec/Cascaded Mapping"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
(Cascaded Mapping.)
 
m (Fixed link.)
Line 28: Line 28:
 
; Compatibility Issues: None.
 
; Compatibility Issues: None.
  
; Dependencies : [[Uno/Spec/Purpose Environments | Purpose Environments]]
+
; Dependencies : [[../Purpose Environment]]
  
 
[[Category:Uno:Spec]]
 
[[Category:Uno:Spec]]

Revision as of 08:32, 13 June 2006

version: 12387
state: final
type: specification

Cascaded Mapping

Feature
Cascaded mappings extend the mapping search algorithm in a generic way, that it always finds a mapping between any two particular (purpose) environments, necessarily falling back to the generic UNO environment for mediation in case no specialized mappings can be found.
For example:
uno::Mapping("gcc3:thread", "gcc3")
gets mediated via the "uno_uno_thread" purpose bridge:
=> Mapping("gcc3:thread" -> "uno:thread" -> "uno" -> "gcc3")
Mapping algorithm:
  1. directly map, in all cases with the same purpose: "uno:mutex" -> "gcc3:mutex" => "uno:mutex" -gcc3_uno-> "gcc3:mutex"
  2. mediate through a purpose in case it is asked for a mapping between different purposes: "uno:mutex" -mutex_uno_uno-> "uno", the purpose here is "mutex_uno_uno"
  3. mediate through the "uno" environment, if asked for a mapping from one purpose environment to another purpose environment: "uno:mutex" -> "uno:thread" => "uno:mutex" -mutex_uno_uno-> "uno" -thread_uno_uno-> "uno:thread"
  4. recursively apply -4- in case a multi purpose has been specified: "gcc3:mutex:debug" -> "gcc3:thread" => "gcc3:mutex:debug" -gcc3_uno-> "uno:mutex:debug" -debug_uno_uno-> "uno:mutex" -mutex_uno_uno-> "uno" -thread_uno_uno-> "uno:thread" -gcc3_uno-> "gcc3:thread"
  5. map through the nearest "uno:<purpose>" environment: "gcc3:debug:mutex" <-> "gcc3:debug:thread" => "gcc3:debug:mutex" -gcc3_uno-> "uno:debug:mutex" -mutex_uno_uno-> "uno:debug" -thread_uno_uno-> "uno:debug:thread" -gcc3_uno-> "gcc3:debug:thread"
  6. shortcut if possible, no is mediation necessary, should directly map through purpose: "uno:debug:thread" -> "uno:debug" => "uno:debug:thread" -thread_uno_uno-> "uno:debug"
The mapping algorithm does not know any particular purpose. It is just leverages the current purpose API.
Rationale 
The introduction of purpose environments allows, to have environments of the same type (e.g. "gcc3") but with different purposes. The introduction of cascaded mappings allows to map between environments of different purposes, by using the UNO runtimes protocol mapping mechanism.
API
None, implicit only.
Compatibility Issues
None.
Dependencies 
Uno/Spec/Purpose Environment
Personal tools