19 #ifndef INCLUDED_UNO_ENVIRONMENT_HXX 20 #define INCLUDED_UNO_ENVIRONMENT_HXX 66 inline static void * SAL_CALL
operator new (
size_t nSize )
68 inline static void SAL_CALL
operator delete (
void * pMem )
70 inline static void * SAL_CALL
operator new ( size_t,
void * pMem )
72 inline static void SAL_CALL
operator delete (
void *,
void * )
127 {
return _pEnv->pTypeName; }
134 {
return _pEnv->pContext; }
140 inline bool SAL_CALL
is()
const 141 {
return (_pEnv != NULL); }
145 inline void SAL_CALL
clear();
167 inline void SAL_CALL
enter()
const;
181 (*_pEnv->acquire)( _pEnv );
191 : _pEnv( rEnv._pEnv )
194 (*_pEnv->acquire)( _pEnv );
200 (*_pEnv->release)( _pEnv );
207 (*_pEnv->release)( _pEnv );
217 (*pEnv->acquire)( pEnv );
219 (*_pEnv->release)( _pEnv );
237 va_start(param, pCallee);
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.
void invoke(uno_EnvCallee *pCallee,...) const
Invoke the passed function in this environment.
Definition: environment.hxx:231
Environment(uno_Environment *pEnv=NULL)
Constructor: acquires given environment.
Definition: environment.hxx:177
void * getContext() const
Gets free context pointer of set environment.
Definition: environment.hxx:133
Environment & operator=(uno_Environment *pEnv)
Sets a given environment, i.e.
Definition: environment.hxx:212
CPPU_DLLPUBLIC void uno_getEnvironment(uno_Environment **ppEnv, rtl_uString *pEnvDcp, void *pContext) SAL_THROW_EXTERN_C()
Gets a specific environment.
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
int isValid(rtl::OUString *pReason) const
Checks, if it is valid to currently call objects belonging to this environment.
Definition: environment.hxx:249
bool is() const
Tests if a environment is set.
Definition: environment.hxx:140
static Environment getCurrent(rtl::OUString const &typeName=rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME))
Returns the current Environment.
Definition: environment.hxx:254
CPPU_DLLPUBLIC void uno_getCurrentEnvironment(uno_Environment **ppEnv, rtl_uString *pTypeName) SAL_THROW_EXTERN_C()
Returns the current Environment.
~Environment()
Destructor: releases a set environment.
Definition: environment.hxx:197
struct SAL_DLLPUBLIC_RTTI _uno_Environment uno_Environment
The binary specification of an UNO environment.
void invoke_v(uno_EnvCallee *pCallee, va_list *pParam) const
Invoke the passed function in this environment.
Definition: environment.hxx:225
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:106
void enter() const
Enter this environment explicitly.
Definition: environment.hxx:244
inline ::rtl::OUString getTypeName() const
Gets type name of set environment.
Definition: environment.hxx:126
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
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...
CPPU_DLLPUBLIC void uno_Environment_enter(uno_Environment *pEnv) SAL_THROW_EXTERN_C()
Enter an environment explicitly.
void clear()
Releases a set environment.
Definition: environment.hxx:203
C++ wrapper for binary C uno_Environment.
Definition: environment.hxx:49
void uno_EnvCallee(va_list *pParam)
Typedef for variable argument function.
Definition: environment.h:338