MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
Java::GlobalRef< T > Class Template Reference

Hold a global reference on a JNI object. More...

`#include <Ref.hxx>`

## Public Member Functions
| GlobalRef ()=default
| Constructs an uninitialized object. More...
| GlobalRef (JNIEnv *env, T _value)
| ~GlobalRef ()
| GlobalRef (const GlobalRef &other)=delete
GlobalRef & | operator= (const GlobalRef &other)=delete
void | Set (JNIEnv *env, T _value)
| Sets the object, ignoring the previous value. More...
T | Get () const
| operator T () const

## Detailed Description

### template<typename T>
class Java::GlobalRef< T >

Hold a global reference on a JNI object.

Definition at line 77 of file Ref.hxx.

## Constructor & Destructor Documentation

template<typename T>

Java::GlobalRef< T >::GlobalRef | ( |  | ) |
| default

Constructs an uninitialized object.

The method set() must be called before it is destructed.

template<typename T>

Java::GlobalRef< T >::GlobalRef | ( | JNIEnv * | env,
|  | T | _value
| ) |  |
| inline

Definition at line 87 of file Ref.hxx.

template<typename T>

Java::GlobalRef< T >::~GlobalRef | ( |  | ) |
| inline

Definition at line 94 of file Ref.hxx.

template<typename T>

Java::GlobalRef< T >::GlobalRef | ( | const GlobalRef< T > & | other | ) |
| delete

## Member Function Documentation

template<typename T>

T Java::GlobalRef< T >::Get | ( |  | ) | const
| inline

Definition at line 111 of file Ref.hxx.

template<typename T>

Java::GlobalRef< T >::operator T | ( |  | ) | const
| inline

Definition at line 115 of file Ref.hxx.

template<typename T>

GlobalRef& Java::GlobalRef< T >::operator= | ( | const GlobalRef< T > & | other | ) |
| delete

template<typename T>

void Java::GlobalRef< T >::Set | ( | JNIEnv * | env,
|  | T | _value
| ) |  |
| inline

Sets the object, ignoring the previous value.

This is only allowed once after the default constructor was used.

Definition at line 105 of file Ref.hxx.

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

- java/Ref.hxx