|
libcaf
0.14.0
|
Provides support for thread-safe output operations on character streams. More...
#include <actor_ostream.hpp>
Public Types | |
| using | fun_type = actor_ostream &(*)(actor_ostream &) |
Public Member Functions | |
| actor_ostream (actor_ostream &&)=default | |
| actor_ostream (const actor_ostream &)=default | |
| actor_ostream & | operator= (actor_ostream &&)=default |
| actor_ostream & | operator= (const actor_ostream &)=default |
| actor_ostream (actor self) | |
Creates a stream for self. | |
| actor_ostream & | write (std::string arg) |
Writes arg to the buffer allocated for the calling actor. | |
| actor_ostream & | flush () |
| Flushes the buffer allocated for the calling actor. | |
| actor_ostream & | operator<< (std::string arg) |
Writes arg to the buffer allocated for the calling actor. | |
| actor_ostream & | operator<< (const char *arg) |
Writes arg to the buffer allocated for the calling actor. | |
| template<class T > | |
| std::enable_if< !std::is_convertible< T, std::string >::value, actor_ostream & >::type | operator<< (T &&arg) |
Writes to_string(arg) to the buffer allocated for the calling actor, calling either std::to_string or caf::to_string depending on the argument. More... | |
| actor_ostream & | operator<< (actor_ostream::fun_type f) |
Apply f to *this. | |
Static Public Member Functions | |
| static void | redirect (const actor &src, std::string file_name, int flags=0) |
Redirects all further output from src to file_name. | |
| static void | redirect_all (std::string file_name, int flags=0) |
Redirects all further output from any actor that did not redirect its output to file_name. More... | |
Static Public Attributes | |
| static constexpr int | append = 0x01 |
| Open redirection file in append mode. | |
Provides support for thread-safe output operations on character streams.
The stream operates on a per-actor basis and will print only complete lines or when explicitly forced to flush its buffer. The stream will convert any operation to a message received by a printer actor. This actor is a sequence point that ensures output appears never interleaved.
| std::enable_if< ! std::is_convertible<T, std::string>::value, actor_ostream& >::type caf::actor_ostream::operator<< | ( | T && | arg | ) |
Writes to_string(arg) to the buffer allocated for the calling actor, calling either std::to_string or caf::to_string depending on the argument.
|
static |
Redirects all further output from any actor that did not redirect its output to file_name.
1.8.9.1