Rcpp Version 1.0.14
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
b
c
d
f
g
k
m
n
r
t
y
Typedefs
c
d
e
f
g
i
l
n
p
r
s
t
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Enumerator
r
v
Related Symbols
o
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
x
y
Functions
a
c
d
e
f
g
i
l
m
o
p
r
s
Variables
Typedefs
Macros
_
a
b
c
d
e
g
h
i
j
l
m
n
o
r
s
t
u
v
y
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Loading...
Searching...
No Matches
Shelter.h
Go to the documentation of this file.
1
// Copyright (C) 2013 Romain Francois
2
//
3
// This file is part of Rcpp.
4
//
5
// Rcpp is free software: you can redistribute it and/or modify it
6
// under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 2 of the License, or
8
// (at your option) any later version.
9
//
10
// Rcpp is distributed in the hope that it will be useful, but
11
// WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
17
18
#ifndef Rcpp_protection_Shelter_H
19
#define Rcpp_protection_Shelter_H
20
21
namespace
Rcpp
{
22
23
template
<
class
T>
24
class
Shelter
{
25
public
:
26
Shelter
() :
nprotected
(0) {}
27
28
inline
SEXP
operator()
(
SEXP
x) {
29
if
(x !=
R_NilValue
)
nprotected
++;
30
return
Rcpp_protect
(x);
31
}
28
inline
SEXP
operator()
(
SEXP
x) {
…
}
32
33
~Shelter
(){
34
Rcpp_unprotect
(
nprotected
);
35
nprotected
= 0;
36
}
33
~Shelter
() {
…
}
37
38
private
:
39
int
nprotected
;
40
41
// not defined on purpose
42
Shelter
(
const
Shelter
&) ;
43
Shelter
&
operator=
(
const
Shelter
&) ;
44
};
24
class
Shelter
{
…
};
45
}
46
47
#endif
Rcpp::Shelter
Definition
Shelter.h:24
Rcpp::Shelter::~Shelter
~Shelter()
Definition
Shelter.h:33
Rcpp::Shelter::nprotected
int nprotected
Definition
Shelter.h:39
Rcpp::Shelter::operator()
SEXP operator()(SEXP x)
Definition
Shelter.h:28
Rcpp::Shelter::Shelter
Shelter(const Shelter &)
Rcpp::Shelter::Shelter
Shelter()
Definition
Shelter.h:26
Rcpp::Shelter::operator=
Shelter & operator=(const Shelter &)
Rcpp
Rcpp API.
Definition
algo.h:28
Rcpp::Rcpp_protect
SEXP Rcpp_protect(SEXP x)
Definition
Shield.h:23
Rcpp::Rcpp_unprotect
void Rcpp_unprotect(int i)
Definition
Shield.h:28
Rcpp::as
T as(SEXP x)
Definition
as.h:151
inst
include
Rcpp
protection
Shelter.h
Generated on Sun Jan 12 2025 11:21:42 for Rcpp Version 1.0.14 by
1.9.8