Difference between revisions of "Uno/Cpp/Spec/Environment Guard"

From Apache OpenOffice Wiki
< Uno‎ | Cpp‎ | Spec
Jump to: navigation, search
m (Added header file name.)
m (Updated state.)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
version: {{REVISIONID}} <br>
+
Type: Specification  State: Evolving Availability: URE 1.3 (SRC680_m212)
state:   draft          <br>
+
type:    specification <br>
+
  
== Environment Guard ==
+
==Feature==
 +
A Guard for [[Uno/Cpp/Spec/Environment|C++ Uno environments]].
  
; Feature: A Guard and an AntiGuard for [[Uno/Cpp/Spec/Environment | C++ UNO environments]].
+
==API==
 
+
<code>[cpp]
; Rationale :
+
 
+
; API:
+
<pre>
+
 
cppu/EnvGuards.hxx
 
cppu/EnvGuards.hxx
  
cppu::EnvGuard
+
  class cppu::EnvGuard
   EnvGuard(uno::Environment const & env);</code>
+
   {
 +
    public:
 +
      EnvGuard(cssuno::Environment const & env);
 +
      ~EnvGuard(void);
  
cppu::AntiEnvGuard
+
      void clear(void);
  AntiEnvGuard(void);
+
  };
 +
</code>
  
  ClearableEnvGuard
+
==Usage Example==
  ClearableEnvGuard(uno::Environment const & env);
+
{{:Uno/Cpp/Snippet/Environment Guard}}
  void clear(void);
+
</pre>
+
  
; Compatibility Issues: None.
+
==Dependencies==
 +
* [[Uno/Cpp/Spec/Environment]]
 +
* [[Uno/Cpp/Spec/Environment Stack]]
  
; Dependencies:
 
:* [[Uno/Cpp/Spec/Environment | C++ uno::Environment]]
 
:* [[Uno/Cpp/Spec/Environment Stack | Environment Stack]]
 
  
[[Category:Uno:Cpp:Spec]]
+
[[Category:Evolving]]
 +
[[Category:Spec]]
 +
[[Category:Uno]]
 +
[[Category:Uno:Cpp]]

Latest revision as of 10:15, 23 May 2007

Type: Specification State: Evolving Availability: URE 1.3 (SRC680_m212)

Feature

A Guard for C++ Uno environments.

API

[cpp] cppu/EnvGuards.hxx

 class cppu::EnvGuard
 {
   public:
     EnvGuard(cssuno::Environment const & env);
     ~EnvGuard(void);
     void clear(void);
 };

Usage Example

#include <cppu/EnvGuards.hxx>
...
{
  cppu::EnvGuard cppUnsafe(uno::Environment(RTL_CONSTASCII_USTRINGPARAM("c++:unsafe")));
  // From here onwards the environment is entered, until the end of the block.
  ...
}

Dependencies

Personal tools