The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Macros | Functions | Variables
conditional_wml.cpp File Reference

Implementations of conditional action WML tags. More...

#include "game_events/conditional_wml.hpp"
#include "config.hpp"
#include "game_board.hpp"
#include "game_data.hpp"
#include "log.hpp"
#include "recall_list_manager.hpp"
#include "resources.hpp"
#include "scripting/game_lua_kernel.hpp"
#include "serialization/string_utils.hpp"
#include "team.hpp"
#include "terrain/filter.hpp"
#include "units/unit.hpp"
#include "units/filter.hpp"
#include "units/map.hpp"
#include "variable.hpp"
Include dependency graph for conditional_wml.cpp:

Go to the source code of this file.

Namespaces

 game_events
 Domain specific events.
 
 game_events::builtin_conditions
 

Macros

#define WRN_NG   LOG_STREAM(warn, log_engine)
 
#define TEST_STR_ATTR(name, test)
 
#define TEST_NUM_ATTR(name, test)
 
#define TEST_BOL_ATTR(name, test)
 

Functions

bool game_events::builtin_conditions::have_unit (const vconfig &cfg)
 
bool game_events::builtin_conditions::have_location (const vconfig &cfg)
 
bool game_events::builtin_conditions::variable_matches (const vconfig &values)
 
bool game_events::conditional_passed (const vconfig &cond)
 
bool game_events::matches_special_filter (const config &cfg, const vconfig &filter)
 

Variables

static lg::log_domain log_engine ("engine")
 
std::vector< std::pair< int,
int > > 
game_events::builtin_conditions::default_counts = utils::parse_ranges("1-99999")
 

Detailed Description

Implementations of conditional action WML tags.

Definition in file conditional_wml.cpp.

Macro Definition Documentation

#define TEST_BOL_ATTR (   name,
  test 
)
Value:
do { \
if (values.has_attribute(name)) { \
bool attr_bool = values[name].to_bool(); \
bool bool_value = value.to_bool(); \
if (!(test)) return false; \
} \
} while (0)
if(win_locale=="af") win_locale
static const char * name(const std::vector< SDL_Joystick * > &joysticks, const size_t index)
Definition: joystick.cpp:48

Referenced by game_events::builtin_conditions::variable_matches().

#define TEST_NUM_ATTR (   name,
  test 
)
Value:
do { \
if (values.has_attribute(name)) { \
double attr_num = values[name].to_double(); \
double num_value = value.to_double(); \
if (!(test)) return false; \
} \
} while (0)
if(win_locale=="af") win_locale
static const char * name(const std::vector< SDL_Joystick * > &joysticks, const size_t index)
Definition: joystick.cpp:48

Referenced by game_events::builtin_conditions::variable_matches().

#define TEST_STR_ATTR (   name,
  test 
)
Value:
do { \
if (values.has_attribute(name)) { \
std::string attr_str = values[name].str(); \
std::string str_value = value.str(); \
if (!(test)) return false; \
} \
} while (0)
std::vector< char_t > string
if(win_locale=="af") win_locale
static const char * name(const std::vector< SDL_Joystick * > &joysticks, const size_t index)
Definition: joystick.cpp:48

Referenced by game_events::builtin_conditions::variable_matches().

#define WRN_NG   LOG_STREAM(warn, log_engine)

Definition at line 38 of file conditional_wml.cpp.

Referenced by game_events::matches_special_filter().

Variable Documentation

lg::log_domain log_engine("engine")
static