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

From Apache OpenOffice Wiki
< Uno‎ | Binary
Jump to: navigation, search
(moved from udk.openoffice.org)
 
m (Updated state.)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
author[[User:Kr|Kr]] <br>
+
Type: Specification State: Evolving  Availability: URE 1.3
version: {{REVISIONID}} <br>
+
state:  draft          <br>
+
created: 08/07/2005    <br>
+
type:    specification  <br>
+
  
== Binary UNO ==
+
[[Uno/Spec/Purpose Environment|Purpose Environments]] for the [[Uno/Binary|Binary Uno]] [[Uno/Spec/Runtime|Runtime]].
=== Purpose Environments ===
+
  
; Feature
+
==API==
: 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.
+
  
:(Purpose) Environments are descripable as
+
<code>[cpp]
<env-name>[:<purpose-name>]*
+
#include "uno/EnvDcp.h"
: 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.
+
void uno_EnvDcp_getTypeName(rtl_uString const * envDcp, rtl_uString ** pTypeName);
 +
void uno_EnvDcp_getPurpose (rtl_uString const * envDcp, rtl_uString ** pPurpose);
 +
</code>
  
; Rationale
+
'''Note''': All access to members of environment descriptors need to use these access functions.
: 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
+
==Dependencies==
: Bin-UNO - uno/EnvDcp.h:
+
* [[Uno/Spec/Purpose Environment|Purpose Environments]]
: <code>void uno_EnvDcp_getTypeName(rtl_uString const * envDcp, rtl_uString ** pTypeName);</code>
+
: <code>void uno_EnvDcp_getPurpose (rtl_uString const * envDcp, rtl_uString ** pPurpose);</code>
+
  
: CPP-UNO - cppu/EnvDcp.hxx:
 
: <code>rtl::OUString cppu::EnvDcp_getTypeName(rtl::OUString const & envDcp);</code>
 
: <code>rtl::OUString cppu::EnvDcp_getPurpose (rtl::OUString const & envDcp);</code>
 
  
: Note: All access to members of environment descriptors should be changed to use the above access functions.
+
[[Category:Draft]]
 
+
[[Category:Spec]]
; Compatibility Issues
+
[[Category:Uno]]
: The character ':' gets a special meaning in all environment type names. All Binary UNO runtime functions dealing with environments typenames
+
[[Category:Uno:Binary]]
: <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.
+

Latest revision as of 11:52, 22 May 2007

Type: Specification State: Evolving Availability: URE 1.3

Purpose Environments for the Binary Uno Runtime.

API

[cpp]

  1. include "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);

Note: All access to members of environment descriptors need to use these access functions.

Dependencies

Personal tools