The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
debugger_fwd.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2017 by Yurii Chernyi <terraninfo@terraninfo.net>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * @file
17  * Formula debugger - forward declaration and add_debug_info static function
18  * */
19 
20 
21 #include "formula/debugger_fwd.hpp"
22 #include "formula/debugger.hpp"
23 
24 namespace wfl {
25 
26 formula_debugger* add_debug_info(formula_debugger *fdb, int arg_number, const std::string& f_name)
27 {
28  if (fdb==nullptr) {
29  return nullptr;
30  }
31  fdb->add_debug_info(arg_number,f_name);
32  return fdb;
33 }
34 
35 
37 {
38  return fdb.evaluate_arg_callback(expression,variables);
39 }
40 
41 
43 {
44  return fdb.evaluate_formula_callback(f,variables);
45 }
46 
47 
49 {
50  return fdb.evaluate_formula_callback(f);
51 }
52 
53 
54 } // end of namespace wfl
std::vector< char_t > string
void add_debug_info(int arg_number, const std::string &f_name)
Definition: debugger.cpp:116
Formula AI debugger.
formula_debugger * add_debug_info(formula_debugger *fdb, int arg_number, const std::string &f_name)
Formula AI debugger, forward.
variant evaluate_arg_callback(const formula_expression &expression, const formula_callable &variables)
Definition: debugger.cpp:194
variant evaluate_arg_callback(formula_debugger &fdb, const formula_expression &expression, const formula_callable &variables)
variant evaluate_formula_callback(formula_debugger &fdb, const formula &f, const formula_callable &variables)
variant evaluate_formula_callback(const formula &f, const formula_callable &variables)
Definition: debugger.cpp:209
#define f
Definition: contexts.hpp:42