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

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
m (Removed note:)
m (Updated status line.)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
version: {{REVISIONID}} <br>
+
Type: specification  State: draft  Claim: recommended
state:   draft         <br>
+
type:    specification <br>
+
  
== Purpose Environments ==
+
==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 [[Uno/Term/Object Binary Interface|Object Binary Interface (OBI)]] and the environment purpose.
  
; Feature
+
Environments are described as
: 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 type and the environment purpose.
+
<pre>"<OBI>[:<purpose>]*"</pre>
 +
meaning that purposes can be chained. This allows to have different environments of the same [[Uno/Term/Object Binary Interface|OBI]] types to be globally visible, differing in their purpose. For example:
 +
* <code>"uno:affine"</code>
 +
* <code>"uno:debug"</code>
 +
* <code>"uno:log:affine"</code>
 +
* <code>"gcc3:debug"</code>
 +
* <code>"gcc3"</code>
  
:Environments are descriped as
+
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 [[Uno/Term/Object Binary Interface|OBI]] now becomes an [[Uno/Spec/Environment Descriptor | Environment Descriptor]].
:  <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:
+
:* <code>"uno:thread"</code>
+
:* <code>"uno:debug"</code>
+
:* <code>"uno:log:thread"</code>
+
:* <code>"gcc3:debug"</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 type now becomes an [[Uno/Spec/Environment Descriptor | Environment Descriptor]].
+
  
; Rationale
+
==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 <code>"gcc3"</code>) 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 [[Uno/Spec/Cascaded Mapping | Cascaded Mappings]] purpose environments are a powerful instrument for isolating and controlling sets of objects.
+
Currently every UNO environment is either anonymous or globally visible. All globally visible environments are uniquely identified by their [[Uno/Term/Object Binary Interface|OBI]] (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 [[Uno/Term/Object Binary Interface|OBI]] 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
+
==API==
: <code>String getTypeName(String envDcp);</code>
+
<pre>
: <code>String getPurpose (String envDcp);</code>
+
String getTypeName(String envDcp);
 +
String getPurpose (String envDcp);
 +
</pre>
  
; Compatibility Issues
+
==Compatibility==
: The character ':' gets a special meaning in all environment ABI type names. All [[Uno/Spec/Runtime | Runtime]] functions dealing with environments typenames
+
The character ':' gets a special meaning in all environment [[Uno/Term/Object Binary Interface|OBI]] type names. All [[Uno/Spec/Runtime|Runtime]] functions dealing with environment [[Uno/Term/Object Binary Interface|OBI]] names, e.g.
: <code>getEnvironment</code>
+
<pre>
: <code>getRegisteredEnvironments</code>
+
getEnvironment
: <code>createEnvironment</code>
+
getRegisteredEnvironments
: <code>dumpEnvironmentByName</code>
+
createEnvironment
: are support [[Uno/Spec/Environment Descriptor | Environment Descriptors]]. All parameter names reflect the new semantics.
+
dumpEnvironmentByName
 +
</pre>
 +
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 ABI type 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 type or purpose part from the environment descriptor.
+
In case of not providing purposes in an environment descriptor, the env. descriptor degenerates to just an environment [[Uno/Term/Object Binary Interface|OBI]] 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 [[Uno/Term/Object Binary Interface|OBI]] or purpose part from an environment descriptor.
  
: Note: Purpose environments _must_ not be used with not purpose environment aware [[Uno/Spec/Language Binding | Language Bindings]].
+
'''Note''': Purpose environments _must_ not be used with not purpose environment aware [[Uno/Spec/Language Binding|Language Bindings]].
  
; Dependencies
+
==Dependencies==
:* [[Uno/Spec/Cascaded Mapping]]
+
* [[../Cascaded Mapping]]
  
  
 +
[[Category:Draft]]
 +
[[Category:Spec]]
 +
[[Category:Uno]]
 
[[Category:Uno:Spec]]
 
[[Category:Uno:Spec]]

Latest revision as of 09:14, 13 February 2007

Type: specification State: draft Claim: recommended

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 Object Binary Interface (OBI) and the environment purpose.

Environments are described as

"<OBI>[:<purpose>]*"

meaning that purposes can be chained. This allows to have different environments of the same OBI 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 OBI now becomes an Environment Descriptor.

Rationale

Currently every UNO environment is either anonymous or globally visible. All globally visible environments are uniquely identified by their OBI (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 OBI 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 OBI type names. All Runtime functions dealing with environment OBI 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 OBI 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 OBI or purpose part from an environment descriptor.

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

Dependencies

Personal tools