#include <FilePlaceholderManager.hpp>
Definition at line 40 of file FilePlaceholderManager.hpp.
◆ FilePlaceholderManager()
BOL::FilePlaceholderManager::FilePlaceholderManager |
( |
std::string const |
inputSuffix = "" , |
|
|
std::string const |
placeholderSuffix = "" , |
|
|
std::string const |
outputSuffix = "" |
|
) |
| |
Definition at line 20 of file FilePlaceholderManager.cpp.
std::vector< FilenameTriple > filenameTriples
std::string lastPlaceholder
std::vector< FilenameTriple >::const_iterator whichTriple
std::string const placeholderSuffix
std::string currentSuffix
std::string const inputSuffix
std::string const outputSuffix
FilenameTriple currentTriple
◆ ~FilePlaceholderManager()
BOL::FilePlaceholderManager::~FilePlaceholderManager |
( |
| ) |
|
◆ getInput()
std::string const & BOL::FilePlaceholderManager::getInput |
( |
| ) |
const |
|
inline |
◆ getOutput()
std::string const & BOL::FilePlaceholderManager::getOutput |
( |
| ) |
const |
|
inline |
◆ getPlaceholder()
std::string const & BOL::FilePlaceholderManager::getPlaceholder |
( |
| ) |
const |
|
inline |
◆ holdNextPlace()
bool BOL::FilePlaceholderManager::holdNextPlace |
( |
bool const |
deleteLastPlaceholder = true | ) |
|
Definition at line 138 of file FilePlaceholderManager.cpp.
156 if( deleteLastPlaceholder )
166 placeholderStream <<
"placeholder" << std::endl;
167 placeholderStream.close();
static bool fileExists(std::string const &fileName)
static void runSystemCommand(std::string const &systemCommand)
◆ prepareFilenames() [1/2]
void BOL::FilePlaceholderManager::prepareFilenames |
( |
std::string const & |
inputDirectory, |
|
|
std::string const & |
placeholderDirectory = "" , |
|
|
std::string const & |
outputDirectory = "" |
|
) |
| |
Definition at line 43 of file FilePlaceholderManager.cpp.
55 std::vector< std::string > validBaseFilenames;
56 DIR* directoryPointer( opendir( inputDirectory.c_str() ) );
57 if( NULL == directoryPointer )
59 throw std::runtime_error(
"Could not read directory!" );
61 std::string currentFile;
62 struct dirent* structPointer( readdir( directoryPointer ) );
63 while( NULL != structPointer )
65 currentFile.assign( structPointer->d_name );
66 structPointer = readdir( directoryPointer );
67 if( ( 0 == currentFile.compare(
"." ) )
69 ( 0 == currentFile.compare(
".." ) )
79 validBaseFilenames.push_back( currentFile.substr( 0,
void prepareFilenames(std::string const &inputDirectory, std::string const &placeholderDirectory="", std::string const &outputDirectory="")
◆ prepareFilenames() [2/2]
void BOL::FilePlaceholderManager::prepareFilenames |
( |
std::vector< std::string > const & |
baseFilenames, |
|
|
std::string const |
inputDirectory = "" , |
|
|
std::string |
placeholderDirectory = "" , |
|
|
std::string |
outputDirectory = "" |
|
) |
| |
Definition at line 90 of file FilePlaceholderManager.cpp.
105 if( placeholderDirectory.empty() )
107 placeholderDirectory.assign( inputDirectory );
113 if( outputDirectory.empty() )
115 outputDirectory.assign( inputDirectory );
121 for( std::vector< std::string >::const_iterator
122 whichBaseFilename( baseFilenames.begin() );
123 baseFilenames.end() > whichBaseFilename;
124 ++whichBaseFilename )
std::string placeholderFile
◆ currentSuffix
std::string BOL::FilePlaceholderManager::currentSuffix |
|
protected |
◆ currentTriple
◆ filenameTriples
std::vector< FilenameTriple > BOL::FilePlaceholderManager::filenameTriples |
|
protected |
◆ inputSuffix
std::string const BOL::FilePlaceholderManager::inputSuffix |
|
protected |
◆ lastPlaceholder
std::string BOL::FilePlaceholderManager::lastPlaceholder |
|
protected |
◆ outputSuffix
std::string const BOL::FilePlaceholderManager::outputSuffix |
|
protected |
◆ placeholderSuffix
std::string const BOL::FilePlaceholderManager::placeholderSuffix |
|
protected |
◆ whichTriple
std::vector<FilenameTriple>::const_iterator BOL::FilePlaceholderManager::whichTriple |
|
protected |
The documentation for this class was generated from the following files: