![]() |
Webdar 1.0.0
Web user interface to libdar
|
class reference gives a mean to link objects by a peering method More...
#include <reference.hpp>
Public Member Functions | |
reference () | |
usual constructor | |
reference (const reference &ref) | |
copy constructor More... | |
reference (reference &&ref) noexcept(false) | |
move constructor (only operational for objects without peering) More... | |
reference & | operator= (const reference &ref) |
assignment operator (only operational for objects without peering) More... | |
reference & | operator= (reference &&ref) noexcept(false) |
move assigment operator More... | |
virtual | ~reference () |
destructor | |
void | peer_with (reference *obj) |
method used to create a relation between two objects More... | |
void | break_peer_with (reference *obj) |
break the peering with the object given as argument | |
bool | is_peer (reference *obj) const |
whether a peering exists with that object | |
bool | is_empty () const |
whether the current object has peering | |
unsigned int | size () const |
the number of peers | |
Protected Member Functions | |
virtual void | broken_peering_from (reference *obj) |
to be informed when a peer has broke the peering with me More... | |
void | reset_read_peers () const |
reset the peers reading | |
bool | read_next_peer (reference *&peer) const |
class reference gives a mean to link objects by a peering method
it handles object destruction and updates all existing peers accordingly main use is for inherited classes needing link between objects of the same class or between objects of different classes (shared implementation for those uses cases).
|
inline |
copy constructor
|
noexcept |
move constructor (only operational for objects without peering)
|
inlineprotectedvirtual |
to be informed when a peer has broke the peering with me
Reimplemented in events, and server_pool.
assignment operator (only operational for objects without peering)
move assigment operator
void reference::peer_with | ( | reference * | obj | ) |
method used to create a relation between two objects
[in] | obj | must point to valid/existing object of class reference or inherited class. |
|
protected |
provide the next peer
[in] | peer | is the address of the next peer upon successful call |