|
Zth (libzth)
|
Abstract base class of a poller. More...
#include <poller.h>
Public Member Functions | |
| virtual | ~PollerInterface ()=default |
| Dtor. More... | |
| virtual int | add (Pollable &p) noexcept=0 |
| Add a pollable object. More... | |
| int | add (std::initializer_list< std::reference_wrapper< Pollable >> l) noexcept |
| Add pollable objects. More... | |
| virtual int | remove (Pollable &p) noexcept=0 |
| Remove a pollable object. More... | |
| virtual void | reserve (size_t more)=0 |
| Reserve memory to add more pollables. More... | |
| virtual bool | empty () const noexcept=0 |
| Checks if there is any pollable registered. More... | |
Public Member Functions inherited from zth::UniqueID< PollerInterface > | |
| UniqueID (UniqueID const &)=delete | |
| UniqueID (UniqueID &&u) noexcept | |
| UniqueID (string const &name) | |
| UniqueID (string &&name) | |
| UniqueID (char const *name=nullptr) | |
| UniqueID & | operator= (UniqueID const &)=delete |
| UniqueID & | operator= (UniqueID &&u) noexcept |
| virtual | ~UniqueID ()=default |
| void const * | normptr () const noexcept |
| uint64_t | id () const noexcept |
| string const & | name () const noexcept |
| void | setName (string const &name) |
| void | setName (char const *name) |
| void | setName (string &&name) |
| virtual char const * | id_str () const override |
Additional Inherited Members | |
Static Public Member Functions inherited from zth::UniqueID< PollerInterface > | |
| static uint64_t | getID () noexcept |
Protected Member Functions inherited from zth::UniqueIDBase | |
| virtual | ~UniqueIDBase ()=default |
|
virtualdefault |
Dtor.
|
pure virtualnoexcept |
Add a pollable object.
Once a pollable is added, do not modify its properties, except for user_data.
Implemented in zth::PollerClient, zth::PollerServer< PollItem_ >, and zth::PollerServer< zmq_pollitem_t >.
|
noexcept |
Add pollable objects.
Definition at line 25 of file poller.cpp.
|
pure virtualnoexcept |
Checks if there is any pollable registered.
Implemented in zth::PollerClient, zth::PollerServer< PollItem_ >, and zth::PollerServer< zmq_pollitem_t >.
|
pure virtualnoexcept |
Remove a pollable object.
Implemented in zth::PollerClient, zth::PollerServer< PollItem_ >, and zth::PollerServer< zmq_pollitem_t >.
|
pure virtual |
Reserve memory to add more pollables.
| std::bad_alloc | when allocation fails |
Implemented in zth::PollerClient, zth::PollerServer< PollItem_ >, and zth::PollerServer< zmq_pollitem_t >.