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

From Apache OpenOffice Wiki
< Uno‎ | Binary
Jump to: navigation, search
m (Splitted categories.)
(Updated state.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Type:   specification  <br>
+
Type: specification  State: Evolving  Availability: URE 1.3
State:   draft          <br>
+
  
 
==Feature==
 
==Feature==
The [[Uno/Spec/Environment Stack]] for [[Uno/Binary|Binary Uno]].
+
The [[Uno/Spec/Environment Stack|abstract Environment Stack]] for [[Uno/Binary|Binary Uno]].
  
[[../Environment]]s can be:
+
[[../Environment|environments]] can be:
 
* entered or
 
* entered or
 
* left, respectively
 
* left, respectively
 
* invoked
 
* invoked
by a thread. The currently entered [[../environment]] can be retrieved.
+
by a thread. The currently entered [[../Environment|environment]] can be retrieved.
 
    
 
    
Multiple purpose environments can be entered/invoked at the same time.
+
Multiple [[Uno/Spec/Purpose Environment|purpose environments]] can be entered/invoked at the same time.
 
Purposes of environment can be specified in any particular order, e.g.:
 
Purposes of environment can be specified in any particular order, e.g.:
 
<code>[cpp]
 
<code>[cpp]
Line 23: Line 22:
 
The prototype for a callee:
 
The prototype for a callee:
 
<code>[cpp]
 
<code>[cpp]
typedef void uno_EnvCallee(va_list);
+
typedef void SAL_CALL uno_EnvCallee(va_list);
 
</code>
 
</code>
  
The Enterable interface, to be optionally implemented by [[../Purpose Environments]]:
+
The Enterable interface, to be optionally implemented by [[Uno/Spec/Purpose Environment|purpose environments]]:
 
<code>[cpp]
 
<code>[cpp]
 
typedef void uno_Enterable_enter    (void * context);
 
typedef void uno_Enterable_enter    (void * context);
Line 45: Line 44:
 
</code>
 
</code>
  
The client API, which is thread affine:
+
The client API, which is [[Uno/Term/Thread Affine|thread-affine]]:
 
<code>[cpp]
 
<code>[cpp]
 
void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, char const * pEnv_type) SAL_THROW_EXTERN_C();
 
void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, char const * pEnv_type) SAL_THROW_EXTERN_C();
Line 58: Line 57:
  
 
[[Category:Spec]]
 
[[Category:Spec]]
 +
[[Category:Draft]]
 
[[Category:Uno]]
 
[[Category:Uno]]
 
[[Category:Uno:Binary]]
 
[[Category:Uno:Binary]]

Latest revision as of 11:46, 22 May 2007

Type: specification State: Evolving Availability: URE 1.3

Feature

The abstract Environment Stack for Binary Uno.

environments can be:

  • entered or
  • left, respectively
  • invoked

by a thread. The currently entered environment can be retrieved.

Multiple purpose environments can be entered/invoked at the same time. Purposes of environment can be specified in any particular order, e.g.: [cpp] "uno:A:B:C" Where the order may be relevant, depending on the purpose environments.

Rationale

API

The prototype for a callee: [cpp] typedef void SAL_CALL uno_EnvCallee(va_list);

The Enterable interface, to be optionally implemented by purpose environments: [cpp] typedef void uno_Enterable_enter (void * context); typedef void uno_Enterable_leave (void * context); typedef void uno_Enterable_callInto_v(void * context, uno_EnvCallee * pCallee, va_list param); typedef void uno_Enterable_callOut_v (void * context, uno_EnvCallee * pCallee, va_list param); typedef int uno_Enterable_isValid_v (void * context, rtl_uString ** ppReason);

typedef struct {

 uno_Enterable_enter      * m_enter;
 uno_Enterable_leave      * m_leave;
 uno_Enterable_callInto_v * m_callInto_v;
 uno_Enterable_callOut_v  * m_callOut_v;
 uno_Enterable_isValid_v  * m_isValid;

} uno_Enterable;

The client API, which is thread-affine: [cpp] void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, char const * pEnv_type) SAL_THROW_EXTERN_C(); void SAL_CALL uno_Environment_invoke_v (uno_Environment * pEnv, uno_EnvCallee * pCallee, va_list param) SAL_THROW_EXTERN_C(); void SAL_CALL uno_Environment_invoke (uno_Environment * pEnv, uno_EnvCallee * pCallee, ...) SAL_THROW_EXTERN_C(); void SAL_CALL uno_Environment_enter (uno_Environment * pEnv) SAL_THROW_EXTERN_C(); int SAL_CALL uno_Environment_isValid (uno_Environment * pEnv, rtl_uString ** pReason) SAL_THROW_EXTERN_C();

uno_Environment->pReserved == uno_Enterable *

Personal tools