PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
Globals.h
Go to the documentation of this file.
1//* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
3// Name: apps/Globals.h
4// Purpose: Definitions (should be renamed.)
5// Author: Shane T. Mueller, Ph.D.
6// Copyright: (c) 2004-2026 Shane T. Mueller <smueller@obereed.net>
7// License: GPL 2
8//
9//
10//
11// This file is part of the PEBL project.
12//
13// PEBL is free software; you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation; either version 2 of the License, or
16// (at your option) any later version.
17//
18// PEBL is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU General Public License for more details.
22//
23// You should have received a copy of the GNU General Public License
24// along with PEBL; if not, write to the Free Software
25// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27#ifndef __GLOBALS_H__
28#define __GLOBALS_H__
29
30//
31// EVALUATOR ARCHITECTURE SELECTION:
32//
33// PEBL has two evaluator implementations:
34//
35// 1. RECURSIVE (Evaluator.cpp): Uses C++ call stack recursion.
36// - Works correctly on native builds
37// - Has hard recursion depth limit of 1 on Emscripten with Asyncify
38// - Crashes at depth >= 2 with "index out of bounds"
39//
40// 2. ITERATIVE (Evaluator-es.cpp): Uses manual stack management.
41// - Required for Emscripten builds to handle recursion correctly
42// - Uses explicit mNodeStack and mStack instead of C++ call stack
43// - Compatible with Asyncify call stack transformations
44// - Handles arbitrary recursion depth on all platforms
45//
46// The PEBL_ITERATIVE_EVAL macro controls which evaluator is included.
47// For Emscripten builds (em target), this macro MUST be defined in CXXFLAGS.
48//
49
50#ifdef PEBL_ITERATIVE_EVAL
51#include "../base/Evaluator-es.h"
52#else
53#include "../base/Evaluator.h"
54#endif
55
56
67
68enum PEBLVideoDepth: unsigned int
69 {
70 PVD_2 = 2,
71 PVD_15 = 15,
72 PVD_16 = 16,
73 PVD_24 = 24,
74 PVD_32 = 32
75 };
76
77extern Evaluator * myEval;
78
79
80//extern PEventLoop * gEventLoop; //Make the event loop global so we can
81 //write an async version.
82#endif
PEBLVideoDepth
Definition Globals.h:69
@ PVD_15
Definition Globals.h:71
@ PVD_32
Definition Globals.h:74
@ PVD_2
Definition Globals.h:70
@ PVD_24
Definition Globals.h:73
@ PVD_16
Definition Globals.h:72
PEBLVideoMode
Definition Globals.h:58
@ PVM_640_480
Definition Globals.h:60
@ PVM_960_720
Definition Globals.h:62
@ PVM_800_600
Definition Globals.h:61
@ PVM_1152_864
Definition Globals.h:64
@ PVM_512_384
Definition Globals.h:59
@ PVM_1024_768
Definition Globals.h:63
@ PVM_1280_1024
Definition Globals.h:65
Evaluator * myEval
Definition PEBL.cpp:188
This class has got everything you need to evaluate stuff.