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
xp.h
Go to the documentation of this file.
1
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
2
//
3
// xp.h: Rcpp R/C++ interface class library -- pre processor help
4
//
5
// Copyright (C) 2012 - 2015 Dirk Eddelbuettel and Romain Francois
6
//
7
// This file is part of Rcpp.
8
//
9
// Rcpp is free software: you can redistribute it and/or modify it
10
// under the terms of the GNU General Public License as published by
11
// the Free Software Foundation, either version 2 of the License, or
12
// (at your option) any later version.
13
//
14
// Rcpp is distributed in the hope that it will be useful, but
15
// WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
// GNU General Public License for more details.
18
//
19
// You should have received a copy of the GNU General Public License
20
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
21
22
#ifndef Rcpp__macros_xp_h
23
#define Rcpp__macros_xp_h
24
25
#define RCPP_XP_FIELD_GET(__NAME__,__CLASS__,__FIELD__) \
26
extern "C" SEXP RCPP_PP_CAT(__NAME__,__rcpp_info__)(){ \
27
using Rcpp::_ ; \
28
Rcpp::List info = Rcpp::List::create( \
29
_["class"] = #__CLASS__ , \
30
_["field"] = #__FIELD__ \
31
) ; \
32
info.attr( "class" ) = "rcppxpfieldgetinfo" ; \
33
return info ; \
34
} \
35
extern "C" SEXP __NAME__( SEXP xp ){ \
36
BEGIN_RCPP \
37
SEXP res = R_NilValue ; \
38
::Rcpp::XPtr< __CLASS__ > ptr(xp) ; \
39
res = ::Rcpp::wrap( ptr->__FIELD__ ) ; \
40
return res ; \
41
END_RCPP \
42
}
25
#define RCPP_XP_FIELD_GET(__NAME__,__CLASS__,__FIELD__) \
…
43
44
#define RCPP_XP_FIELD_SET(__NAME__,__CLASS__,__FIELD__) \
45
extern "C" SEXP RCPP_PP_CAT(__NAME__,__rcpp_info__)(){ \
46
using Rcpp::_ ; \
47
Rcpp::List info = Rcpp::List::create( \
48
_["class"] = #__CLASS__ , \
49
_["field"] = #__FIELD__ \
50
) ; \
51
info.attr( "class" ) = "rcppxpfieldsetinfo" ; \
52
return info ; \
53
} \
54
extern "C" SEXP __NAME__( SEXP xp, SEXP value ){ \
55
BEGIN_RCPP \
56
::Rcpp::XPtr< __CLASS__ > ptr(xp) ; \
57
ptr->__FIELD__ = ::Rcpp::internal::converter(value) ; \
58
END_RCPP \
59
}
44
#define RCPP_XP_FIELD_SET(__NAME__,__CLASS__,__FIELD__) \
…
60
61
#define RCPP_XP_FIELD(__PREFIX__,__CLASS__,__FIELD__) \
62
RCPP_XP_FIELD_GET( RCPP_PP_CAT(__PREFIX__,_get), __CLASS__, __FIELD__ ) \
63
RCPP_XP_FIELD_SET( RCPP_PP_CAT(__PREFIX__,_set), __CLASS__, __FIELD__ )
61
#define RCPP_XP_FIELD(__PREFIX__,__CLASS__,__FIELD__) \
…
64
65
#endif
inst
include
Rcpp
macros
xp.h
Generated on Sun Jan 12 2025 11:21:42 for Rcpp Version 1.0.14 by
1.9.8