ROOT  6.06/09
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 #ifndef ROOT_R_RExports
16 #include<RExports.h>
17 #endif
18 
19 #ifndef Rcpp_hpp
20 #include <Rcpp.h>
21 #endif
22 
23 //________________________________________________________________________________________________________
24 /**
25  This is a class to support deprecated method to pass function to R's Environment,
26  based in Rcpp::InternalFunction
27 
28 
29  @ingroup R
30 */
31 
32 
33 namespace Rcpp {
35  {
36 public:
37 
38  RCPP_GENERATE_CTOR_ASSIGN(TRInternalFunction_Impl)
39 
40 #include <TRInternalFunction__ctors.h>
41  void update(SEXP) {}
42 private:
43 
44  inline void set(SEXP xp) {
45  Rcpp::Environment RCPP = Rcpp::Environment::Rcpp_namespace() ;
46  Rcpp::Function intf = RCPP["internal_function"] ;
47  Storage::set__(intf(xp)) ;
48  }
49 
50  };
51 
52 
53 }
54 
55 
56 namespace ROOT {
57  namespace R {
58 
59  typedef Rcpp::TRInternalFunction_Impl<Rcpp::PreserveStorage> TRInternalFunction ;
60  }
61 }
62 
63 #endif
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
RCPP_API_CLASS(TRInternalFunction_Impl)
TRInternalFunction_Impl(OUT(*fun)(void))
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's Environment, based in Rcpp::Inte...
Definition: RExports.h:78
TRandom3 R
a TMatrixD.
Definition: testIO.cxx:28