Rcpp Version 0.12.14
Rcpp::attributes::ExportsGenerator Class Referenceabstract
Inheritance diagram for Rcpp::attributes::ExportsGenerator:

Public Member Functions

virtual ~ExportsGenerator ()
 
const std::string & targetFile () const
 
const std::string & package () const
 
const std::string & packageCpp () const
 
const std::string packageCppPrefix () const
 
virtual void writeBegin ()=0
 
void writeFunctions (const SourceFileAttributes &attributes, bool verbose)
 
virtual void writeEnd (bool hasPackageInit)=0
 
virtual bool commit (const std::vector< std::string > &includes)=0
 
bool remove ()
 
 operator std::ostream & ()
 

Protected Member Functions

 ExportsGenerator (const std::string &targetFile, const std::string &package, const std::string &commentPrefix)
 
std::ostream & ostr ()
 
bool hasCppInterface () const
 
std::string exportValidationFunction ()
 
std::string exportValidationFunctionRegisteredName ()
 
std::string registerCCallableExportedName ()
 
bool commit (const std::string &preamble=std::string())
 

Private Member Functions

 ExportsGenerator (const ExportsGenerator &)
 
ExportsGeneratoroperator= (const ExportsGenerator &)
 
virtual void doWriteFunctions (const SourceFileAttributes &attributes, bool verbose)=0
 
bool isSafeToOverwrite () const
 
std::string generatorToken () const
 

Private Attributes

std::string targetFile_
 
std::string package_
 
std::string packageCpp_
 
std::string commentPrefix_
 
std::string existingCode_
 
std::ostringstream codeStream_
 
bool hasCppInterface_
 

Detailed Description

Definition at line 563 of file attributes.cpp.

Constructor & Destructor Documentation

◆ ExportsGenerator() [1/2]

Rcpp::attributes::ExportsGenerator::ExportsGenerator ( const std::string &  targetFile,
const std::string &  package,
const std::string &  commentPrefix 
)
protected

Definition at line 1774 of file attributes.cpp.

References existingCode_, Rcpp::exists(), isSafeToOverwrite(), packageCpp_, and targetFile_.

Here is the call graph for this function:

◆ ExportsGenerator() [2/2]

Rcpp::attributes::ExportsGenerator::ExportsGenerator ( const ExportsGenerator )
private

◆ ~ExportsGenerator()

virtual Rcpp::attributes::ExportsGenerator::~ExportsGenerator ( )
inlinevirtual

Definition at line 575 of file attributes.cpp.

Member Function Documentation

◆ commit() [1/2]

◆ commit() [2/2]

bool Rcpp::attributes::ExportsGenerator::commit ( const std::string &  preamble = std::string())
protected

Definition at line 1813 of file attributes.cpp.

References codeStream_, commentPrefix_, existingCode_, Rcpp::attributes::FileInfo::exists(), generatorToken(), and targetFile_.

Here is the call graph for this function:

◆ doWriteFunctions()

virtual void Rcpp::attributes::ExportsGenerator::doWriteFunctions ( const SourceFileAttributes attributes,
bool  verbose 
)
privatepure virtual

◆ exportValidationFunction()

std::string Rcpp::attributes::ExportsGenerator::exportValidationFunction ( )
inlineprotected

Definition at line 611 of file attributes.cpp.

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

◆ exportValidationFunctionRegisteredName()

std::string Rcpp::attributes::ExportsGenerator::exportValidationFunctionRegisteredName ( )
inlineprotected

◆ generatorToken()

std::string Rcpp::attributes::ExportsGenerator::generatorToken ( ) const
inlineprivate

Definition at line 642 of file attributes.cpp.

Referenced by commit().

◆ hasCppInterface()

◆ isSafeToOverwrite()

bool Rcpp::attributes::ExportsGenerator::isSafeToOverwrite ( ) const
inlineprivate

Definition at line 635 of file attributes.cpp.

Referenced by ExportsGenerator().

◆ operator std::ostream &()

Rcpp::attributes::ExportsGenerator::operator std::ostream & ( )
inline

Definition at line 595 of file attributes.cpp.

◆ operator=()

ExportsGenerator& Rcpp::attributes::ExportsGenerator::operator= ( const ExportsGenerator )
private

◆ ostr()

◆ package()

◆ packageCpp()

◆ packageCppPrefix()

◆ registerCCallableExportedName()

std::string Rcpp::attributes::ExportsGenerator::registerCCallableExportedName ( )
inlineprotected

◆ remove()

bool Rcpp::attributes::ExportsGenerator::remove ( )

Definition at line 1853 of file attributes.cpp.

References Rcpp::attributes::removeFile(), and targetFile_.

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

Here is the call graph for this function:

◆ targetFile()

const std::string& Rcpp::attributes::ExportsGenerator::targetFile ( ) const
inline

Definition at line 578 of file attributes.cpp.

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

◆ writeBegin()

◆ writeEnd()

virtual void Rcpp::attributes::ExportsGenerator::writeEnd ( bool  hasPackageInit)
pure virtual

◆ writeFunctions()

void Rcpp::attributes::ExportsGenerator::writeFunctions ( const SourceFileAttributes attributes,
bool  verbose 
)

Definition at line 1800 of file attributes.cpp.

References doWriteFunctions(), hasCppInterface_, Rcpp::attributes::SourceFileAttributes::hasInterface(), and Rcpp::attributes::kInterfaceCpp.

Here is the call graph for this function:

Member Data Documentation

◆ codeStream_

std::ostringstream Rcpp::attributes::ExportsGenerator::codeStream_
private

Definition at line 652 of file attributes.cpp.

Referenced by commit().

◆ commentPrefix_

std::string Rcpp::attributes::ExportsGenerator::commentPrefix_
private

Definition at line 650 of file attributes.cpp.

Referenced by commit().

◆ existingCode_

std::string Rcpp::attributes::ExportsGenerator::existingCode_
private

Definition at line 651 of file attributes.cpp.

Referenced by commit(), and ExportsGenerator().

◆ hasCppInterface_

bool Rcpp::attributes::ExportsGenerator::hasCppInterface_
private

Definition at line 653 of file attributes.cpp.

Referenced by writeFunctions().

◆ package_

std::string Rcpp::attributes::ExportsGenerator::package_
private

Definition at line 648 of file attributes.cpp.

◆ packageCpp_

std::string Rcpp::attributes::ExportsGenerator::packageCpp_
private

Definition at line 649 of file attributes.cpp.

Referenced by ExportsGenerator().

◆ targetFile_

std::string Rcpp::attributes::ExportsGenerator::targetFile_
private

Definition at line 647 of file attributes.cpp.

Referenced by commit(), ExportsGenerator(), and remove().


The documentation for this class was generated from the following file: