Difference between revisions of "Uno/Binary/Spec/Environment Descriptor"

From Apache OpenOffice Wiki
< Uno‎ | Binary
Jump to: navigation, search
m (Added category.)
(Factored out generic parts.)
Line 1: Line 1:
author:  [[User:Kr|Kr]] <br>
 
 
version: {{REVISIONID}} <br>
 
version: {{REVISIONID}} <br>
 
state:  draft          <br>
 
state:  draft          <br>
created: 08/07/2005    <br>
 
 
type:    specification  <br>
 
type:    specification  <br>
  
== Binary UNO ==
+
== Purpose Environments ==
=== Purpose Environments ===
+
  
 
; Feature
 
; Feature
: This feature extends the environment type naming by introducing a so called "purpose" part into the environment type naming, basically changing the environment type name to become an environment descriptor, defining the environment type and the environment purpose.
+
: [[Uno/Spec/Purpose Environment | Purpose Environments]] for the Binary Uno [[Uno/Spec/Runtime | Runtime]].
 
+
:(Purpose) Environments are descripable as
+
:  <env-name>[:<purpose-name>]*
+
: meaning that purpose names can be chained. This allows to have different environments of the same types to be globally visible, while 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. The former string describing environment type names becomes an environment descriptor.
+
 
+
; Rationale
+
: Currently every UNO environment is either annonymous or globally visible. All globally visible environments are uniquely identified by the type name. That means, that every bridge specific environment can only be visible once globally. To be able to use more than one type specific environment in a global way, support for a differentiator (the purpose) is needed.
+
  
 
; API
 
; API
Line 36: Line 19:
 
: Note: All access to members of environment descriptors should be changed to use the above access functions.
 
: Note: All access to members of environment descriptors should be changed to use the above access functions.
  
; Compatibility Issues
+
; Dependencies:  
: The character ':' gets a special meaning in all environment type names. All Binary UNO runtime functions dealing with environments typenames
+
:* [[Uno/Binary/Spec/Cascaded Mapping | Cascaded Mapping]]
: <code>uno_getEnvironment</code>
+
: <code>uno_getRegisteredEnvironments</code>
+
: <code>uno_createEnvironment</code>
+
: <code>uno_dumpEnvironmentByName</code>
+
: are changed to support purposes parts. All parameter names get changed to reflect the new semantics of the former type name. The "pTypeName" member of the UNO environment does not get changed, to ensure build compatibility.
+
 
+
: In case of not providing purposes in an environment descriptor, the env. descriptor degenerates to just an environment 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 type or purpose name from the environment descriptor.
+
 
+
: Note: Purpose environments _must_ not be used with not purpose environment aware language bridges.
+
 
+
; Dependencies: None.
+
  
 
[[Category:Uno:Binary:Spec]]
 
[[Category:Uno:Binary:Spec]]

Revision as of 11:03, 18 April 2006

version: 8179
state: draft
type: specification

Purpose Environments

Feature
Purpose Environments for the Binary Uno Runtime.
API
Bin-UNO - uno/EnvDcp.h:
void uno_EnvDcp_getTypeName(rtl_uString const * envDcp, rtl_uString ** pTypeName);
void uno_EnvDcp_getPurpose (rtl_uString const * envDcp, rtl_uString ** pPurpose);
CPP-UNO - cppu/EnvDcp.hxx:
rtl::OUString cppu::EnvDcp_getTypeName(rtl::OUString const & envDcp);
rtl::OUString cppu::EnvDcp_getPurpose (rtl::OUString const & envDcp);
Note: All access to members of environment descriptors should be changed to use the above access functions.
Dependencies
Personal tools