Skip to content

Commit 03ed49b

Browse files
added missing implementations in DottedPairProxy
1 parent 4b20e57 commit 03ed49b

File tree

4 files changed

+57
-31
lines changed

4 files changed

+57
-31
lines changed

inst/include/Rcpp/api/meat/DottedPair.h

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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_api_meat_DottedPairProxy_h
19+
#define Rcpp_api_meat_DottedPairProxy_h
20+
21+
namespace Rcpp{
22+
23+
template <typename CLASS>
24+
template <typename T>
25+
DottedPairProxyPolicy<CLASS>::DottedPairProxy& DottedPairProxyPolicy<CLASS>::DottedPairProxy::operator=( const T& rhs){
26+
return set( wrap(rhs) ) ;
27+
}
28+
29+
template <typename CLASS>
30+
template <typename T>
31+
DottedPairProxyPolicy<CLASS>::DottedPairProxy& DottedPairProxyPolicy<CLASS>::DottedPairProxy::operator=( const traits::named_object<T>& rhs){
32+
return set( wrap(rhs.object), rhs.name ) ;
33+
}
34+
35+
template <typename CLASS>
36+
template <typename T>
37+
DottedPairProxyPolicy<CLASS>::DottedPairProxy::operator T() const{
38+
return as<T>(get());
39+
}
40+
41+
template <typename CLASS>
42+
template <typename T>
43+
DottedPairProxyPolicy<CLASS>::const_DottedPairProxy::operator T() const{
44+
return as<T>(get());
45+
}
46+
47+
48+
}
49+
50+
#endif

inst/include/Rcpp/api/meat/meat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <Rcpp/api/meat/EnvironmentBinding.h>
2929
#include <Rcpp/api/meat/AttributeProxy.h>
3030
#include <Rcpp/api/meat/NamesProxy.h>
31+
#include <Rcpp/api/meat/DottedPairProxy.h>
3132
#include <Rcpp/api/meat/SlotProxy.h>
3233

3334
#include <Rcpp/api/meat/Date.h>

inst/include/Rcpp/proxy/DottedPairProxy.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ class DottedPairProxyPolicy {
5151
inline SEXP get() const {
5252
return CAR(node);
5353
}
54-
inline operator SEXP() const { return get() ; }
54+
inline operator SEXP() const {
55+
return get() ;
56+
}
5557
inline DottedPairProxy& set(SEXP x){
5658
SETCAR( node, x ) ;
5759
return *this ;
@@ -81,7 +83,9 @@ class DottedPairProxyPolicy {
8183
inline SEXP get() const {
8284
return CAR(node);
8385
}
84-
inline operator SEXP() const { return get() ; }
86+
inline operator SEXP() const {
87+
return get() ;
88+
}
8589

8690
private:
8791
SEXP node ;

0 commit comments

Comments
 (0)