Rcpp Version 1.0.14
Loading...
Searching...
No Matches
RObjectMethods.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_proxy_RObjectMethods_h
19
#define Rcpp_proxy_RObjectMethods_h
20
21
namespace
Rcpp
{
22
23
template
<
typename
Class>
24
class
RObjectMethods
{
25
public
:
26
27
inline
bool
isNULL
()
const
{
28
return
Rf_isNull
(
static_cast<
const
Class
&
>
(*
this
) ) ;
29
}
30
31
inline
int
sexp_type
()
const
{
32
return
TYPEOF
(
static_cast<
const
Class
&
>
(*
this
) ) ;
33
}
34
35
inline
bool
isObject
()
const
{
36
return
Rf_isObject
(
static_cast<
const
Class
&
>
(*
this
) ) ;
37
}
38
39
inline
bool
isS4
()
const
{
40
return
Rf_isS4
(
static_cast<
const
Class
&
>
(*
this
) ) ;
41
}
42
43
} ;
44
45
}
46
47
#endif
Rcpp::RObjectMethods
Definition
RObjectMethods.h:24
Rcpp::RObjectMethods::isS4
bool isS4() const
Definition
RObjectMethods.h:39
Rcpp::RObjectMethods::sexp_type
int sexp_type() const
Definition
RObjectMethods.h:31
Rcpp::RObjectMethods::isObject
bool isObject() const
Definition
RObjectMethods.h:35
Rcpp::RObjectMethods::isNULL
bool isNULL() const
Definition
RObjectMethods.h:27
Rcpp
Rcpp API.
Definition
algo.h:28
Rcpp::as
T as(SEXP x)
Definition
as.h:151
inst
include
Rcpp
proxy
RObjectMethods.h
Generated on Sun Jan 12 2025 11:21:42 for Rcpp Version 1.0.14 by
1.9.8