The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
wfl::builtins Namespace Reference

Functions

 DEFINE_WFL_FUNCTION (debug, 0, 1)
 
 DEFINE_WFL_FUNCTION (dir, 1, 1)
 
 DEFINE_WFL_FUNCTION (if, 2,-1)
 
 DEFINE_WFL_FUNCTION (switch, 3,-1)
 
 DEFINE_WFL_FUNCTION (abs, 1, 1)
 
 DEFINE_WFL_FUNCTION (min, 1,-1)
 
 DEFINE_WFL_FUNCTION (max, 1,-1)
 
 DEFINE_WFL_FUNCTION (debug_float, 2, 3)
 
 DEFINE_WFL_FUNCTION (debug_print, 1, 2)
 
 DEFINE_WFL_FUNCTION (debug_profile, 1, 2)
 
 DEFINE_WFL_FUNCTION (keys, 1, 1)
 
 DEFINE_WFL_FUNCTION (values, 1, 1)
 
 DEFINE_WFL_FUNCTION (tolist, 1, 1)
 
 DEFINE_WFL_FUNCTION (tomap, 1, 2)
 
 DEFINE_WFL_FUNCTION (substring, 2, 3)
 
 DEFINE_WFL_FUNCTION (replace, 3, 4)
 
 DEFINE_WFL_FUNCTION (insert, 3, 3)
 
 DEFINE_WFL_FUNCTION (length, 1, 1)
 
 DEFINE_WFL_FUNCTION (concatenate, 1,-1)
 
 DEFINE_WFL_FUNCTION (str_upper, 1, 1)
 
 DEFINE_WFL_FUNCTION (str_lower, 1, 1)
 
 DEFINE_WFL_FUNCTION (sin, 1, 1)
 
 DEFINE_WFL_FUNCTION (cos, 1, 1)
 
 DEFINE_WFL_FUNCTION (tan, 1, 1)
 
 DEFINE_WFL_FUNCTION (asin, 1, 1)
 
 DEFINE_WFL_FUNCTION (acos, 1, 1)
 
 DEFINE_WFL_FUNCTION (atan, 1, 1)
 
 DEFINE_WFL_FUNCTION (sqrt, 1, 1)
 
 DEFINE_WFL_FUNCTION (cbrt, 1, 1)
 
 DEFINE_WFL_FUNCTION (root, 2, 2)
 
 DEFINE_WFL_FUNCTION (log, 1, 2)
 
 DEFINE_WFL_FUNCTION (exp, 1, 1)
 
 DEFINE_WFL_FUNCTION (pi, 0, 0)
 
 DEFINE_WFL_FUNCTION (hypot, 2, 2)
 
 DEFINE_WFL_FUNCTION (index_of, 2, 2)
 
 DEFINE_WFL_FUNCTION (choose, 2, 3)
 
 DEFINE_WFL_FUNCTION (wave, 1, 1)
 
 DEFINE_WFL_FUNCTION (sort, 1, 2)
 
 DEFINE_WFL_FUNCTION (reverse, 1, 1)
 
 DEFINE_WFL_FUNCTION (contains_string, 2, 2)
 
 DEFINE_WFL_FUNCTION (find_string, 2, 2)
 
 DEFINE_WFL_FUNCTION (filter, 2, 3)
 
 DEFINE_WFL_FUNCTION (find, 2, 3)
 
 DEFINE_WFL_FUNCTION (map, 2, 3)
 
 DEFINE_WFL_FUNCTION (take_while, 2, 2)
 
 DEFINE_WFL_FUNCTION (zip, 1,-1)
 
 DEFINE_WFL_FUNCTION (reduce, 2, 3)
 
 DEFINE_WFL_FUNCTION (sum, 1, 2)
 
 DEFINE_WFL_FUNCTION (head, 1, 2)
 
 DEFINE_WFL_FUNCTION (tail, 1, 2)
 
 DEFINE_WFL_FUNCTION (size, 1, 1)
 
 DEFINE_WFL_FUNCTION (null, 0,-1)
 
 DEFINE_WFL_FUNCTION (ceil, 1, 1)
 
 DEFINE_WFL_FUNCTION (round, 1, 1)
 
 DEFINE_WFL_FUNCTION (floor, 1, 1)
 
 DEFINE_WFL_FUNCTION (trunc, 1, 1)
 
 DEFINE_WFL_FUNCTION (frac, 1, 1)
 
 DEFINE_WFL_FUNCTION (sgn, 1, 1)
 
 DEFINE_WFL_FUNCTION (as_decimal, 1, 1)
 
 DEFINE_WFL_FUNCTION (loc, 2, 2)
 
 DEFINE_WFL_FUNCTION (pair, 2, 2)
 
 DEFINE_WFL_FUNCTION (distance_between, 2, 2)
 
 DEFINE_WFL_FUNCTION (adjacent_locs, 1, 1)
 
 DEFINE_WFL_FUNCTION (are_adjacent, 2, 2)
 
 DEFINE_WFL_FUNCTION (relative_dir, 2, 2)
 
 DEFINE_WFL_FUNCTION (direction_from, 2, 3)
 
 DEFINE_WFL_FUNCTION (rotate_loc_around, 2, 3)
 
 DEFINE_WFL_FUNCTION (type, 1, 1)
 

