Uno/Spec/Purpose Environment

From Apache OpenOffice Wiki
< Uno‎ | Spec
Revision as of 10:59, 18 April 2006 by Kr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

version: 8177
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 type 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:thread"
  • "uno:debug"
  • "uno:log:thread"
  • "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 type 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);
Note: All access to members of environment descriptors should be changed to use the above access functions.
Compatibility Issues
The character ':' gets a special meaning in all environment ABI type names. All Runtime functions dealing with environments typenames
getEnvironment
getRegisteredEnvironments
createEnvironment
dumpEnvironmentByName
are support Environment Descriptors. All parameter names reflect the new 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.
Note: Purpose environments _must_ not be used with not purpose environment aware Language Bindings.
Dependencies
Personal tools