stmm-input-doc  0.17.0
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
stmi::Accessor Class Referenceabstract

A generic class that helps a device manager to generate events. More...

Inheritance diagram for stmi::Accessor:
Inheritance graph
[legend]

Public Member Functions

virtual ~Accessor () noexcept=default
 
virtual bool operator== (const Accessor &oOther) const noexcept=0
 Accessor comparison. More...
 

Static Public Attributes

static const shared_ptr< Accessors_refEmptyAccessor
 

Protected Member Functions

 Accessor () noexcept=default
 

Detailed Description

A generic class that helps a device manager to generate events.

Subclass Accessor for system specific access to devices and/or subsets of event sources. The subclass has to make sure no reference cycles are created which lead to memory leaks.

Example: within the GTK environment a device manager supporting pointer devices uses the subclass GtkAccessor, which holds a (weak) reference to a Gtk::Window. This allows it to listen to pointer events generated in the specified window.

Constructor & Destructor Documentation

◆ ~Accessor()

virtual stmi::Accessor::~Accessor ( )
virtualdefaultnoexcept

◆ Accessor()

stmi::Accessor::Accessor ( )
protecteddefaultnoexcept

Member Function Documentation

◆ operator==()

virtual bool stmi::Accessor::operator== ( const Accessor oOther) const
pure virtualnoexcept

Accessor comparison.

Needed to identify accessors and remove them.

Implemented in stmi::GtkAccessor.

Member Data Documentation

◆ s_refEmptyAccessor

const shared_ptr<Accessor> stmi::Accessor::s_refEmptyAccessor
static