Function Documentation

wfl::builtins::DEFINE_WFL_FUNCTION ( debug  ,
,
 
)

Definition at line 83 of file function.cpp.

References wfl::formula_expression::evaluate(), and utf8::size().

wfl::builtins::DEFINE_WFL_FUNCTION ( dir  ,
,
 
)

Definition at line 105 of file function.cpp.

References wfl::variant::as_callable(), i, and wfl::formula_input::name.

wfl::builtins::DEFINE_WFL_FUNCTION ( if  ,
,
1 
)

Definition at line 121 of file function.cpp.

References n, and utf8::size().

wfl::builtins::DEFINE_WFL_FUNCTION ( switch  ,
,
1 
)

Definition at line 136 of file function.cpp.

References n, and utf8::size().

wfl::builtins::DEFINE_WFL_FUNCTION ( abs  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( min  ,
,
1 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( max  ,
,
1 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( debug_float  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( debug_print  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( debug_profile  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( keys  ,
,
 
)

Definition at line 322 of file function.cpp.

References wfl::variant::get_keys().

wfl::builtins::DEFINE_WFL_FUNCTION ( values  ,
,
 
)

Definition at line 328 of file function.cpp.

References wfl::variant::get_values().

wfl::builtins::DEFINE_WFL_FUNCTION ( tolist  ,
,
 
)

Definition at line 334 of file function.cpp.

References wfl::variant::begin(), and wfl::variant::end().

wfl::builtins::DEFINE_WFL_FUNCTION ( tomap  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( substring  ,
,
 
)

Definition at line 380 of file function.cpp.

References utf8::size().

wfl::builtins::DEFINE_WFL_FUNCTION ( replace  ,
,
 
)

Definition at line 411 of file function.cpp.

References utf8::size().

wfl::builtins::DEFINE_WFL_FUNCTION ( insert  ,
,
 
)

Definition at line 443 of file function.cpp.

References utf8::insert().

wfl::builtins::DEFINE_WFL_FUNCTION ( length  ,
,
 
)

Definition at line 462 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( concatenate  ,
,
1 
)

Definition at line 467 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( str_upper  ,
,
 
)

Definition at line 477 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( str_lower  ,
,
 
)

Definition at line 484 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( sin  ,
,
 
)

Definition at line 491 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( cos  ,
,
 
)

Definition at line 498 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( tan  ,
,
 
)

Definition at line 505 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( asin  ,
,
 
)

Definition at line 516 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( acos  ,
,
 
)

Definition at line 527 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( atan  ,
,
 
)

Definition at line 538 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( sqrt  ,
,
 
)

Definition at line 545 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( cbrt  ,
,
 
)

Definition at line 556 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( root  ,
,
 
)

Definition at line 563 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( log  ,
,
 
)

Definition at line 575 of file function.cpp.

References utf8::size().

wfl::builtins::DEFINE_WFL_FUNCTION ( exp  ,
,
 
)

Definition at line 596 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( pi  ,
,
 
)

Definition at line 609 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( hypot  ,
,
 
)

Definition at line 616 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( index_of  ,
,
 
)

Definition at line 623 of file function.cpp.

References i, and wfl::variant::num_elements().

wfl::builtins::DEFINE_WFL_FUNCTION ( choose  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( wave  ,
,
 
)

Definition at line 676 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( sort  ,
,
 
)

Definition at line 726 of file function.cpp.

References n, wfl::variant::num_elements(), utf8::size(), and sort().

wfl::builtins::DEFINE_WFL_FUNCTION ( reverse  ,
,
 
)

Definition at line 746 of file function.cpp.

References wfl::variant::is_list(), wfl::variant::is_string(), and reverse().

wfl::builtins::DEFINE_WFL_FUNCTION ( contains_string  ,
,
 
)

Definition at line 765 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( find_string  ,
,
 
)

Definition at line 773 of file function.cpp.

wfl::builtins::DEFINE_WFL_FUNCTION ( filter  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( find  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( map  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( take_while  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( zip  ,
,
1 
)

Definition at line 966 of file function.cpp.

References i, and output().

wfl::builtins::DEFINE_WFL_FUNCTION ( reduce  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( sum  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( head  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( tail  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( size  ,
,
 
)

Definition at line 1091 of file function.cpp.

References mp_ui_alerts::items, and wfl::variant::num_elements().

wfl::builtins::DEFINE_WFL_FUNCTION ( null  ,
,
1 
)

Definition at line 1097 of file function.cpp.

References i.

wfl::builtins::DEFINE_WFL_FUNCTION ( ceil  ,
,
 
)

Definition at line 1108 of file function.cpp.

References wfl::variant::as_decimal(), and d.

wfl::builtins::DEFINE_WFL_FUNCTION ( round  ,
,
 
)

Definition at line 1122 of file function.cpp.

References wfl::variant::as_decimal(), d, and f.

wfl::builtins::DEFINE_WFL_FUNCTION ( floor  ,
,
 
)

Definition at line 1140 of file function.cpp.

References wfl::variant::as_decimal(), and d.

wfl::builtins::DEFINE_WFL_FUNCTION ( trunc  ,
,
 
)

Definition at line 1154 of file function.cpp.

References wfl::variant::as_int(), and d.

wfl::builtins::DEFINE_WFL_FUNCTION ( frac  ,
,
 
)

Definition at line 1162 of file function.cpp.

References wfl::variant::as_decimal(), and d.

wfl::builtins::DEFINE_WFL_FUNCTION ( sgn  ,
,
 
)

Definition at line 1171 of file function.cpp.

References wfl::variant::as_decimal(), and d.

wfl::builtins::DEFINE_WFL_FUNCTION ( as_decimal  ,
,
 
)

Definition at line 1183 of file function.cpp.

References wfl::variant::as_decimal(), and d.

wfl::builtins::DEFINE_WFL_FUNCTION ( loc  ,
,
 
)

Definition at line 1191 of file function.cpp.

References wfl::add_debug_info().

wfl::builtins::DEFINE_WFL_FUNCTION ( pair  ,
,
 
)

Definition at line 1199 of file function.cpp.

References wfl::add_debug_info().

wfl::builtins::DEFINE_WFL_FUNCTION ( distance_between  ,
,
 
)

Definition at line 1207 of file function.cpp.

References wfl::add_debug_info(), and distance_between().

wfl::builtins::DEFINE_WFL_FUNCTION ( adjacent_locs  ,
,
 
)

Definition at line 1222 of file function.cpp.

References wfl::add_debug_info(), get_adjacent_tiles(), and n.

wfl::builtins::DEFINE_WFL_FUNCTION ( are_adjacent  ,
,
 
)

Definition at line 1240 of file function.cpp.

References wfl::add_debug_info(), and tiles_adjacent().

wfl::builtins::DEFINE_WFL_FUNCTION ( relative_dir  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( direction_from  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( rotate_loc_around  ,
,
 
)
wfl::builtins::DEFINE_WFL_FUNCTION ( type  ,
,
 
)

Definition at line 1306 of file function.cpp.

References wfl::variant::type_string().