Loading...
Searching...
No Matches
caf::actor_ostream Class Reference

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 (local_actor *self)
| actor_ostream (scoped_actor &self)
template<class... Sigs>
| actor_ostream (const typed_actor_pointer< Sigs... > &ptr)
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<< (const char *arg)
| Writes arg to the buffer allocated for the calling actor.
actor_ostream & | operator<< (std::string arg)
| Writes arg to the buffer allocated for the calling actor.
template<class T>
actor_ostream & | operator<< (const 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.
actor_ostream & | operator<< (actor_ostream::fun_type f)
| Apply f to *this.

## Static Public Member Functions

static void | redirect (abstract_actor *self, std::string fn, int flags=0)
| Redirects all further output from self to file_name.
static void | redirect_all (actor_system &sys, std::string fn, int flags=0)
| Redirects all further output from any actor that did not redirect its output to fname.

## Static Public Attributes

static constexpr int | append = 0x01
| Open redirection file in append mode.

## Detailed Description

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.

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

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_core/caf/actor_ostream.hpp