23 #ifndef INCLUDED_UNO_ENVIRONMENT_HXX 24 #define INCLUDED_UNO_ENVIRONMENT_HXX 66 static void * SAL_CALL
operator new (
size_t nSize )
68 static void SAL_CALL
operator delete (
void * pMem )
70 static void * SAL_CALL
operator new ( size_t,
void * pMem )
72 static void SAL_CALL
operator delete (
void *,
void * )
97 #if defined LIBO_INTERNAL_ONLY 99 { other._pEnv =
nullptr; }
120 #if defined LIBO_INTERNAL_ONLY 122 if (_pEnv !=
nullptr) {
123 (*_pEnv->release)(_pEnv);
126 other._pEnv =
nullptr;
143 {
return _pEnv->pTypeName; }
150 {
return _pEnv->pContext; }
156 bool SAL_CALL
is()
const 157 {
return (_pEnv != NULL); }
161 inline void SAL_CALL
clear();
183 inline void SAL_CALL
enter()
const;
197 (*_pEnv->acquire)( _pEnv );
207 : _pEnv( rEnv._pEnv )
210 (*_pEnv->acquire)( _pEnv );
216 (*_pEnv->release)( _pEnv );
223 (*_pEnv->release)( _pEnv );
233 (*pEnv->acquire)( pEnv );
235 (*_pEnv->release)( _pEnv );
253 va_start(param, pCallee);
CPPU_DLLPUBLIC void uno_Environment_enter(uno_Environment *pEnv) SAL_THROW_EXTERN_C()
Enter an environment explicitly.
void uno_EnvCallee(va_list *pParam)
Typedef for variable argument function.
Definition: environment.h:342
void * getContext() const
Gets free context pointer of set environment.
Definition: environment.hxx:149
Environment & operator=(uno_Environment *pEnv)
Sets a given environment, i.e.
Definition: environment.hxx:228
void enter() const
Enter this environment explicitly.
Definition: environment.hxx:260
CPPU_DLLPUBLIC void uno_getEnvironment(uno_Environment **ppEnv, rtl_uString *pEnvDcp, void *pContext) SAL_THROW_EXTERN_C()
Gets a specific environment.
void invoke(uno_EnvCallee *pCallee,...) const
Invoke the passed function in this environment.
Definition: environment.hxx:247
C++ wrapper for binary C uno_Environment.
Definition: environment.hxx:49
CPPU_DLLPUBLIC int uno_Environment_isValid(uno_Environment *pEnv, rtl_uString **pReason) SAL_THROW_EXTERN_C()
Check if a particular environment is currently valid, so that objects of that environment might be ca...
struct SAL_DLLPUBLIC_RTTI _uno_Environment uno_Environment
The binary specification of a UNO environment.
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
static Environment getCurrent(rtl::OUString const &typeName=rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME))
Returns the current Environment.
Definition: environment.hxx:270
bool is() const
Tests if an environment is set.
Definition: environment.hxx:156
Environment(uno_Environment *pEnv=NULL)
Constructor: acquires given environment.
Definition: environment.hxx:193
CPPU_DLLPUBLIC void uno_getCurrentEnvironment(uno_Environment **ppEnv, rtl_uString *pTypeName) SAL_THROW_EXTERN_C()
Returns the current Environment.
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:170
void clear()
Releases a set environment.
Definition: environment.hxx:219
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
int isValid(rtl::OUString *pReason) const
Checks, if it is valid to currently call objects belonging to this environment.
Definition: environment.hxx:265
void invoke_v(uno_EnvCallee *pCallee, va_list *pParam) const
Invoke the passed function in this environment.
Definition: environment.hxx:241
CPPU_DLLPUBLIC void uno_Environment_invoke_v(uno_Environment *pEnv, uno_EnvCallee *pCallee, va_list *pParam) SAL_THROW_EXTERN_C()
Invoke the passed function in the given environment.
~Environment()
Destructor: releases a set environment.
Definition: environment.hxx:213
::rtl::OUString getTypeName() const
Gets type name of set environment.
Definition: environment.hxx:142