LibreOffice: com::sun::star::uno::Environment Class Reference

LibreOffice LibreOffice 5.2 SDK C/C++ API Reference

Public Member Functions | Static Public Member Functions | List of all members
com::sun::star::uno::Environment Class Reference

C++ wrapper for binary C uno_Environment. More...

`#include <environment.hxx>`

## Public Member Functions
| Environment (uno_Environment *pEnv=NULL)
| Constructor: acquires given environment. More...
| Environment (rtl::OUString const &envDcp, void *pContext=NULL)
| Gets a specific environment. More...
| Environment (const Environment &rEnv)
| Copy constructor: acquires given environment. More...
| ~Environment ()
| Destructor: releases a set environment. More...
Environment & | operator= (uno_Environment *pEnv)
| Sets a given environment, i.e. More...
Environment & | operator= (const Environment &rEnv)
| Sets a given environment, i.e. More...
uno_Environment * | get () const
| Provides UNacquired pointer to the set C environment. More...
inline ::rtl::OUString | getTypeName () const
| Gets type name of set environment. More...
void * | getContext () const
| Gets free context pointer of set environment. More...
bool | is () const
| Tests if a environment is set. More...
void | clear ()
| Releases a set environment. More...
void | invoke_v (uno_EnvCallee *pCallee, va_list *pParam) const
| Invoke the passed function in this environment. More...
void | invoke (uno_EnvCallee *pCallee,...) const
| Invoke the passed function in this environment. More...
void | enter () const
| Enter this environment explicitly. More...
int | isValid (rtl::OUString *pReason) const
| Checks, if it is valid to currently call objects belonging to this environment. More...

## Static Public Member Functions
static Environment | getCurrent (rtl::OUString const &typeName=rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME))
| Returns the current Environment. More...

## Detailed Description

C++ wrapper for binary C uno_Environment.

See also
  uno_Environment

## Constructor & Destructor Documentation

## ◆ Environment() [1/3]

com::sun::star::uno::Environment::Environment | ( | uno_Environment * | pEnv = `NULL` | ) |
| inline

Constructor: acquires given environment.

Parameters

  pEnv | environment

## ◆ Environment() [2/3]

com::sun::star::uno::Environment::Environment | ( | rtl::OUString const & | envDcp,
|  | void * | pContext = `NULL`
| ) |  |
| inlineexplicit

Gets a specific environment.

If the specified environment does not exist, then a default one is created and registered.

Parameters

  envDcp | descriptor of the environment
  pContext | context pointer

## ◆ Environment() [3/3]

com::sun::star::uno::Environment::Environment | ( | const Environment & | rEnv | ) |
| inline

Copy constructor: acquires given environment.

Parameters

  rEnv | another environment

## ◆ ~Environment()

com::sun::star::uno::Environment::~Environment | ( |  | ) |
| inline

Destructor: releases a set environment.

## Member Function Documentation

## ◆ clear()

void com::sun::star::uno::Environment::clear | ( |  | ) |
| inline

Releases a set environment.

## ◆ enter()

void com::sun::star::uno::Environment::enter | ( |  | ) | const
| inline

Enter this environment explicitly.

Since
  UDK 3.2.7

## ◆ get()

uno_Environment* com::sun::star::uno::Environment::get | ( |  | ) | const
| inline

Provides UNacquired pointer to the set C environment.

Returns
  UNacquired pointer to the C environment struct

## ◆ getContext()

void* com::sun::star::uno::Environment::getContext | ( |  | ) | const
| inline

Gets free context pointer of set environment.

Returns
  free context pointer of set environment

## ◆ getCurrent()

Environment com::sun::star::uno::Environment::getCurrent | ( | rtl::OUString const & | typeName = `rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME)` | ) |
| inlinestatic

Returns the current Environment.

Parameters

  typeName | the optional type of the Environment, falls back to "uno" in case being empty, respectively to current C++ Environment.

Since
  UDK 3.2.7

## ◆ getTypeName()

inline ::rtl::OUString com::sun::star::uno::Environment::getTypeName | ( |  | ) | const
| inline

Gets type name of set environment.

Returns
  type name of set environment

## ◆ invoke()

void com::sun::star::uno::Environment::invoke | ( | uno_EnvCallee * | pCallee,
|  |  | ...
| ) |  | const
| inline

Invoke the passed function in this environment.

Parameters

  pCallee | the function to call
  ... | the parameters to be passed to the function

Since
  UDK 3.2.7

## ◆ invoke_v()

void com::sun::star::uno::Environment::invoke_v | ( | uno_EnvCallee * | pCallee,
|  | va_list * | pParam
| ) |  | const
| inline

Invoke the passed function in this environment.

Parameters

  pCallee | the function to call
  pParam | the parameter pointer to be passed to the function

Since
  UDK 3.2.7

## ◆ is()

bool com::sun::star::uno::Environment::is | ( |  | ) | const
| inline

Tests if a environment is set.

Returns
  true, if a environment is set, false otherwise

## ◆ isValid()

int com::sun::star::uno::Environment::isValid | ( | rtl::OUString * | pReason | ) | const
| inline

Checks, if it is valid to currently call objects belonging to this environment.

Since
  UDK 3.2.7

## ◆ operator=() [1/2]

Environment & com::sun::star::uno::Environment::operator= | ( | uno_Environment * | pEnv | ) |
| inline

Sets a given environment, i.e.

acquires given one and releases a set one.

Parameters

  pEnv | another environment

Returns
  this environment

## ◆ operator=() [2/2]

Environment& com::sun::star::uno::Environment::operator= | ( | const Environment & | rEnv | ) |
| inline

Sets a given environment, i.e.

acquires given one and releases a set one.

Parameters

  rEnv | another environment

Returns
  this environment

The documentation for this class was generated from the following file:

- uno/environment.hxx