Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
out_buff Class Reference
Inheritance diagram for out_buff:
Collaboration diagram for out_buff:

Public Member Functions

 out_buff (std::FILE *stream)
 
 ~out_buff ()
 
int sync ()
 

Detailed Description

Definition at line 13 of file 231-Cfg-OutputStreams.cpp.

Constructor & Destructor Documentation

◆ out_buff()

out_buff::out_buff ( std::FILE * stream)
inline

Definition at line 16 of file 231-Cfg-OutputStreams.cpp.

16:m_stream(stream) {}

◆ ~out_buff()

out_buff::~out_buff ( )
inline

Definition at line 17 of file 231-Cfg-OutputStreams.cpp.

17{ pubsync(); }

Member Function Documentation

◆ sync()

int out_buff::sync ( )
inline

Definition at line 18 of file 231-Cfg-OutputStreams.cpp.

18 {
19 int ret = 0;
20 for (unsigned char c : str()) {
21 if (putc(c, m_stream) == EOF) {
22 ret = -1;
23 break;
24 }
25 }
26 // Reset the buffer to avoid printing it multiple times
27 str("");
28 return ret;
29 }
return str
Definition CLI11.hpp:1359
CK_RV ret

The documentation for this class was generated from the following file: