80 stream.exceptions(std::ios::badbit | std::ios::failbit);
84 stream.open(filePath);
88 catch (
const std::ios_base::failure& e)
97 stream.exceptions(std::ios::badbit | std::ios::failbit);
101 stream.open(filePath);
103 std::stringstream ss;
104 ss << stream.rdbuf();
108 catch (
const std::ios_base::failure& e)
123 for (
const auto& module : GetModules())
125 data =
module->Process(data);
A type-erased container for any copyable value.
Thrown when an input, output, file or device communication error occurs.
Interface defining the structure and behavior of a processing pipeline.
virtual std::string ExportSettingsToString() const =0
Returns the current settings of the pipeline and its modules as a string.
virtual void ImportSettingsFromString(const std::string &settings)=0
Loads settings for the pipeline and its modules from a string.
Base class for implementing a custom pipeline.
peak::common::Any operator<<(const peak::common::Any &input) override
Convenience operator for processing input using the pipeline.
peak::common::Any Process(const peak::common::Any &input) const override
Processes the input through all pipeline modules and returns the result.
void ImportSettingsFromFile(const std::string &filePath) override
Loads the settings of the pipeline and its modules from a file.
void ExportSettingsToFile(const std::string &filePath) const override
Saves the current settings of the pipeline and its modules to a file.
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.