#include <fileParser.hpp>
|
| | FileParser (const std::filesystem::path &fileName_) noexcept |
| |
| std::filesystem::path | getFileName () const noexcept |
| |
| template<typename F, typename... TArgs> |
| constexpr decltype(auto) | parseDataFile (F &&f_, TArgs &&... args_) const |
| |
| void | clearCache () noexcept |
| |
◆ FileParser()
| CppUtils::Files::FileParser::FileParser |
( |
const std::filesystem::path & | fileName_ | ) |
|
|
inlineexplicitnoexcept |
◆ readFileContent()
| void CppUtils::Files::FileParser::readFileContent |
( |
| ) |
const |
|
inlineprivate |
◆ getFileName()
| std::filesystem::path CppUtils::Files::FileParser::getFileName |
( |
| ) |
const |
|
inlinenoexcept |
◆ parseDataFile()
template<typename F, typename... TArgs>
| decltype(auto) CppUtils::Files::FileParser::parseDataFile |
( |
F && | f_, |
|
|
TArgs &&... | args_ ) const |
|
inlineconstexpr |
A wrapper to move the parsing of a given input file to the client.
- Template Parameters
-
| F | - The type of the function we are calling |
| ...TArgs | - The types of the arguments passed to the function f |
- Parameters
-
| f | - The function to invoke |
| args | - The parameters of the function we are invoking |
- Returns
- Here we return whatever the function, f, returns even if that is a void function.
- Warning
- The function must take the file contents as a
std::string by constant-reference in it's first argument. This requirement disqualifies all member functions but allows for a simpler syntax for those callable types we do support.
References fileContentCache, and readFileContent().
◆ clearCache()
| void CppUtils::Files::FileParser::clearCache |
( |
| ) |
|
|
inlinenoexcept |
◆ fileName
| const std::filesystem::path CppUtils::Files::FileParser::fileName |
|
private |
◆ fileContentCache
| std::string CppUtils::Files::FileParser::fileContentCache |
|
mutableprivate |
The documentation for this class was generated from the following file:
- common-utilities/include/common-utils/files/fileParsing/fileParser.hpp