Difference between revisions of "Uno/Spec/Purpose Environment"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
m (Relativated links.)
m (Changed structure.)
Line 5: Line 5:
 
== Purpose Environments ==
 
== Purpose Environments ==
  
; Feature
+
=== Feature ===
: Environment type naming is extended by introducing a so called "purpose" part, actually changing the environment type name to become an [[Uno/Spec/Environment Descriptor | Environment Descriptor]], defining the environment [[wikipedia:Application_Binary_Interface|ABI]] and the environment purpose.
+
Environment type naming is extended by introducing a so called "purpose" part, actually changing the environment type name to become an [[Uno/Spec/Environment Descriptor | Environment Descriptor]], defining the environment [[wikipedia:Application_Binary_Interface|ABI]] and the environment purpose.
  
:Environments are descriped as
+
Environments are descriped as
<ABI type>[:<purpose>]*
+
<pre><ABI type>[:<purpose>]*</pre>
: meaning that purposes can be chained. This allows to have different environments of the same [[wikipedia:Application_Binary_Interface|ABI]] types to be globally visible, differing in their purpose. For example:
+
meaning that purposes can be chained. This allows to have different environments of the same [[wikipedia:Application_Binary_Interface|ABI]] types to be globally visible, differing in their purpose. For example:
:* <code>"uno:affine"</code>
+
* <code>"uno:affine"</code>
:* <code>"uno:debug"</code>
+
* <code>"uno:debug"</code>
:* <code>"uno:log:affine"</code>
+
* <code>"uno:log:affine"</code>
:* <code>"gcc3:debug"</code>
+
* <code>"gcc3:debug"</code>
:* <code>"gcc3"</code>
+
* <code>"gcc3"</code>
:
+
: When requesting the above examples, every environment is globally visible, while partly representing the same type or purpose, every combination is unique. Semantically, the former string describing an environments ABI now becomes an [[Uno/Spec/Environment Descriptor | Environment Descriptor]].
+
  
; Rationale
+
When requesting the above examples, every environment is globally visible, while partly representing the same type or purpose, every combination is unique. Semantically, the former string describing an environments ABI now becomes an [[Uno/Spec/Environment Descriptor | Environment Descriptor]].
: Currently every UNO environment is either annonymous or globally visible. All globally visible environments are uniquely identified by their [[wikipedia:Application_Binary_Interface|ABI]] (type) name. That means, that every bridge specific environment (such as <code>"gcc3"</code>) can only be visible once globally. To be able to use more than one [[wikipedia:Application_Binary_Interface|ABI]] type specific environment in a global way, support for a differentiator is needed. Together with [[Uno/Spec/Cascaded Mapping | Cascaded Mappings]] purpose environments are a powerful instrument for isolating and controlling sets of objects.
+
  
; API
+
=== Rationale ===
: <code>String getTypeName(String envDcp);</code>
+
Currently every UNO environment is either annonymous or globally visible. All globally visible environments are uniquely identified by their [[wikipedia:Application_Binary_Interface|ABI]] (type) name. That means, that every bridge specific environment (such as <code>"gcc3"</code>) can only be visible once globally. To be able to use more than one [[wikipedia:Application_Binary_Interface|ABI]] type specific environment in a global way, support for a differentiator is needed. Together with [[Uno/Spec/Cascaded Mapping | Cascaded Mappings]] purpose environments are a powerful instrument for isolating and controlling sets of objects.
: <code>String getPurpose (String envDcp);</code>
+
  
; Compatibility
+
=== API ===
: The character ':' gets a special meaning in all environment [[wikipedia:Application_Binary_Interface|ABI]] type names. All [[Uno/Spec/Runtime | Runtime]] functions dealing with environment [[wikipedia:Application_Binary_Interface|ABI]] names, e.g.
+
<code>String getTypeName(String envDcp);</code>
: <code>getEnvironment</code>,
+
<code>String getPurpose (String envDcp);</code>
: <code>getRegisteredEnvironments</code>,
+
: <code>createEnvironment</code>,
+
: <code>dumpEnvironmentByName</code>,
+
: are to support [[Uno/Spec/Environment Descriptor | Environment Descriptors]]. All parameter names are to reflect this semantics.
+
  
: In case of not providing purposes in an environment descriptor, the env. descriptor degenerates to just an environment [[wikipedia:Application_Binary_Interface|ABI]] name. This means, that the change is compatible with all former usages and bridges, in case it does not get utilized. To utilize this feature, bridges should use the appropriate accessor methods to get the [[wikipedia:Application_Binary_Interface|ABI]] or purpose part from an environment descriptor.
+
=== Compatibility ===
 +
The character ':' gets a special meaning in all environment [[wikipedia:Application_Binary_Interface|ABI]] type names. All [[Uno/Spec/Runtime | Runtime]] functions dealing with environment [[wikipedia:Application_Binary_Interface|ABI]] names, e.g.
 +
<pre>
 +
getEnvironment
 +
getRegisteredEnvironments
 +
createEnvironment
 +
dumpEnvironmentByName<
 +
</pre>
 +
are to support [[Uno/Spec/Environment Descriptor | Environment Descriptors]]. All parameter names are to reflect this semantics.
  
: Note: Purpose environments _must_ not be used with not purpose environment aware [[Uno/Spec/Language Binding | Language Bindings]].
+
In case of not providing purposes in an environment descriptor, the env. descriptor degenerates to just an environment [[wikipedia:Application_Binary_Interface|ABI]] name. This means, that the change is compatible with all former usages and bridges, in case it does not get utilized. To utilize this feature, bridges should use the appropriate accessor methods to get the [[wikipedia:Application_Binary_Interface|ABI]] or purpose part from an environment descriptor.
  
; Dependencies
+
'''Note''': Purpose environments _must_ not be used with not purpose environment aware [[Uno/Spec/Language Binding | Language Bindings]].
:* [[../Cascaded Mapping]]
+
 
 +
=== Dependencies ===
 +
* [[../Cascaded Mapping]]
  
  
 
[[Category:Uno:Spec]]
 
[[Category:Uno:Spec]]

Revision as of 11:05, 15 June 2006

version: 12508
state: draft
type: specification

Purpose Environments

Feature

Environment type naming is extended by introducing a so called "purpose" part, actually changing the environment type name to become an Environment Descriptor, defining the environment ABI and the environment purpose.

Environments are descriped as

<ABI type>[:<purpose>]*

meaning that purposes can be chained. This allows to have different environments of the same ABI types to be globally visible, differing in their purpose. For example:

  • "uno:affine"
  • "uno:debug"
  • "uno:log:affine"
  • "gcc3:debug"
  • "gcc3"

When requesting the above examples, every environment is globally visible, while partly representing the same type or purpose, every combination is unique. Semantically, the former string describing an environments ABI now becomes an Environment Descriptor.

Rationale

Currently every UNO environment is either annonymous or globally visible. All globally visible environments are uniquely identified by their ABI (type) name. That means, that every bridge specific environment (such as "gcc3") can only be visible once globally. To be able to use more than one ABI type specific environment in a global way, support for a differentiator is needed. Together with Cascaded Mappings purpose environments are a powerful instrument for isolating and controlling sets of objects.

API

String getTypeName(String envDcp); String getPurpose (String envDcp);

Compatibility

The character ':' gets a special meaning in all environment ABI type names. All Runtime functions dealing with environment ABI names, e.g.

getEnvironment
getRegisteredEnvironments
createEnvironment
dumpEnvironmentByName<

are to support Environment Descriptors. All parameter names are to reflect this semantics.

In case of not providing purposes in an environment descriptor, the env. descriptor degenerates to just an environment ABI name. This means, that the change is compatible with all former usages and bridges, in case it does not get utilized. To utilize this feature, bridges should use the appropriate accessor methods to get the ABI or purpose part from an environment descriptor.

Note: Purpose environments _must_ not be used with not purpose environment aware Language Bindings.

Dependencies

Personal tools