Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::StaticSustain Class Reference

Implements a class to hook a static function to the global main thread sustain call. More...

#include <Sustain.h>

Inheritance diagram for sf::StaticSustain:
Collaboration diagram for sf::StaticSustain:

Public Types

typedef bool(* Pf) (const timespec &)
 Required type for the callback function.
 
- Public Types inherited from sf::SustainBase
enum  ESustainPriority : int { spDefault = 100 , spTimer = std::numeric_limits<int>::max() }
 Do not use an iterator because the sustain function could affect the vector itself. More...
 
typedef TVector< SustainBase * > PtrVector
 

Public Member Functions

 StaticSustain (Pf pf, int priority=spDefault, PtrVector *vector=_defaultVector)
 One and only constructor.
 
 StaticSustain (const StaticSustain &)=delete
 Prevent copying.
 
StaticSustainoperator= (const StaticSustain &)=delete
 Prevent copying.
 
- Public Member Functions inherited from sf::SustainBase
 SustainBase (const SustainBase &)=delete
 Prevent copying.
 
SustainBaseoperator= (const SustainBase &)=delete
 Prevent copying.
 
int getPriority () const
 Gets the priority value of this instance;.
 
void setInterval (const timespec &interval)
 Sets the interval at which the hooked function is called. This is only valid when the priority for this entry is spTimer.
 
const timespec & getInterval () const
 Gets the interval at which the hooked function is called.
 
void enable ()
 Enables this entry.
 
void disable ()
 Disables this entry.
 
bool isEnabled () const
 Returns if the entry is enabled or not.
 

Additional Inherited Members

- Static Public Member Functions inherited from sf::SustainBase
static void flushVector (PtrVector *vector)
 Flushes the vector and clears all Vector member of all entries first.
 
static void callSustain (PtrVector *vector=nullptr)
 Calls all sustain table entry functions in the vector passed. The default is the static default vector.
 
- Protected Member Functions inherited from sf::SustainBase
 SustainBase (PtrVector *vector, int priority)
 Default Constructor adding itself to the passed vector. If the passed vector is NULL the default vector is selected.
 
 ~SustainBase ()
 oes not have to be virtual because this base class is not used must always be derived.
 
- Protected Attributes inherited from sf::SustainBase
int _priority
 Data member holing priority.
 
PtrVector_list
 Vector where this entry is part of.
 
IntervalTimer _timer
 Timer for when priority spTimer has been set.
 
- Static Protected Attributes inherited from sf::SustainBase
static PtrVector_defaultVector
 Pointer to the default vector which is automatically created when.
 

Detailed Description

Implements a class to hook a static function to the global main thread sustain call.

Member Typedef Documentation

◆ Pf

typedef bool(* sf::StaticSustain::Pf) (const timespec &)

Required type for the callback function.

Constructor & Destructor Documentation

◆ StaticSustain() [1/2]

sf::StaticSustain::StaticSustain ( Pf  pf,
int  priority = spDefault,
PtrVector vector = _defaultVector 
)
inlineexplicit

One and only constructor.

Parameters
pf
priority
vector

◆ StaticSustain() [2/2]

sf::StaticSustain::StaticSustain ( const StaticSustain )
delete

Prevent copying.

Member Function Documentation

◆ operator=()

StaticSustain & sf::StaticSustain::operator= ( const StaticSustain )
delete

Prevent copying.


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