Skip to content

Commit e7fd179

Browse files
added StretchyList
1 parent 596d92b commit e7fd179

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

inst/include/Rcpp.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Rcpp.h: R/C++ interface class library
44
//
55
// Copyright (C) 2008 - 2009 Dirk Eddelbuettel
6-
// Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
6+
// Copyright (C) 2009 - 2013 Dirk Eddelbuettel and Romain Francois
77
//
88
// This file is part of Rcpp.
99
//
@@ -48,6 +48,8 @@
4848
#include <Rcpp/Language.h>
4949
#include <Rcpp/DottedPair.h>
5050
#include <Rcpp/Pairlist.h>
51+
#include <Rcpp/StrechyList.h>
52+
5153
#include <Rcpp/WeakReference.h>
5254
#include <Rcpp/StringTransformer.h>
5355
#include <Rcpp/Formula.h>

inst/include/Rcpp/StretchyList.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
23+
namespace Rcpp{
24+
25+
RCPP_API_CLASS(StretchyList_Impl),
26+
public DottedPairProxyPolicy<StretchyList_Impl<StoragePolicy> >,
27+
public DottedPairImpl<StretchyList_Impl<StoragePolicy> >{
28+
public:
29+
30+
RCPP_GENERATE_CTOR_ASSIGN(StretchyList_Impl)
31+
32+
typedef typename DottedPairProxyPolicy<StretchyList_Impl>::DottedPairProxy Proxy ;
33+
typedef typename DottedPairProxyPolicy<StretchyList_Impl>::const_DottedPairProxy const_Proxy ;
34+
35+
StretchyList_Impl(){}
36+
StretchyList_Impl(SEXP x){
37+
Storage::set__(r_cast<LISTSXP>(x)) ;
38+
}
39+
40+
void update(SEXP x){}
41+
42+
} ;
43+
44+
typedef StretchyList_Impl<PreserveStorage> StretchyList ;
45+
}
46+
#endif

0 commit comments

Comments
 (0)