LinePrefixFilter Class Reference#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
Public Member Functions |
Protected Member Functions |
Private Types |
Private Member Functions |
Private Attributes |
List of all members
DiFfRG::LinePrefixFilter Class Reference
A std::streambuf that forwards everything except whole lines starting with a prefix. More...
#include <stream_filter.hh>
Inheritance diagram for DiFfRG::LinePrefixFilter:
Public Member Functions | |
| LinePrefixFilter (std::streambuf *sink, std::string_view prefix) | |
Protected Member Functions | |
| int_type | overflow (int_type ch) override |
| int | sync () override |
Private Types | |
| enum class | State { undecided , forwarding , dropping } |
Private Member Functions | |
| void | forward () |
| void | reset () |
Private Attributes | |
| std::streambuf * | sink |
| std::string_view | prefix |
| std::string | held |
| State | state = State::undecided |
Detailed Description
A std::streambuf that forwards everything except whole lines starting with a prefix.
Bytes are withheld only while the current line is still a prefix of the pattern; the moment it diverges, all of them are forwarded at once. Nothing written for another reason is therefore delayed. That property is the point of the class rather than an optimization: it is used around calls that may abort the process, and a line-buffering filter would swallow the dying message.
Member Enumeration Documentation
◆ State
|
strongprivate |
Constructor & Destructor Documentation
◆ LinePrefixFilter()
|
inline |
Member Function Documentation
◆ forward()
|
inlineprivate |
◆ overflow()
|
inlineoverrideprotected |
◆ reset()
|
inlineprivate |
◆ sync()
|
inlineoverrideprotected |
Member Data Documentation
◆ held
|
private |
◆ prefix
|
private |
◆ sink
|
private |
◆ state
|
private |
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/common/stream_filter.hh
Generated by