diff options
Diffstat (limited to 'includes/image_io/utils/string_outputter.h')
-rw-r--r-- | includes/image_io/utils/string_outputter.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/includes/image_io/utils/string_outputter.h b/includes/image_io/utils/string_outputter.h new file mode 100644 index 0000000..b6ea013 --- /dev/null +++ b/includes/image_io/utils/string_outputter.h @@ -0,0 +1,19 @@ +#ifndef IMAGE_IO_UTILS_STRING_OUTPUTTER_H_ // NOLINT +#define IMAGE_IO_UTILS_STRING_OUTPUTTER_H_ // NOLINT + +#include <functional> +#include <string> + +namespace photos_editing_formats { +namespace image_io { + +/// A typedef for a function that accepts a string and writes it somewhere. +/// These types of functions are typically used in command line tools to write +/// the output of the tool to stdout or some other location. The function +/// should not write its own new line at the end of the str. +using StringOutputter = std::function<void(const std::string& str)>; + +} // namespace image_io +} // namespace photos_editing_formats + +#endif // IMAGE_IO_UTILS_STRING_OUTPUTTER_H_ // NOLINT |