|
OXY API 1.0
OXY API Library Documentation
|
Generate a blob containing the given content. More...
#include <blob.hpp>
Public Member Functions | |
| auto | operator() (char const *buffer, const size_t size) const -> blob_t |
| auto | operator() (std::ifstream &in) const -> blob_t |
| auto | operator() (std::istringstream const &stream) const -> blob_t |
| auto | operator() (std::string const &stream) const -> blob_t |
Generate a blob containing the given content.
This functor provides multiple overloads to create a blob_t object from different types of input, including strings, string streams, file streams, and raw buffers. It encapsulates the logic for constructing a blob from various sources of data.
|
inline |
This overload constructs a blob_t object from a raw buffer and its size, creating a string from the buffer and using it to initialize the blob.
| buffer | - contents of the new blob. |
| size | - size of the contents. |
|
inline |
This overload reads the entire contents of the provided input file stream and constructs a blob_t object with the read data.
|
inline |
This overload reads the entire contents of the provided input string stream and constructs a blob_t object with the read data.