Plaquette
 
Loading...
Searching...
No Matches
Plaquette.h
1/*
2 * Plaquette.h
3 *
4 * (c) 2015 Sofian Audry :: info(@)sofianaudry(.)com
5 * (c) 2015 Thomas O Fredericks :: tof(@)t-o-f(.)info
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20#ifndef PLAQUETTE_H_
21#define PLAQUETTE_H_
22
23#include "PlaquetteLib.h"
24#include "PlaquetteSketch.h"
25
26// Use namespace.
27using namespace pq;
28
29// Plaquette redefines setup() and loop() based on begin() and step().
30void setup() {
31 prepare();
32 Plaquette.preBegin();
33 begin();
34 Plaquette.postBegin();
35}
36
37void loop() {
38 if (Plaquette.timeStep()) {
39 Plaquette.preStep();
40 step();
41 }
42}
43
44#endif
void preStep()
Updates all components (calls step() on all of them).
Definition PqCore.h:748
bool timeStep()
Performs additional tasks after the class to step().
Definition PqCore.h:758
void postBegin()
Performs additional tasks after the class to begin().
Definition PqCore.cpp:79
void preBegin()
Initializes all components (calls begin() on all of them).
Definition PqCore.cpp:56