Rcpp Version 1.0.14
Loading...
Searching...
No Matches
Armor.h
Go to the documentation of this file.
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_protection_Armor_H
19#define Rcpp_protection_Armor_H
20
21namespace Rcpp {
22
23 template <typename T>
24 class Armor {
25 public:
26
27 Armor() : data(){
29 }
30
31 template <typename U> Armor( U x );
32
33 inline operator SEXP() const {
34 return data ;
35 }
36
37 template <typename U>
38 inline Armor& operator=( const U& x ) ;
39
41 UNPROTECT(1) ;
42 }
43
44 private:
45 void init(SEXP x){
47 }
48
51
52 // not defined on purpose
53 Armor(const Armor&) ;
55 } ;
56}
57
58#endif
PROTECT_INDEX index
Definition Armor.h:50
void init(SEXP x)
Definition Armor.h:45
Armor(const Armor &)
Armor & operator=(const U &x)
Armor & operator=(const Armor &)
SEXP data
Definition Armor.h:49
Rcpp API.
Definition algo.h:28
T as(SEXP x)
Definition as.h:151