Freeciv-3.3
|
#include <menu.h>
Public Member Functions | |
trade_generator () | |
void | add_all_cities () |
void | add_city (struct city *pcity) |
void | add_tile (struct tile *ptile) |
void | calculate () |
void | clear_trade_planing () |
void | remove_city (struct city *pcity) |
void | remove_virtual_city (struct tile *ptile) |
Data Fields | |
bool | hover_city |
QList< qtiles > | lines |
QList< struct city * > | virtual_cities |
QList< trade_city * > | cities |
Private Member Functions | |
bool | discard_any (trade_city *tc, int freeroutes) |
bool | discard_one (trade_city *tc) |
int | find_over_max (struct city *pcity) |
trade_city * | find_most_free () |
void | check_if_done (trade_city *tc1, trade_city *tc2) |
void | discard () |
void | discard_trade (trade_city *tc1, trade_city *tc2) |
void | find_certain_routes () |
void | find_certain_routes_inner (trade_city *tc) |
void | calculate_inner (trade_city *tc) |
trade_generator::trade_generator | ( | ) |
void trade_generator::add_all_cities | ( | ) |
Adds single city to trade generator
Definition at line 127 of file menu.cpp.
Referenced by add_all_cities(), and add_tile().
void trade_generator::calculate | ( | ) |
|
private |
Inner foreach() loop of trade_generator::calculate() Implemented as separate function to avoid shadow warnings about internal variables of foreach() inside foreach()
Definition at line 216 of file menu.cpp.
Referenced by calculate().
|
private |
Marks cities with full trade routes to finish searching
Definition at line 475 of file menu.cpp.
Referenced by discard_trade(), and find_certain_routes_inner().
void trade_generator::clear_trade_planing | ( | ) |
Clears generated routes, virtual cities, cities
Definition at line 107 of file menu.cpp.
Referenced by add_all_cities().
|
private |
Drops all possible trade routes.
Definition at line 345 of file menu.cpp.
Referenced by calculate().
|
private |
|
private |
|
private |
Drops trade routes between given cities
Definition at line 364 of file menu.cpp.
Referenced by discard_any(), and discard_one().
|
private |
Adds routes for cities which can only have maximum possible trade routes
Definition at line 460 of file menu.cpp.
Referenced by calculate().
|
private |
Inner foreach() loop of trade_generator::find_certain_routes() Implemented as separate function to avoid shadow warnings about internal variables of foreach() inside foreach()
Definition at line 425 of file menu.cpp.
Referenced by find_certain_routes().
|
private |
Removes single city from trade generator
Definition at line 172 of file menu.cpp.
Referenced by add_tile().
Removes virtual city from trade generator
Definition at line 190 of file menu.cpp.
Referenced by add_tile().
QList<trade_city*> trade_generator::cities |
Definition at line 182 of file menu.h.
Referenced by add_city(), add_tile(), calculate(), calculate_inner(), clear_trade_planing(), discard_any(), discard_one(), find_certain_routes(), find_certain_routes_inner(), find_most_free(), find_over_max(), remove_city(), and remove_virtual_city().
bool trade_generator::hover_city |
Definition at line 179 of file menu.h.
Referenced by trade_generator().
Definition at line 180 of file menu.h.
Referenced by calculate(), clear_trade_planing(), and find_certain_routes_inner().
Definition at line 181 of file menu.h.
Referenced by add_tile(), clear_trade_planing(), and remove_virtual_city().