94 bool is_empty()
const {
return peers.empty(); };
97 unsigned int size()
const {
return peers.size(); };
116 mutable std::set<reference *>::iterator next_to_read;
117 std::set<reference *> peers;
120 void shut_all_peerings();
121 void erase_with_coherence(
reference* ptr);
class reference gives a mean to link objects by a peering method
Definition: reference.hpp:47
virtual void broken_peering_from(reference *obj)
to be informed when a peer has broke the peering with me
Definition: reference.hpp:102
reference()
usual constructor
Definition: reference.hpp:51
reference & operator=(const reference &ref)
assignment operator (only operational for objects without peering)
Definition: reference.cpp:52
void reset_read_peers() const
reset the peers reading
Definition: reference.hpp:106
bool is_peer(reference *obj) const
whether a peering exists with that object
Definition: reference.hpp:91
bool is_empty() const
whether the current object has peering
Definition: reference.hpp:94
reference(const reference &ref)
copy constructor
Definition: reference.hpp:56
void break_peer_with(reference *obj)
break the peering with the object given as argument
Definition: reference.cpp:97
bool read_next_peer(reference *&peer) const
Definition: reference.cpp:121
virtual ~reference()
destructor
Definition: reference.hpp:75
unsigned int size() const
the number of peers
Definition: reference.hpp:97
void peer_with(reference *obj)
method used to create a relation between two objects
Definition: reference.cpp:72