|
Sen API
Sen Libraries
|
A list of objects that is managed by some source based on user-expressed interests. More...
#include <object_list.h>
Classes | |
| struct | Iterators |
Public Types | |
| enum class | SearchMode { includeSubClasses , ignoreSubClasses } |
| How to search for objects. More... | |
| using | TypedObjectList = std::list<T*> |
| using | UntypedObjectList = std::list<std::shared_ptr<Object>> |
| using | Callback = std::function<void(const Iterators& iterators)> |
Public Member Functions | |
| ObjectList (std::size_t sizeHint=defaultListSizeHint) | |
| The sizeHint reserves space the internal containers to prevent memory reallocation in the initial iterations. Passes the remaining arguments to the imp::Subscriber constructor. | |
| ObjectList (ObjectProvider &provider, std::size_t sizeHint) | |
| Automatically adds itself as a listener to the provider. | |
| ~ObjectList () override=default | |
| Callback | onAdded (Callback &&function) noexcept |
| Installs a function to be called when objects are added / discovered. This function will be called during drainInputs(). Replaces any previously-installed function. | |
| Callback | onRemoved (Callback &&function) noexcept |
| Installs a function to be called when objects are added / discovered. This function will be called during drainInputs(). Replaces any previously-installed function. | |
| const std::list< T * > & | getObjects () const noexcept |
| Gets the list of currently-registered objects. | |
| const std::list< std::shared_ptr< Object > > & | getUntypedObjects () const noexcept |
| Gets the list of currently-registered objects. | |
| virtual kernel::impl::RemoteParticipant * | isRemoteParticipant () noexcept |
| virtual kernel::impl::LocalParticipant * | isLocalParticipant () noexcept |
Static Public Attributes | |
| static constexpr std::size_t | defaultListSizeHint = 10U |
Protected Member Functions | |
| void | onObjectsAdded (const ObjectAdditionList &additions) override |
| Called when objects are been added to a source. | |
| void | onObjectsRemoved (const ObjectRemovalList &removals) override |
| Called when objects will be removed from a source. | |
A list of objects that is managed by some source based on user-expressed interests.
| struct sen::ObjectList::Iterators |
| using sen::ObjectList< T >::TypedObjectList = std::list<T*> |
| using sen::ObjectList< T >::UntypedObjectList = std::list<std::shared_ptr<Object>> |
| using sen::ObjectList< T >::Callback = std::function<void(const Iterators& iterators)> |
|
strong |
|
inlineexplicit |
The sizeHint reserves space the internal containers to prevent memory reallocation in the initial iterations. Passes the remaining arguments to the imp::Subscriber constructor.
|
inline |
Automatically adds itself as a listener to the provider.
|
overridedefault |
|
inlinenodiscardnoexcept |
Installs a function to be called when objects are added / discovered. This function will be called during drainInputs(). Replaces any previously-installed function.
|
inlinenodiscardnoexcept |
Installs a function to be called when objects are added / discovered. This function will be called during drainInputs(). Replaces any previously-installed function.
|
inlinenodiscardnoexcept |
Gets the list of currently-registered objects.
|
inlinenodiscardnoexcept |
Gets the list of currently-registered objects.
|
inlineoverrideprotectedvirtual |
Called when objects are been added to a source.
Implements sen::ObjectProviderListener.
|
inlineoverrideprotectedvirtual |
Called when objects will be removed from a source.
Implements sen::ObjectProviderListener.
|
nodiscardvirtualnoexceptinherited |
|
nodiscardvirtualnoexceptinherited |
|
staticconstexpr |