template<typename T, template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
class Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >
Definition at line 61 of file XPtr.h.
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::XPtr |
( |
SEXP |
x | ) |
|
|
inlineexplicit |
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::XPtr |
( |
SEXP |
x, |
|
|
SEXP |
tag, |
|
|
SEXP |
prot |
|
) |
| |
|
inlineexplicit |
constructs a XPtr wrapping the external pointer (EXTPTRSXP SEXP)
- Parameters
-
xp | external pointer to wrap |
tag | tag to assign to external pointer |
prot | protected data to assign to external pointer |
Definition at line 87 of file XPtr.h.
References Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::checked_set(), Rcpp::ProtectedProxyPolicy< XPtr< T, PreserveStorage, standard_delete_finalizer< T >, false > >::prot(), and Rcpp::TagProxyPolicy< XPtr< T, PreserveStorage, standard_delete_finalizer< T >, false > >::tag().
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::XPtr |
( |
T * |
p, |
|
|
bool |
set_delete_finalizer = true , |
|
|
SEXP |
tag = R_NilValue , |
|
|
SEXP |
prot = R_NilValue |
|
) |
| |
|
inlineexplicit |
creates a new external pointer wrapping the dumb pointer p.
- Parameters
-
p | dumb pointer to some object |
set_delete_finalizer | if set to true, a finalizer will be registered for the external pointer. The finalizer is called when the xp is garbage collected. The finalizer is merely a call to the delete operator or the pointer so you need to make sure the pointer can be "delete" d this way (has to be a C++ object) |
Definition at line 104 of file XPtr.h.
References Rcpp::ProtectedProxyPolicy< XPtr< T, PreserveStorage, standard_delete_finalizer< T >, false > >::prot(), RCPP_DEBUG_2, Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::setDeleteFinalizer(), and Rcpp::TagProxyPolicy< XPtr< T, PreserveStorage, standard_delete_finalizer< T >, false > >::tag().
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
T* Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::checked_get |
( |
| ) |
const |
|
inline |
Access underlying pointer throwing an exception if the ptr is NULL
Definition at line 146 of file XPtr.h.
References Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::get().
Referenced by Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::operator T*(), Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::operator*(), and Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::operator->().
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
T* Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::get |
( |
| ) |
const |
|
inline |
Typesafe accessor for underlying pointer (use checked_get if you want an exception thrown if the pointer is NULL)
Definition at line 126 of file XPtr.h.
Referenced by Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::checked_get(), Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::operator unspecified_bool_type(), Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::operator!(), and Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::release().
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
T& Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::operator* |
( |
| ) |
const |
|
inline |
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
T* Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::operator-> |
( |
| ) |
const |
|
inline |
template<typename T , template< class > class StoragePolicy = PreserveStorage, void Finalizer = standard_delete_finalizer<T>, bool finalizeOnExit = false>
void Rcpp::XPtr< T, StoragePolicy, Finalizer, finalizeOnExit >::release |
( |
| ) |
|
|
inline |