Rcpp Version 1.0.14
Loading...
Searching...
No Matches
StretchyList.h
Go to the documentation of this file.
1// StretchyList.h: Rcpp R/C++ interface class library -- stretchy lists
2//
3// Copyright (C) 2013 Romain Francois
4//
5// This file is part of Rcpp.
6//
7// Rcpp is free software: you can redistribute it and/or modify it
8// under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 2 of the License, or
10// (at your option) any later version.
11//
12// Rcpp is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
19
20#ifndef Rcpp_StretchyList_h
21#define Rcpp_StretchyList_h
22
23namespace Rcpp{
24
35 public:
36
38
41
44 SETCAR(s, s);
45 Storage::set__(s) ;
46 }
48 Storage::set__(r_cast<LISTSXP>(x)) ;
49 }
50
51 void update(SEXP x){}
52
53 inline operator SEXP() const{
54 return CDR(Storage::get__() );
55 }
56
57 template <typename T>
58 inline StretchyList_Impl& push_back(const T& obj ){
59 return push_back__impl( obj, typename traits::is_named<T>::type() ) ;
60 }
61
62 template <typename T>
63 inline StretchyList_Impl& push_front(const T& obj ){
64 return push_front__impl( obj, typename traits::is_named<T>::type() ) ;
65 }
66
67 private:
68
69 template <typename T>
71
72 template <typename T>
74
75 template <typename T>
77
78 template <typename T>
80
81 } ;
82
84}
85#endif
#define RCPP_GENERATE_CTOR_ASSIGN(__CLASS__)
Definition interface.h:21
#define RCPP_API_CLASS(__CLASS__)
Definition interface.h:49
Rcpp API.
Definition algo.h:28
StretchyList_Impl & push_front__impl(const T &obj, traits::true_type)
StretchyList_Impl & push_back(const T &obj)
void update(SEXP)
DottedPairProxyPolicy< Language_Impl >::const_DottedPairProxy const_Proxy
Definition Language.h:38
StretchyList_Impl< PreserveStorage > StretchyList
StretchyList_Impl()
T as(SEXP x)
Definition as.h:151
StretchyList_Impl & push_back__impl(const T &obj, traits::true_type)
StretchyList_Impl & push_front(const T &obj)