Sleeping Wombat GUI  0.100
swGUI
Public Types | Public Member Functions | Private Attributes | List of all members
sw::gui::DelegatesContainer< EventArgType > Class Template Reference

Derived template class for delegates. More...

#include <DelegateContainer.h>

Inheritance diagram for sw::gui::DelegatesContainer< EventArgType >:
sw::gui::DelegatesContainerBase

Public Types

typedef EventDelegate< EventArgType > DelegateType
 

Public Member Functions

 DelegatesContainer (EventType type)
 
virtual ~DelegatesContainer ()=default
 
void operator+= (DelegateType delegate)
 
void AddDelegate (DelegateType delegate)
 
bool RemoveDelegate (DelegateType delegate)
 
bool Exists (DelegateType delegate)
 
bool IsEmpty () const
 
virtual void CallDelegates (UIElement *sender, IEventArgs *arguments) override
 Invokes delegates functions. More...
 
- Public Member Functions inherited from sw::gui::DelegatesContainerBase
 DelegatesContainerBase (EventType eventID)
 
virtual ~DelegatesContainerBase ()=default
 
EventType GetEventType ()
 Call this function to check event type holded by derived class. More...
 
DelegatesContainerBaseGetNextContainer ()
 Gets next element on linked list. More...
 
void AddContainer (DelegatesContainerBaseOPtr &&container)
 Adds container on the end of list. More...
 
void RemoveNext ()
 Removed element following this object. More...
 
DelegatesContainerBaseOPtr StealRestOfList ()
 Steal list following this. More...
 

Private Attributes

std::vector< DelegateTypem_delegates
 Delegates for EventType defined in DelegatesContainerBase. More...
 

Detailed Description

template<typename EventArgType>
class sw::gui::DelegatesContainer< EventArgType >

Derived template class for delegates.

Check description in DelegatesContainerBase.

Member Typedef Documentation

template<typename EventArgType>
typedef EventDelegate< EventArgType > sw::gui::DelegatesContainer< EventArgType >::DelegateType

Constructor & Destructor Documentation

template<typename EventArgType >
sw::gui::DelegatesContainer< EventArgType >::DelegatesContainer ( EventType  type)
inlineexplicit
template<typename EventArgType>
virtual sw::gui::DelegatesContainer< EventArgType >::~DelegatesContainer ( )
virtualdefault

Member Function Documentation

template<typename EventArgType>
void sw::gui::DelegatesContainer< EventArgType >::AddDelegate ( DelegateType  delegate)
inline
template<typename EventArgType >
void sw::gui::DelegatesContainer< EventArgType >::CallDelegates ( UIElement sender,
IEventArgs arguments 
)
inlineoverridevirtual

Invokes delegates functions.

Implements sw::gui::DelegatesContainerBase.

template<typename EventArgType>
bool sw::gui::DelegatesContainer< EventArgType >::Exists ( DelegateType  delegate)
inline
template<typename EventArgType >
bool sw::gui::DelegatesContainer< EventArgType >::IsEmpty ( ) const
inline
template<typename EventArgType>
void sw::gui::DelegatesContainer< EventArgType >::operator+= ( DelegateType  delegate)
inline
template<typename EventArgType>
bool sw::gui::DelegatesContainer< EventArgType >::RemoveDelegate ( DelegateType  delegate)
inline

Member Data Documentation

template<typename EventArgType>
std::vector< DelegateType > sw::gui::DelegatesContainer< EventArgType >::m_delegates
private

Delegates for EventType defined in DelegatesContainerBase.

Todo:
Consider using linked list to minimize memory usage.

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