47 logger->
log1(
"Initializing item field database...");
61 if (!xmlNameEqual(node,
"field"))
75 if (description.empty())
83 if (fields2.find(name) != fields2.end())
86 "Same field name detected in requeted and add groups: %s",
90 if (fields1.find(name) != fields1.end())
93 "Same field name detected: %s",
109 XmlNodeConstPtrConst rootNode = doc.
rootNode();
111 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"itemfields"))
113 logger->
log(
"ItemFieldDb: Error while loading %s!",
120 if (xmlNameEqual(node,
"include"))
128 if (xmlNameEqual(node,
"required"))
130 else if (xmlNameEqual(node,
"add"))
static void loadXmlFile(const std::string &file, const std::string &name, BadgesInfos &arr, const SkipError skipError)
#define loadXmlDir(name, function)
#define reportAlways(...)
std::string getStringValue(const std::string &key) const
void log(const char *const log_text,...)
void log1(const char *const log_text)
void delete_all(Container &c)
static void loadFields(const xmlNodePtr groupNode, ItemFieldInfos &fields1, ItemFieldInfos &fields2)
std::map< std::string, ItemFieldType * > ItemFieldInfos
#define for_each_xml_child_node(var, parent)
void loadXmlFile(const std::string &fileName, const SkipError skipError)
const ItemFieldInfos & getRequiredFields()
const ItemFieldInfos & getAddFields()
std::string langProperty(const xmlNodePtr node, const char *const name, const std::string &def)
bool getBoolProperty(const xmlNodePtr node, const char *const name, const bool def)
int getProperty(const xmlNodePtr node, const char *const name, int def)
ItemFieldInfos mRequiredInfos
const bool SkipError_false
const bool SkipError_true
const bool UseVirtFs_true