-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathproxy.h
More file actions
90 lines (79 loc) · 3.05 KB
/
proxy.h
File metadata and controls
90 lines (79 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef Rcpp__vector__proxy_h
#define Rcpp__vector__proxy_h
namespace Rcpp{
namespace traits {
template <int RTYPE>
struct r_vector_name_proxy{
typedef typename ::Rcpp::internal::simple_name_proxy<RTYPE> type ;
} ;
template<> struct r_vector_name_proxy<STRSXP>{
typedef ::Rcpp::internal::string_name_proxy<STRSXP> type ;
} ;
template<> struct r_vector_name_proxy<VECSXP>{
typedef ::Rcpp::internal::generic_name_proxy<VECSXP> type ;
} ;
template<> struct r_vector_name_proxy<EXPRSXP>{
typedef ::Rcpp::internal::generic_name_proxy<EXPRSXP> type ;
} ;
template <int RTYPE>
struct r_vector_const_name_proxy{
typedef ::Rcpp::internal::simple_const_name_proxy<RTYPE> type ;
} ;
template<> struct r_vector_const_name_proxy<STRSXP>{
typedef ::Rcpp::internal::string_const_name_proxy<STRSXP> type ;
} ;
template<> struct r_vector_const_name_proxy<VECSXP>{
typedef ::Rcpp::internal::generic_const_name_proxy<VECSXP> type ;
} ;
template<> struct r_vector_const_name_proxy<EXPRSXP>{
typedef ::Rcpp::internal::generic_const_name_proxy<EXPRSXP> type ;
} ;
template <int RTYPE>
struct r_vector_proxy{
typedef typename storage_type<RTYPE>::type& type ;
} ;
template<> struct r_vector_proxy<STRSXP> {
typedef ::Rcpp::internal::string_proxy<STRSXP> type ;
} ;
template<> struct r_vector_proxy<EXPRSXP> {
typedef ::Rcpp::internal::generic_proxy<EXPRSXP> type ;
} ;
template<> struct r_vector_proxy<VECSXP> {
typedef ::Rcpp::internal::generic_proxy<VECSXP> type ;
} ;
template <int RTYPE>
struct r_vector_const_proxy{
typedef const typename storage_type<RTYPE>::type& type ;
} ;
template<> struct r_vector_const_proxy<STRSXP> {
typedef ::Rcpp::internal::const_string_proxy<STRSXP> type ;
} ;
template<> struct r_vector_const_proxy<EXPRSXP> {
typedef ::Rcpp::internal::const_generic_proxy<EXPRSXP> type ;
} ;
template<> struct r_vector_const_proxy<VECSXP> {
typedef ::Rcpp::internal::const_generic_proxy<VECSXP> type ;
} ;
template <int RTYPE>
struct r_vector_iterator {
typedef typename storage_type<RTYPE>::type* type ;
};
template <int RTYPE> struct proxy_based_iterator{
typedef ::Rcpp::internal::Proxy_Iterator< typename r_vector_proxy<RTYPE>::type > type ;
} ;
template<> struct r_vector_iterator<VECSXP> : proxy_based_iterator<VECSXP>{} ;
template<> struct r_vector_iterator<EXPRSXP> : proxy_based_iterator<EXPRSXP>{} ;
template<> struct r_vector_iterator<STRSXP> : proxy_based_iterator<STRSXP>{} ;
template <int RTYPE>
struct r_vector_const_iterator {
using type = const typename storage_type<RTYPE>::type* ;
};
template <int RTYPE> struct const_proxy_based_iterator{
using type = ::Rcpp::internal::const_Proxy_Iterator< typename r_vector_const_proxy<RTYPE>::type > ;
} ;
template<> struct r_vector_const_iterator<VECSXP> : const_proxy_based_iterator<VECSXP>{} ;
template<> struct r_vector_const_iterator<EXPRSXP> : const_proxy_based_iterator<EXPRSXP>{} ;
template<> struct r_vector_const_iterator<STRSXP> : const_proxy_based_iterator<STRSXP>{} ;
} // traits
}
#endif