config_adapter.cpp File Reference

Construct objects like 'team' or 'unit' out of WML-based config-infos. More...

#include "global.hpp"
#include <sstream>
#include "config_adapter.hpp"
#include "game_errors.hpp"
#include "game_preferences.hpp"
#include "gamestatus.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "team.hpp"
#include "wml_exception.hpp"

Include dependency graph for config_adapter.cpp:

Go to the source code of this file.

Defines

#define LOG_NG   LOG_STREAM(info, engine)
#define ERR_NG   LOG_STREAM(err, engine)

Functions

std::string get_unique_saveid (const config &cfg, std::set< std::string > &seen_save_ids)
void get_player_info (const config &cfg, game_state &gamestate, std::string save_id, std::vector< team > &teams, const config &level, gamemap &map, unit_map &units, gamestatus &game_status, bool snapshot, bool replay)
int get_first_human_team (const config::child_list::const_iterator &cfg, const config::child_list &unit_cfg)
const configget_theme (const config &game_config, std::string theme_name)
 Return NULL if theme is not found.


Detailed Description

Construct objects like 'team' or 'unit' out of WML-based config-infos.

Definition in file config_adapter.cpp.


Define Documentation

#define ERR_NG   LOG_STREAM(err, engine)

Definition at line 32 of file config_adapter.cpp.

#define LOG_NG   LOG_STREAM(info, engine)

Definition at line 31 of file config_adapter.cpp.


Function Documentation

int get_first_human_team ( const config::child_list::const_iterator &  cfg,
const config::child_list unit_cfg 
)

Definition at line 222 of file config_adapter.cpp.

References preferences::client_type(), controller, and preferences::login().

Referenced by play_controller::init().

void get_player_info ( const config cfg,
game_state gamestate,
std::string  save_id,
std::vector< team > &  teams,
const config level,
gamemap map,
unit_map units,
gamestatus game_status,
bool  snapshot,
bool  replay 
)

const config* get_theme ( const config game_config,
std::string  theme_name 
)

Return NULL if theme is not found.

Definition at line 234 of file config_adapter.cpp.

References config::find_child(), and preferences::theme().

Referenced by play_controller::init(), and replay_controller::rebuild_replay_theme().

std::string get_unique_saveid ( const config cfg,
std::set< std::string > &  seen_save_ids 
)

Definition at line 34 of file config_adapter.cpp.

Referenced by play_controller::init().


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs