Logo ROOT   6.14/05
Reference Guide
TRInternalFunction.h
Go to the documentation of this file.
1 // @(#)root/r:$Id$
2 // Author: Omar Zapata 07/06/2014
3 
4 
5 /*************************************************************************
6  * Copyright (C) 2013-2014, Omar Andres Zapata Mesa *
7  * All rights reserved. *
8  * *
9  * For the licensing terms see $ROOTSYS/LICENSE. *
10  * For the list of contributors see $ROOTSYS/README/CREDITS. *
11  *************************************************************************/
12 #ifndef ROOT_R_TRInternalFunction
13 #define ROOT_R_TRInternalFunction
14 
15 #include <RExports.h>
16 
17 #ifndef Rcpp_hpp
18 #include <Rcpp.h>
19 #endif
20 
21 //________________________________________________________________________________________________________
22 /**
23  This is a class to support deprecated method to pass function to R's Environment,
24  based in Rcpp::InternalFunction
25 
26 
27  @ingroup R
28 */
29 
30 
31 namespace Rcpp {
33  {
34 public:
35 
36  RCPP_GENERATE_CTOR_ASSIGN(TRInternalFunction_Impl)
37 
38 #include <TRInternalFunction__ctors.h>
39  void update(SEXP) {}
40 private:
41 
42  inline void set(SEXP xp) {
43  Rcpp::Environment RCPP = Rcpp::Environment::Rcpp_namespace() ;
44  Rcpp::Function intf = RCPP["internal_function"] ;
45  Storage::set__(intf(xp)) ;
46  }
47 
48  };
49 
50 
51 }
52 
53 
54 namespace ROOT {
55  namespace R {
56 
57  typedef Rcpp::TRInternalFunction_Impl<Rcpp::PreserveStorage> TRInternalFunction ;
58  }
59 }
60 
61 #endif
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
RCPP_API_CLASS(TRInternalFunction_Impl)
#define R(a, b, c, d, e, f, g, h, i)
Definition: RSha256.hxx:110
TRInternalFunction_Impl(OUT(*fun)(void))
Double_t(* Function)(Double_t)
Definition: Functor.C:4
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
Rcpp::TRInternalFunction_Impl< Rcpp::PreserveStorage > TRInternalFunction
This is a class to support deprecated method to pass function to R&#39;s Environment, based in Rcpp::Inte...
Definition: RExports.h:64