LibreOffice Module connectivity (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
connectivity::jdbc::LocalRef< T > Class Template Referencefinal

helper class to hold a local ref to a JNI object More...

#include <LocalRef.hxx>

Inheritance diagram for connectivity::jdbc::LocalRef< T >:
[legend]

Public Member Functions

 LocalRef (JNIEnv &environment)
 
 LocalRef (JNIEnv &environment, T object)
 
 ~LocalRef ()
 
release ()
 
void set (T object)
 
void reset ()
 
JNIEnv & env () const
 
get () const
 
bool is () const
 

Private Member Functions

 LocalRef (LocalRef const &)=delete
 
LocalRefoperator= (LocalRef const &)=delete
 

Private Attributes

JNIEnv & m_environment
 
m_object
 

Detailed Description

template<typename T>
class connectivity::jdbc::LocalRef< T >

helper class to hold a local ref to a JNI object

Note that this class never actually calls NewLocalRef. It is assumed that all objects passed are already acquired with a local ref (as it usually is the case if you obtain the object from a JNI method).

Definition at line 41 of file LocalRef.hxx.

Constructor & Destructor Documentation

◆ LocalRef() [1/3]

template<typename T >
connectivity::jdbc::LocalRef< T >::LocalRef ( JNIEnv &  environment)
inlineexplicit

Definition at line 44 of file LocalRef.hxx.

◆ LocalRef() [2/3]

template<typename T >
connectivity::jdbc::LocalRef< T >::LocalRef ( JNIEnv &  environment,
object 
)
inline

Definition at line 50 of file LocalRef.hxx.

◆ ~LocalRef()

template<typename T >
connectivity::jdbc::LocalRef< T >::~LocalRef ( )
inline

Definition at line 56 of file LocalRef.hxx.

References connectivity::jdbc::LocalRef< T >::reset().

◆ LocalRef() [3/3]

template<typename T >
connectivity::jdbc::LocalRef< T >::LocalRef ( LocalRef< T > const &  )
privatedelete

Member Function Documentation

◆ env()

template<typename T >
JNIEnv & connectivity::jdbc::LocalRef< T >::env ( ) const
inline

◆ get()

template<typename T >
T connectivity::jdbc::LocalRef< T >::get ( ) const
inline

◆ is()

template<typename T >
bool connectivity::jdbc::LocalRef< T >::is ( ) const
inline

◆ operator=()

template<typename T >
LocalRef & connectivity::jdbc::LocalRef< T >::operator= ( LocalRef< T > const &  )
privatedelete

◆ release()

template<typename T >
T connectivity::jdbc::LocalRef< T >::release ( )
inline

◆ reset()

template<typename T >
void connectivity::jdbc::LocalRef< T >::reset ( )
inline

◆ set()

template<typename T >
void connectivity::jdbc::LocalRef< T >::set ( object)
inline

Member Data Documentation

◆ m_environment

template<typename T >
JNIEnv& connectivity::jdbc::LocalRef< T >::m_environment
private

◆ m_object

template<typename T >
T connectivity::jdbc::LocalRef< T >::m_object
private

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