Home
Symple module

Roster

The Roster provides a registry for active network peers indexed by session ID.

Roster

#include <icy/symple/roster.h>
class Roster

Defined in src/symple/include/icy/symple/roster.h:29

Inherits: string, Peer >

The Roster provides a registry for active network peers indexed by session ID.

List of all members

NameKindOwner
PeerAddedvariableDeclared here
PeerRemovedvariableDeclared here
RosterfunctionDeclared here
~RosterfunctionDeclared here
getByHostfunctionDeclared here
peersfunctionDeclared here
printfunctionDeclared here
classNamefunctionDeclared here
onAddfunctionDeclared here
onRemovefunctionDeclared here
KeyedStorefunctionInherited from KeyedStore
~KeyedStorefunctionInherited from KeyedStore
KeyedStorefunctionInherited from KeyedStore
operator=functionInherited from KeyedStore
KeyedStorefunctionInherited from KeyedStore
operator=functionInherited from KeyedStore
getfunctionInherited from KeyedStore
addfunctionInherited from KeyedStore
tryAddfunctionInherited from KeyedStore
putfunctionInherited from KeyedStore
erasefunctionInherited from KeyedStore
containsfunctionInherited from KeyedStore
emptyfunctionInherited from KeyedStore
sizefunctionInherited from KeyedStore
clearfunctionInherited from KeyedStore
mapfunctionInherited from KeyedStore
mapfunctionInherited from KeyedStore
beginfunctionInherited from KeyedStore
endfunctionInherited from KeyedStore
beginfunctionInherited from KeyedStore
endfunctionInherited from KeyedStore
_mapvariableInherited from KeyedStore
onAddfunctionInherited from KeyedStore
onRemovefunctionInherited from KeyedStore
MaptypedefInherited from KeyedStore

Inherited from KeyedStore

KindNameDescription
functionKeyedStoreDefaulted constructor.
function~KeyedStore virtual inline
functionKeyedStoreDeleted constructor.
functionoperator=Deleted assignment operator.
functionKeyedStoreDefaulted constructor.
functionoperator=Defaulted assignment operator.
functionget const inlineReturns the item for key, or nullptr if not found.
functionadd inlineInserts a uniquely owned item. Returns a reference to the stored item.
functiontryAdd inlineInserts if absent; returns false on duplicate (never throws).
functionput inlineInserts or replaces the item under key.
functionerase inlineRemoves and destroys the item under key.
functioncontains const inline
functionempty const inline
functionsize const inline
functionclear inline
functionmap inlineDirect map access for iteration.
functionmap const inline
functionbegin inline
functionend inline
functionbegin const inline
functionend const inline
variable_map
functiononAdd virtual inlineOverride for lifecycle reactions.
functiononRemove virtual inline
typedefMap

Public Attributes

ReturnNameDescription
Signal< void(Peer &)>PeerAddedLifecycle signals for external observers (samples, UI).
Signal< void(constPeer &)>PeerRemoved

PeerAdded

Signal< void(Peer &)> PeerAdded

Defined in src/symple/include/icy/symple/roster.h:46

Lifecycle signals for external observers (samples, UI).


PeerRemoved

Signal< void(constPeer &)> PeerRemoved

Defined in src/symple/include/icy/symple/roster.h:47

Public Methods

ReturnNameDescription
Roster
Peer *getByHostReturns the first peer which matches the given host address.
Mappeers constReturns a deep copy of the peer map.
voidprint const
constchar *className virtual const inline

Roster

Roster()

Defined in src/symple/include/icy/symple/roster.h:32


getByHost

Peer * getByHost(std::string_view host)

Defined in src/symple/include/icy/symple/roster.h:36

Returns the first peer which matches the given host address.


peers

const

Map peers() const

Defined in src/symple/include/icy/symple/roster.h:39

Returns a deep copy of the peer map.


print

const

void print(std::ostream & os) const

Defined in src/symple/include/icy/symple/roster.h:41


className

virtual const inline

virtual inline constchar * className() const

Defined in src/symple/include/icy/symple/roster.h:43

Protected Methods

ReturnNameDescription
voidonAdd inline override
voidonRemove inline override

onAdd

inline override

inline void onAdd(const std::string &, Peer * peer) override

Defined in src/symple/include/icy/symple/roster.h:50


onRemove

inline override

inline void onRemove(const std::string &, Peer * peer) override

Defined in src/symple/include/icy/symple/roster.h:51