19 #ifndef INCLUDED_UNO_ENVIRONMENT_HXX
20 #define INCLUDED_UNO_ENVIRONMENT_HXX
62 inline static void * SAL_CALL
operator new (
size_t nSize )
64 inline static void SAL_CALL
operator delete (
void * pMem )
66 inline static void * SAL_CALL
operator new ( size_t,
void * pMem )
68 inline static void SAL_CALL
operator delete (
void *,
void * )
123 {
return _pEnv->pTypeName; }
130 {
return _pEnv->pContext; }
136 inline bool SAL_CALL
is()
const
137 {
return (_pEnv != 0); }
141 inline void SAL_CALL
clear();
163 inline void SAL_CALL
enter()
const;
177 (*_pEnv->acquire)( _pEnv );
187 : _pEnv( rEnv._pEnv )
190 (*_pEnv->acquire)( _pEnv );
196 (*_pEnv->release)( _pEnv );
203 (*_pEnv->release)( _pEnv );
213 (*pEnv->acquire)( pEnv );
215 (*_pEnv->release)( _pEnv );
233 va_start(param, pCallee);
Environment(uno_Environment *pEnv=0)
Constructor: acquires given environment.
Definition: environment.hxx:173
static Environment getCurrent(rtl::OUString const &typeName=rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME))
Returns the current Environment.
Definition: environment.hxx:250
void invoke(uno_EnvCallee *pCallee,...) const
Invoke the passed function in this environment.
Definition: environment.hxx:227
bool is() const
Tests if a environment is set.
Definition: environment.hxx:136
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
void * getContext() const
Gets free context pointer of set environment.
Definition: environment.hxx:129
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 an UNO environment.
inline::rtl::OUString getTypeName() const
Gets type name of set environment.
Definition: environment.hxx:122
~Environment()
Destructor: releases a set environment.
Definition: environment.hxx:193
C++ wrapper for binary C uno_Environment.
Definition: environment.hxx:45
void enter() const
Enter this environment explicitly.
Definition: environment.hxx:240
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.
Environment & operator=(uno_Environment *pEnv)
Sets a given environment, i.e.
Definition: environment.hxx:208
int isValid(rtl::OUString *pReason) const
Checks, if it is valid to currently call objects belonging to this environment.
Definition: environment.hxx:245
void clear()
Releases a set environment.
Definition: environment.hxx:199
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_v(uno_EnvCallee *pCallee, va_list *pParam) const
Invoke the passed function in this environment.
Definition: environment.hxx:221
CPPU_DLLPUBLIC void uno_getCurrentEnvironment(uno_Environment **ppEnv, rtl_uString *pTypeName) SAL_THROW_EXTERN_C()
Returns the current Environment.
void uno_EnvCallee(va_list *pParam)
Typedef for variable argument function.
Definition: environment.h:338
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:115
CPPU_DLLPUBLIC void uno_Environment_enter(uno_Environment *pEnv) SAL_THROW_EXTERN_C()
Enter an environment explicitly.