34 const std::string &srcStr)
36 if (!srcStr.empty() && srcStr[0] !=
'-')
37 outStr = std::string(
"+").append(srcStr);
42 static bool readField(ItemFieldInfos::const_iterator it,
44 std::string &combined)
46 const std::string fieldName = (*it).first;
59 if (tokens.size() > 1)
94 reportAlways(
"called readItemStatsString without translator")
98 FOR_EACH (ItemFieldInfos::const_iterator, it, fields)
104 effect.append(
" / ");
105 effect.append(field);
110 XmlNodeConstPtr node,
115 reportAlways(
"called readItemStatsVector without translator")
119 FOR_EACH (ItemFieldInfos::const_iterator, it, fields)
124 effect.push_back(field);
#define reportAlways(...)
const std::string getStr(const std::string &str)
#define FOR_EACH(type, iter, array)
std::map< std::string, ItemFieldType * > ItemFieldInfos
void readItemStatsVector(std::vector< std::string > &effect, const xmlNodePtr node, const ItemFieldInfos &fields)
static bool readField(ItemFieldInfos::const_iterator it, const xmlNodePtr node, std::string &combined)
void readItemStatsString(std::string &effect, const xmlNodePtr node, const ItemFieldInfos &fields)
static void convertSignedValue(std::string &outStr, const std::string &srcStr)
int getProperty(const xmlNodePtr node, const char *const name, int def)
std::string strprintf(const char *const format,...)
void splitToStringVector(StringVect &tokens, const std::string &text, const char separator)
std::vector< std::string > StringVect
const std::string description