|
CX Framework
Cross-platform C utility framework
|
Functions | |
| bool | lparseRegisterPull (StreamBuffer *sb, uint32 flags) |
| bool | lparseLine (StreamBuffer *sb, string *out) |
Pull-mode line parsing where the consumer explicitly requests each line.
| bool lparseLine | ( | StreamBuffer * | sb, |
| string * | out | ||
| ) |
bool lparseLine(StreamBuffer *sb, string *out)
Retrieves the next line from the stream buffer.
Call this function repeatedly after lparseRegisterPull() to process lines one at a time. The function returns false when there are no more lines to read.
IMPORTANT: The stream buffer is invalidated when this function returns false.
| sb | The stream buffer (invalidated when returning false) |
| out | String to receive the line content (cleared and populated) |
| bool lparseRegisterPull | ( | StreamBuffer * | sb, |
| uint32 | flags | ||
| ) |
bool lparseRegisterPull(StreamBuffer *sb, uint32 flags)
Registers the line parser as a consumer with the stream buffer in pull mode.
After registration, repeatedly call lparseLine() to retrieve each line from the stream buffer. This mode gives you explicit control over when lines are processed.
| sb | The stream buffer |
| flags | Configuration flags from LINEPARSER_FLAGS_ENUM |
Example: