The Battle for Wesnoth  1.19.0-dev
debugger_fwd.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2024
3  by Yurii Chernyi <terraninfo@terraninfo.net>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
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 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 /**
17  * @file
18  * Formula debugger - forward declaration and add_debug_info static function
19  * */
20 
21 
22 #include "formula/debugger_fwd.hpp"
23 #include "formula/debugger.hpp"
24 
25 namespace wfl {
26 
27 formula_debugger* add_debug_info(formula_debugger *fdb, int arg_number, const std::string& f_name)
28 {
29  if (fdb==nullptr) {
30  return nullptr;
31  }
32  fdb->add_debug_info(arg_number,f_name);
33  return fdb;
34 }
35 
36 
38 {
39  return fdb.evaluate_arg_callback(expression,variables);
40 }
41 
42 
44 {
45  return fdb.evaluate_formula_callback(f,variables);
46 }
47 
48 
50 {
51  return fdb.evaluate_formula_callback(f);
52 }
53 
54 
55 } // end of namespace wfl
void add_debug_info(int arg_number, const std::string &f_name)
Definition: debugger.cpp:115
variant evaluate_formula_callback(const formula &f, const formula_callable &variables)
Definition: debugger.cpp:207
variant evaluate_arg_callback(const formula_expression &expression, const formula_callable &variables)
Definition: debugger.cpp:192
Formula AI debugger.
Formula AI debugger, forward.
Definition: contexts.hpp:43
formula_debugger * add_debug_info(formula_debugger *fdb, int arg_number, const std::string &f_name)
variant evaluate_formula_callback(formula_debugger &fdb, const formula &f, const formula_callable &variables)
variant evaluate_arg_callback(formula_debugger &fdb, const formula_expression &expression, const formula_callable &variables)
#define f