Handles file writing for text, stdout, images, and object files.
More...
#include <io_utils.h>
|
| bool | write_png (const std::string &filename, const std::vector< std::uint8_t > &data, unsigned int w=100, unsigned int h=100, unsigned int stride=4) const noexcept |
| | Write pixels to a PNG file.
|
| |
| bool | write_jpeg (const std::string &filename, const std::vector< std::uint8_t > &data, unsigned int w=100, unsigned int h=100, unsigned int stride=4) const noexcept |
| | Write pixels to a JPEG file.
|
| |
| bool | write (std::ostream &oss, const std::string &data) const noexcept |
| | Handles writing to an output stream.
|
| |
| bool | write_file (const std::string &filename, const std::string &data) const noexcept |
| | Write to a file.
|
| |
|
| static std::string | getDirectoryPath (const std::string &filepath) noexcept |
| | Get the directory path from a full file path.
|
| |
Handles file writing for text, stdout, images, and object files.
◆ getDirectoryPath()
| static std::string mazes::io_utils::getDirectoryPath |
( |
const std::string & | filepath | ) |
|
|
inlinestaticnoexcept |
Get the directory path from a full file path.
- Parameters
-
- Returns
- Directory path
◆ write()
| bool mazes::io_utils::write |
( |
std::ostream & | oss, |
|
|
const std::string & | data ) const |
|
noexcept |
Handles writing to an output stream.
- Parameters
-
- Returns
◆ write_file()
| bool mazes::io_utils::write_file |
( |
const std::string & | filename, |
|
|
const std::string & | data ) const |
|
noexcept |
Write to a file.
- Parameters
-
- Returns
◆ write_jpeg()
| bool mazes::io_utils::write_jpeg |
( |
const std::string & | filename, |
|
|
const std::vector< std::uint8_t > & | data, |
|
|
unsigned int | w = 100, |
|
|
unsigned int | h = 100, |
|
|
unsigned int | stride = 4 ) const |
|
noexcept |
Write pixels to a JPEG file.
- Parameters
-
| filename | |
| data | |
| w | 100 |
| h | 100 |
| stride | 4 |
- Returns
◆ write_png()
| bool mazes::io_utils::write_png |
( |
const std::string & | filename, |
|
|
const std::vector< std::uint8_t > & | data, |
|
|
unsigned int | w = 100, |
|
|
unsigned int | h = 100, |
|
|
unsigned int | stride = 4 ) const |
|
noexcept |
Write pixels to a PNG file.
- Parameters
-
| filename | |
| data | |
| w | 100 |
| h | 100 |
| stride | 4 |
- Returns
The documentation for this class was generated from the following file: