#include <info.hpp>

Public Member Functions | |
| addon_info () | |
| addon_info (const config &cfg) | |
| addon_info & | operator= (const addon_info &o) |
| void | read (const config &cfg) |
| void | write (config &cfg) const |
| void | write_minimal (config &cfg) const |
| Write only minimal WML used for state tracking (_info.cfg) files. | |
| std::string | display_title () const |
| Get a title or automatic title for display. | |
| std::string | display_icon () const |
| Get an icon path fixed for display (e.g. | |
| std::string | display_type () const |
| Get an add-on type identifier for display in the user's language. | |
| std::set< std::string > | resolve_dependencies (const addons_list &addons) const |
| Resolve an add-on's dependency tree in a recursive fashion. | |
Public Attributes | |
| std::string | id |
| std::string | title |
| std::string | description |
| std::string | icon |
| version_info | version |
| std::string | author |
| int | size |
| int | downloads |
| int | uploads |
| ADDON_TYPE | type |
| std::vector< std::string > | locales |
| std::vector< std::string > | depends |
Definition at line 29 of file info.hpp.
| addon_info::addon_info | ( | const config & | cfg | ) | [inline, explicit] |
| std::string addon_info::display_icon | ( | ) | const |
Get an icon path fixed for display (e.g.
when TC is missing, or the image doesn't exist).
Definition at line 123 of file info.cpp.
References game_config::debug, ERR_AC, image::exists(), icon, LOG_AC, and game_config::images::missing.

| std::string addon_info::display_title | ( | ) | const |
Get a title or automatic title for display.
If the real title is empty, the returned value is the id with underscores replaced with blanks.
Definition at line 114 of file info.cpp.
References make_addon_title(), and title.

| std::string addon_info::display_type | ( | ) | const |
Get an add-on type identifier for display in the user's language.
Definition at line 144 of file info.cpp.
References _, ADDON_MEDIA, ADDON_MP_CAMPAIGN, ADDON_MP_ERA, ADDON_MP_FACTION, ADDON_MP_MAPS, ADDON_MP_SCENARIO, ADDON_OTHER, ADDON_SP_CAMPAIGN, ADDON_SP_SCENARIO, and type.
| addon_info& addon_info::operator= | ( | const addon_info & | o | ) | [inline] |
| void addon_info::read | ( | const config & | cfg | ) |
Definition at line 65 of file info.cpp.
References author, config::child_range(), depends, description, downloads, get_addon_type(), icon, locales, size, utils::split(), title, type, uploads, and version.
Referenced by addon_info().


| std::set< std::string > addon_info::resolve_dependencies | ( | const addons_list & | addons | ) | const |
Resolve an add-on's dependency tree in a recursive fashion.
The returned vector contains the list of resolved dependencies for this and any other add-ons upon which it depends.
| addons | The add-ons list. |
Definition at line 170 of file info.cpp.
References ERR_AC.
| void addon_info::write | ( | config & | cfg | ) | const |
Definition at line 87 of file info.cpp.
References config::add_child(), author, depends, description, downloads, get_addon_type_string(), icon, id, utils::join(), locales, size, version_info::str(), title, type, uploads, and version.

| void addon_info::write_minimal | ( | config & | cfg | ) | const |
Write only minimal WML used for state tracking (_info.cfg) files.
This currently only includes the add-on type, upload count, and version number.
| cfg | Target WML config object. |
Definition at line 107 of file info.cpp.
References get_addon_type_string(), version_info::str(), type, uploads, and version.
Referenced by addons_client::install_addon().


| std::string addon_info::author |
Definition at line 39 of file info.hpp.
Referenced by operator=(), read(), and write().
| std::vector<std::string> addon_info::depends |
Definition at line 49 of file info.hpp.
Referenced by operator=(), read(), and write().
| std::string addon_info::description |
Definition at line 33 of file info.hpp.
Referenced by operator=(), read(), and write().
Definition at line 42 of file info.hpp.
Referenced by operator=(), read(), and write().
| std::string addon_info::icon |
Definition at line 35 of file info.hpp.
Referenced by display_icon(), operator=(), read(), and write().
| std::string addon_info::id |
Definition at line 31 of file info.hpp.
Referenced by get_addon_tracking_info(), addons_client::install_addon(), operator=(), and write().
| std::vector<std::string> addon_info::locales |
Definition at line 47 of file info.hpp.
Referenced by operator=(), read(), and write().
| int addon_info::size |
Definition at line 41 of file info.hpp.
Referenced by operator=(), read(), and write().
| std::string addon_info::title |
Definition at line 32 of file info.hpp.
Referenced by display_title(), addons_client::install_addon(), operator=(), read(), and write().
Definition at line 45 of file info.hpp.
Referenced by display_type(), operator=(), read(), write(), and write_minimal().
Definition at line 43 of file info.hpp.
Referenced by operator=(), read(), write(), and write_minimal().
Definition at line 37 of file info.hpp.
Referenced by get_addon_tracking_info(), operator=(), read(), write(), and write_minimal().
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:11:23 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |