Rcpp Version 1.0.14
Loading...
Searching...
No Matches
Rcpp::attributes Namespace Reference

Classes

class  Argument
 
class  Attribute
 
class  CommentState
 
class  CppExportsGenerator
 
class  CppExportsIncludeGenerator
 
class  CppPackageIncludeGenerator
 
class  ExportsGenerator
 
class  ExportsGenerators
 
class  FileInfo
 
class  Function
 
class  Param
 
class  RExportsGenerator
 
class  SourceFileAttributes
 
class  SourceFileAttributesParser
 
class  Type
 

Functions

bool removeFile (const std::string &path)
 
void createDirectory (const std::string &path)
 
bool isWhitespace (char ch)
 
void trimWhitespace (std::string *pStr)
 
void stripTrailingLineComments (std::string *pStr)
 
void stripQuotes (std::string *pStr)
 
bool isQuoted (const std::string &str)
 
bool endsWith (const std::string &str, const std::string &suffix)
 
void showWarning (const std::string &msg)
 
bool isRoxygenCpp (const std::string &str)
 
std::ostream & operator<< (std::ostream &os, const Type &type)
 
std::ostream & operator<< (std::ostream &os, const Argument &argument)
 
std::ostream & operator<< (std::ostream &os, const Function &function)
 
std::ostream & operator<< (std::ostream &os, const Param &param)
 
std::ostream & operator<< (std::ostream &os, const Attribute &attribute)
 
std::string generateRArgList (const Function &function)
 
bool checkRSignature (const Function &function, std::string args)
 
void initializeGlobals (std::ostream &ostr)
 
void generateCpp (std::ostream &ostr, const SourceFileAttributes &attributes, bool includePrototype, bool cppInterface, const std::string &contextId)
 
void printArgument (std::ostream &os, const Argument &argument, bool printDefault=true)
 
void printFunction (std::ostream &os, const Function &function, bool printArgDefaults=true)
 

Variables

const char *const kWhitespaceChars = " \f\n\r\t\v"
 
const char *const kExportAttribute = "export"
 
const char *const kExportName = "name"
 
const char *const kExportRng = "rng"
 
const char *const kExportInvisible = "invisible"
 
const char *const kExportSignature = "signature"
 
const char *const kInitAttribute = "init"
 
const char *const kDependsAttribute = "depends"
 
const char *const kPluginsAttribute = "plugins"
 
const char *const kInterfacesAttribute = "interfaces"
 
const char *const kInterfaceR = "r"
 
const char *const kInterfaceCpp = "cpp"
 
const char *const kParamValueFalse = "false"
 
const char *const kParamValueTrue = "true"
 
const char *const kParamValueFALSE = "FALSE"
 
const char *const kParamValueTRUE = "TRUE"
 
const char *const kParamBlockStart = "{;"
 
const char *const kParamBlockEnd = "}"
 

Function Documentation

◆ checkRSignature()

bool Rcpp::attributes::checkRSignature ( const Function function,
std::string  args 
)
private

Definition at line 2808 of file attributes.cpp.

References Rcpp::_, Rcpp::attributes::Function::arguments(), Rcpp::as(), and Rcpp::eval().

Referenced by Rcpp::attributes::RExportsGenerator::doWriteFunctions().

Here is the call graph for this function:

◆ createDirectory()

void Rcpp::attributes::createDirectory ( const std::string &  path)

Definition at line 3019 of file attributes.cpp.

References Rcpp::as(), Rcpp::exists(), and Rcpp::Named().

Referenced by Rcpp::attributes::CppExportsIncludeGenerator::commit(), and Rcpp::attributes::CppPackageIncludeGenerator::commit().

Here is the call graph for this function:

◆ endsWith()

bool Rcpp::attributes::endsWith ( const std::string &  str,
const std::string &  suffix 
)

Definition at line 3114 of file attributes.cpp.

References Rcpp::as().

Referenced by compileAttributes().

Here is the call graph for this function:

◆ generateCpp()

◆ generateRArgList()

std::string Rcpp::attributes::generateRArgList ( const Function function)
private

◆ initializeGlobals()

void Rcpp::attributes::initializeGlobals ( std::ostream &  ostr)
private

Definition at line 2837 of file attributes.cpp.

Referenced by Rcpp::attributes::CppExportsGenerator::commit().

◆ isQuoted()

bool Rcpp::attributes::isQuoted ( const std::string &  str)

Definition at line 3106 of file attributes.cpp.

References Rcpp::as().

Here is the call graph for this function:

