FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
C++-like std::iostream facilities. More...
Go to the source code of this file.
Classes | |
class | streams::ostreambuf |
Output API based on a ring buffer. More... | |
class | streams::istreambuf |
Input API based on a ring buffer. More... | |
Namespaces | |
namespace | streams |
Defines C++-like streams API, based on circular buffers for input or output. | |
Macros | |
#define | REGISTER_OSTREAMBUF_LISTENERS(HANDLER1, ...) |
Register the necessary callbacks that will be notified when a streams::ostreambuf is put new content (character or string). More... | |
#define | REGISTER_OSTREAMBUF_NO_LISTENERS() void streams::ostreambuf_on_put_dispatch(ostreambuf&) {} |
Register no callback at all to streams::ostreambuf . More... | |
#define | DECL_OSTREAMBUF_LISTENERS_FRIEND friend struct streams::dispatch_handler; |
This macro shall be used in a class containing a private callback method bool on_put(streams::ostreambuf&) , registered by REGISTER_OSTREAMBUF_LISTENERS . More... | |
C++-like std::iostream facilities.
Definition in file streambuf.h.
#define REGISTER_OSTREAMBUF_LISTENERS | ( | HANDLER1, | |
... | |||
) |
Register the necessary callbacks that will be notified when a streams::ostreambuf
is put new content (character or string).
This is used by hardware and software UATX and UART.
Each handler registered here will be notified until one mentions it has handled the notification.
HANDLER1 | a class which registered instance will be notified, through its bool on_put(streams::ostreambuf&) method when any ostreambuffer has new content put into it. |
... | other classes similar to HANDLER1. |
Definition at line 49 of file streambuf.h.
#define REGISTER_OSTREAMBUF_NO_LISTENERS | ( | ) | void streams::ostreambuf_on_put_dispatch(ostreambuf&) {} |
Register no callback at all to streams::ostreambuf
.
You normally do not need this macro, except if you:
Definition at line 64 of file streambuf.h.
#define DECL_OSTREAMBUF_LISTENERS_FRIEND friend struct streams::dispatch_handler; |
This macro shall be used in a class containing a private callback method bool on_put(streams::ostreambuf&)
, registered by REGISTER_OSTREAMBUF_LISTENERS
.
It declares the class where it is used as a friend of all necessary functions so that the private callback method can be called properly.
Definition at line 73 of file streambuf.h.