Nui
Public Member Functions | Protected Attributes | List of all members
Nui::ObservedBase Class Reference

#include <observed_value.hpp>

Inheritance diagram for Nui::ObservedBase:
Inheritance graph
[legend]
Collaboration diagram for Nui::ObservedBase:
Collaboration graph
[legend]

Public Member Functions

 ObservedBase (CustomEventContextFlag_t, EventContext *ctx)
 
virtual ~ObservedBase ()=default
 
 ObservedBase (ObservedBase const &)=delete
 
 ObservedBase (ObservedBase &&other)
 
ObservedBaseoperator= (ObservedBase const &)=delete
 
ObservedBaseoperator= (ObservedBase &&other)
 
void attachEvent (EventContext::EventIdType eventId) const
 
void attachOneshotEvent (EventContext::EventIdType eventId) const
 
void detachEvent (EventContext::EventIdType eventId) const
 
std::size_t attachedEventCount () const
 
std::size_t attachedOneshotEventCount () const
 
std::size_t totalAttachedEventCount () const
 
void detachAllEvents ()
 You should never need to do this. More...
 
virtual void update (bool=false) const
 
void updateNow (bool force=false) const
 

Protected Attributes

EventContexteventContext_
 
std::vector< EventContext::EventIdTypeattachedEvents_
 
std::vector< EventContext::EventIdTypeattachedOneshotEvents_
 

Constructor & Destructor Documentation

◆ ObservedBase() [1/3]

Nui::ObservedBase::ObservedBase ( CustomEventContextFlag_t  ,
EventContext ctx 
)
inlineexplicit

◆ ~ObservedBase()

virtual Nui::ObservedBase::~ObservedBase ( )
virtualdefault

◆ ObservedBase() [2/3]

Nui::ObservedBase::ObservedBase ( ObservedBase const &  )
delete

◆ ObservedBase() [3/3]

Nui::ObservedBase::ObservedBase ( ObservedBase &&  other)
inline

Member Function Documentation

◆ attachedEventCount()

std::size_t Nui::ObservedBase::attachedEventCount ( ) const
inline

◆ attachedOneshotEventCount()

std::size_t Nui::ObservedBase::attachedOneshotEventCount ( ) const
inline

◆ attachEvent()

void Nui::ObservedBase::attachEvent ( EventContext::EventIdType  eventId) const
inline

◆ attachOneshotEvent()

void Nui::ObservedBase::attachOneshotEvent ( EventContext::EventIdType  eventId) const
inline

◆ detachAllEvents()

void Nui::ObservedBase::detachAllEvents ( )
inline

You should never need to do this.

◆ detachEvent()

void Nui::ObservedBase::detachEvent ( EventContext::EventIdType  eventId) const
inline

◆ operator=() [1/2]

ObservedBase& Nui::ObservedBase::operator= ( ObservedBase &&  other)
inline

◆ operator=() [2/2]

ObservedBase& Nui::ObservedBase::operator= ( ObservedBase const &  )
delete

◆ totalAttachedEventCount()

std::size_t Nui::ObservedBase::totalAttachedEventCount ( ) const
inline

◆ update()

virtual void Nui::ObservedBase::update ( bool  = false) const
inlinevirtual

◆ updateNow()

void Nui::ObservedBase::updateNow ( bool  force = false) const
inline

Member Data Documentation

◆ attachedEvents_

std::vector<EventContext::EventIdType> Nui::ObservedBase::attachedEvents_
mutableprotected

◆ attachedOneshotEvents_

std::vector<EventContext::EventIdType> Nui::ObservedBase::attachedOneshotEvents_
mutableprotected

◆ eventContext_

EventContext* Nui::ObservedBase::eventContext_
protected

The documentation for this class was generated from the following file: