Owner-facing creator object for file-backed streams. More...
#include <stream_file_creator.h>
Data Fields | |
| stream_status_t(* | create )(const void *ud, const char *path, uint32_t flags, bool autoclose, stream_t **out) |
| Create a file-backed stream. | |
| void * | ud |
Opaque context bound to create. | |
A stream_file_creator_t packages:
Such an object is typically prepared by the Composition Root and then injected into owner-side runtime code that needs to create file-backed stream_t instances without depending directly on factory wiring details.
Definition at line 38 of file stream_file_creator.h.
| stream_status_t(* stream_file_creator_t::create) (const void *ud, const char *path, uint32_t flags, bool autoclose, stream_t **out) |
| [in] | ud | Opaque creator-owned context. |
| [in] | path | File path used to open or create the target stream backend. |
| [in] | flags | File opening flags forwarded to the underlying file-oriented adapter. |
| [in] | autoclose | Whether the created stream should close the underlying file resource automatically when the stream is destroyed. |
| [out] | out | Receives the created stream handle. |
stream_status_t describing the creation result. Definition at line 61 of file stream_file_creator.h.
| void* stream_file_creator_t::ud |
This pointer typically hides Composition Root wiring details such as a factory reference and the associated adapter key.
Definition at line 75 of file stream_file_creator.h.