◆ isRoxygenCpp()

bool Rcpp::attributes::isRoxygenCpp ( const std::string &  str)

Definition at line 3126 of file attributes.cpp.

References Rcpp::as(), and kWhitespaceChars.

Referenced by stripTrailingLineComments().

Here is the call graph for this function:

◆ isWhitespace()

bool Rcpp::attributes::isWhitespace ( char  ch)

Definition at line 3030 of file attributes.cpp.

References Rcpp::as(), and kWhitespaceChars.

Referenced by Rcpp::attributes::SourceFileAttributesParser::parseFunction().

Here is the call graph for this function:

◆ operator<<() [1/5]

std::ostream & Rcpp::attributes::operator<< ( std::ostream &  os,
const Argument argument 
)
private

Definition at line 1119 of file attributes.cpp.

References Rcpp::as(), and printArgument().

Here is the call graph for this function:

◆ operator<<() [2/5]

std::ostream & Rcpp::attributes::operator<< ( std::ostream &  os,
const Attribute attribute 
)
private

Definition at line 1163 of file attributes.cpp.

References Rcpp::as().

Here is the call graph for this function:

◆ operator<<() [3/5]

std::ostream & Rcpp::attributes::operator<< ( std::ostream &  os,
const Function function 
)
private

Definition at line 1147 of file attributes.cpp.

References Rcpp::as(), and printFunction().

Here is the call graph for this function:

◆ operator<<() [4/5]

std::ostream & Rcpp::attributes::operator<< ( std::ostream &  os,
const Param param 
)
private

Definition at line 1153 of file attributes.cpp.

References Rcpp::as().

Here is the call graph for this function:

◆ operator<<() [5/5]

std::ostream & Rcpp::attributes::operator<< ( std::ostream &  os,
const Type type 
)
private

◆ printArgument()

void Rcpp::attributes::printArgument ( std::ostream &  os,
const Argument argument,
bool  printDefault = true 
)
private

Definition at line 1104 of file attributes.cpp.

References Rcpp::as().

Referenced by operator<<(), and printFunction().

Here is the call graph for this function:

◆ printFunction()

void Rcpp::attributes::printFunction ( std::ostream &  os,
const Function function,
bool  printArgDefaults = true 
)
private

◆ removeFile()

bool Rcpp::attributes::removeFile ( const std::string &  path)

Definition at line 3007 of file attributes.cpp.

References Rcpp::as(), and Rcpp::exists().

Referenced by Rcpp::attributes::ExportsGenerator::remove().

Here is the call graph for this function:

◆ showWarning()

void Rcpp::attributes::showWarning ( const std::string &  msg)

◆ stripQuotes()

void Rcpp::attributes::stripQuotes ( std::string *  pStr)

Definition at line 3097 of file attributes.cpp.

References Rcpp::as().

Referenced by Rcpp::attributes::Param::Param().

Here is the call graph for this function:

◆ stripTrailingLineComments()

void Rcpp::attributes::stripTrailingLineComments ( std::string *  pStr)

Definition at line 3036 of file attributes.cpp.

References Rcpp::as(), isRoxygenCpp(), and kWhitespaceChars.

Here is the call graph for this function:

◆ trimWhitespace()

Variable Documentation

◆ kDependsAttribute

const char* const Rcpp::attributes::kDependsAttribute = "depends"
private

◆ kExportAttribute

◆ kExportInvisible

const char* const Rcpp::attributes::kExportInvisible = "invisible"
private

◆ kExportName

const char* const Rcpp::attributes::kExportName = "name"
private

◆ kExportRng

const char* const Rcpp::attributes::kExportRng = "rng"
private

◆ kExportSignature

◆ kInitAttribute

◆ kInterfaceCpp

◆ kInterfaceR

◆ kInterfacesAttribute

◆ kParamBlockEnd

const char* const Rcpp::attributes::kParamBlockEnd = "}"
private

◆ kParamBlockStart

const char* const Rcpp::attributes::kParamBlockStart = "{;"
private

◆ kParamValueFalse

const char* const Rcpp::attributes::kParamValueFalse = "false"
private

◆ kParamValueFALSE

const char* const Rcpp::attributes::kParamValueFALSE = "FALSE"
private

◆ kParamValueTrue

◆ kParamValueTRUE

◆ kPluginsAttribute

const char* const Rcpp::attributes::kPluginsAttribute = "plugins"
private

◆ kWhitespaceChars

const char *const Rcpp::attributes::kWhitespaceChars = " \f\n\r\t\v"