Plaquette
 
Loading...
Searching...
No Matches
TimeWindowable.h
1/*
2 * TimeWindowable.h
3 *
4 * (c) 2025 Sofian Audry :: info(@)sofianaudry(.)com
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PQ_TIME_WINDOWABLE_H_
21#define PQ_TIME_WINDOWABLE_H_
22
23#include "PqCore.h"
24
25namespace pq {
26
29protected:
32 virtual ~TimeWindowable() {}
33
34public:
36 virtual void infiniteTimeWindow();
37
39 virtual void noTimeWindow();
40
42 virtual void timeWindow(float seconds);
43
45 virtual float timeWindow() const { return _timeWindow; }
46
48 virtual bool timeWindowIsInfinite() const { return _timeWindow == INFINITE_TIME_WINDOW; }
49
51 virtual void cutoff(float hz);
52
54 virtual float cutoff() const;
55
56protected:
57 float _timeWindow;
58};
59
60}
61
62#endif
Abstract class for time-based objects.
Definition TimeWindowable.h:28
virtual float timeWindow() const
Returns the time window (expressed in seconds).
Definition TimeWindowable.h:45
virtual void noTimeWindow()
Sets time window to no time window.
Definition TimeWindowable.cpp:36
virtual float cutoff() const
Returns the time window cutoff frequency (expressed in Hz).
Definition TimeWindowable.cpp:54
virtual void infiniteTimeWindow()
Sets time window to infinite.
Definition TimeWindowable.cpp:32
virtual bool timeWindowIsInfinite() const
Returns true if time window is infinite.
Definition TimeWindowable.h:48