Rcpp Version 1.0.7
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)
 
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 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"
 

Function Documentation

◆ createDirectory()

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

Definition at line 2933 of file attributes.cpp.

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

Here is the call graph for this function:

◆ endsWith()

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

Definition at line 3028 of file attributes.cpp.

Referenced by compileAttributes().

◆ generateCpp()

void Rcpp::attributes::generateCpp ( std::ostream &  ostr,
const SourceFileAttributes attributes,
bool  includePrototype,
bool  cppInterface,
const std::string &  contextId 
)

◆ generateRArgList()

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

◆ initializeGlobals()

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

Definition at line 2755 of file attributes.cpp.

◆ isQuoted()

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

Definition at line 3020 of file attributes.cpp.

◆ isRoxygenCpp()

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

Definition at line 3040 of file attributes.cpp.

References kWhitespaceChars.

Referenced by stripTrailingLineComments().

◆ isWhitespace()

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

Definition at line 2944 of file attributes.cpp.

References kWhitespaceChars.

◆ operator<<() [1/5]

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

Definition at line 1096 of file attributes.cpp.

◆ operator<<() [2/5]

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

Definition at line 1140 of file attributes.cpp.

◆ operator<<() [3/5]

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

Definition at line 1124 of file attributes.cpp.

References Rcpp::attributes::Param::empty(), Rcpp::attributes::Param::name(), and Rcpp::attributes::Param::value().

Here is the call graph for this function:

◆ operator<<() [4/5]

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

Definition at line 1130 of file attributes.cpp.

◆ operator<<() [5/5]

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

Definition at line 1069 of file attributes.cpp.

◆ printArgument()

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

Definition at line 1081 of file attributes.cpp.

References Rcpp::attributes::Argument::defaultValue(), and Rcpp::attributes::Argument::name().

Referenced by printFunction().

Here is the call graph for this function:

◆ printFunction()

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

Definition at line 1102 of file attributes.cpp.

References printArgument().

Referenced by generateCpp().

Here is the call graph for this function:

◆ removeFile()

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

Definition at line 2921 of file attributes.cpp.

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

Here is the call graph for this function:

◆ showWarning()

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

Definition at line 3035 of file attributes.cpp.

References Rcpp::base_env(), Rcpp::Named(), and Rcpp::warning().

Referenced by compileAttributes(), and generateRArgList().

Here is the call graph for this function:

◆ stripQuotes()

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

Definition at line 3011 of file attributes.cpp.

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

◆ stripTrailingLineComments()

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

Definition at line 2950 of file attributes.cpp.

References isRoxygenCpp(), and kWhitespaceChars.

Here is the call graph for this function:

◆ trimWhitespace()

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

Definition at line 2994 of file attributes.cpp.

References kWhitespaceChars.

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

Variable Documentation

◆ kDependsAttribute

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

Definition at line 162 of file attributes.cpp.

Referenced by compileAttributes().

◆ kExportAttribute

const char* const Rcpp::attributes::kExportAttribute = "export"

Definition at line 157 of file attributes.cpp.

◆ kExportInvisible

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

Definition at line 160 of file attributes.cpp.

◆ kExportName

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

◆ kExportRng

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

Definition at line 159 of file attributes.cpp.

◆ kInitAttribute

const char* const Rcpp::attributes::kInitAttribute = "init"

Definition at line 161 of file attributes.cpp.

◆ kInterfaceCpp

const char* const Rcpp::attributes::kInterfaceCpp = "cpp"

Definition at line 166 of file attributes.cpp.

◆ kInterfaceR

const char* const Rcpp::attributes::kInterfaceR = "r"

Definition at line 165 of file attributes.cpp.

◆ kInterfacesAttribute

const char* const Rcpp::attributes::kInterfacesAttribute = "interfaces"

Definition at line 164 of file attributes.cpp.

◆ kParamValueFalse

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

Definition at line 167 of file attributes.cpp.

◆ kParamValueFALSE

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

Definition at line 169 of file attributes.cpp.

◆ kParamValueTrue

const char* const Rcpp::attributes::kParamValueTrue = "true"

Definition at line 168 of file attributes.cpp.

◆ kParamValueTRUE

const char* const Rcpp::attributes::kParamValueTRUE = "TRUE"

Definition at line 170 of file attributes.cpp.

◆ kPluginsAttribute

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

Definition at line 163 of file attributes.cpp.

◆ kWhitespaceChars

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