Rcpp Version 0.9.10
Rcpp::Function Class Reference

#include <Function.h>

Inheritance diagram for Rcpp::Function:
Collaboration diagram for Rcpp::Function:

List of all members.

Public Member Functions

 Function (SEXP lang)
 Function (const std::string &name)
 Function (const Function &other)
Functionoperator= (const Function &other)
SEXP operator() () const
SEXP environment () const
SEXP body () const
 ~Function ()

Detailed Description

functions

Definition at line 35 of file Function.h.


Constructor & Destructor Documentation

Rcpp::Function::Function ( SEXP  lang = R_NilValue)

Attempts to convert the SEXP to a pair list

Exceptions:
not_compatibleif the SEXP could not be converted to a pair list using as.pairlist

Definition at line 26 of file Function.cpp.

References Rcpp::RObject::setSEXP(), and x.

Here is the call graph for this function:

Rcpp::Function::Function ( const std::string &  name)

Finds a function, searching from the global environment

Parameters:
namename of the function

Definition at line 38 of file Function.cpp.

References PROTECT(), Rcpp::RObject::setSEXP(), and x.

Here is the call graph for this function:

Rcpp::Function::Function ( const Function other)

Definition at line 45 of file Function.cpp.

References Rcpp::RObject::asSexp(), and Rcpp::RObject::setSEXP().

Here is the call graph for this function:

Rcpp::Function::~Function ( )

Definition at line 54 of file Function.cpp.


Member Function Documentation

SEXP Rcpp::Function::body ( ) const

Returns the body of the function

Definition at line 63 of file Function.cpp.

References Rcpp::RObject::m_sexp.

SEXP Rcpp::Function::environment ( ) const

Returns the environment of this function

Definition at line 56 of file Function.cpp.

References Rcpp::RObject::m_sexp.

SEXP Rcpp::Function::operator() ( ) const [inline]

Finds a function, searching from a specific environment

Parameters:
namename of the function
envenvironment where to find it calls the function with the specified arguments
...Argsvariable length argument list. The type of each argument must be wrappable, meaning there need to be a wrap function that takes this type as its parameter

Definition at line 78 of file Function.h.

References Rcpp::RObject::m_sexp, and Rcpp::internal::try_catch().

Here is the call graph for this function:

Function & Rcpp::Function::operator= ( const Function other)

Definition at line 49 of file Function.cpp.

References Rcpp::RObject::asSexp(), and Rcpp::RObject::setSEXP().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines