|
Sen API
Sen Libraries
|
Object references may or may not hold an object instance. Their value is set by a provider based on some defined interest which was given during construction. More...
#include <object_ref.h>
Public Types | |
| using | Callback = std::function<void()> |
Public Member Functions | |
| ObjectRef ()=default | |
| ~ObjectRef () override=default | |
| bool | valid () const noexcept |
| True if the reference holds a valid pointer to an instance. | |
| operator bool () const noexcept | |
| True if the reference holds a valid pointer to an instance. | |
| T * | operator-> () noexcept |
| Access the internal instance. | |
| const T * | operator-> () const noexcept |
| Access the internal instance. | |
| T & | get () noexcept |
| Access the internal instance. | |
| const T & | get () const noexcept |
| Access the internal instance. | |
| Callback | onAdded (Callback &&function) noexcept |
| Installs a function to be called when objects are added / discovered. Replaces any previously-installed function. | |
| Callback | onRemoved (Callback &&function) noexcept |
| Installs a function to be called when objects are added / discovered. Replaces any previously-installed function. | |
| virtual kernel::impl::RemoteParticipant * | isRemoteParticipant () noexcept |
| virtual kernel::impl::LocalParticipant * | isLocalParticipant () noexcept |
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. | |
Object references may or may not hold an object instance. Their value is set by a provider based on some defined interest which was given during construction.
Methods of this class are thread-safe.
| using sen::ObjectRef< T >::Callback = std::function<void()> |
|
default |
|
overridedefault |
|
inlinenodiscardnoexcept |
True if the reference holds a valid pointer to an instance.
|
inlinenodiscardnoexcept |
True if the reference holds a valid pointer to an instance.
|
inlinenodiscardnoexcept |
Access the internal instance.
|
inlinenodiscardnoexcept |
Access the internal instance.
|
inlinenodiscardnoexcept |
Access the internal instance.
|
inlinenodiscardnoexcept |
Access the internal instance.
|
inlinenoexcept |
Installs a function to be called when objects are added / discovered. Replaces any previously-installed function.
|
inlinenoexcept |
Installs a function to be called when objects are added / discovered. Replaces any previously-installed function.
|
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 |