15 fw_logs_xml_helper::fw_logs_xml_helper(
string xml_content)
17 _xml_content(xml_content)
79 string root_name(xml_root_node_list->
name(), xml_root_node_list->
name() + xml_root_node_list->
name_size());
82 if (root_name.compare(
"Format") != 0)
110 logs_formating_options->
_fw_logs_event_list.insert(pair<int, fw_log_event>(
id, log_event));
112 else if (res ==
file)
120 else if (res ==
enums)
122 for (
xml_node<>* enum_node = node->
first_node(); enum_node; enum_node = enum_node->next_sibling())
127 if (attr.compare(
"Name") == 0)
132 for (
xml_node<>* enum_value_node = enum_node->
first_node(); enum_value_node; enum_value_node = enum_value_node->next_sibling())
139 if (attr.compare(
"Value") == 0)
143 if (attr.compare(
"Key") == 0)
153 xml_kvp.push_back(std::make_pair(key, value_str));
172 if (
tag.compare(
"Event") == 0)
177 else if (
tag.compare(
"File") == 0)
182 else if (
tag.compare(
"Thread") == 0)
187 else if (
tag.compare(
"Enums") == 0)
200 if (attr.compare(
"Name") == 0)
203 *enum_name = name_attr_str;
218 if (attr.compare(
"Value") == 0)
221 *enum_name = name_attr_str;
236 if (attr.compare(
"id") == 0)
239 *thread_id =
stoi(id_attr_str);
242 else if (attr.compare(
"Name") == 0)
245 *thread_name = name_attr_str;
261 if (attr.compare(
"id") == 0)
264 *file_id =
stoi(id_attr_str);
267 else if (attr.compare(
"Name") == 0)
270 *file_name = name_attr_str;
285 if (attr.compare(
"id") == 0)
288 *event_id =
stoi(id_attr_str);
291 else if (attr.compare(
"numberOfArguments") == 0)
294 *num_of_params =
stoi(num_of_args_attr_str);
297 else if (attr.compare(
"format") == 0)
300 *line = format_attr_str;
boost_foreach_argument_dependent_lookup_hack tag
Represents data loaded from a file.
std::size_t name_size() const
bool get_thread_node(xml_node<> *node_file, int *thread_id, std::string *thread_name)
GLsizei const GLchar *const * string
bool get_event_node(xml_node<> *node_event, int *event_id, int *num_of_params, std::string *line)
xml_node< Ch > * first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
bool build_meta_data_structure(xml_node<> *xml_node_list_of_events, fw_logs_formating_options *logs_formating_options)
std::pair< int, std::string > kvp
node_type get_next_node(xml_node<> *xml_node_list_of_events, int *id, int *num_of_params, std::string *line)
~fw_logs_xml_helper(void)
bool get_root_node(xml_node<> **node)
std::vector< char > _document_buffer
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
bool try_load_external_xml()
xml_node< Ch > * next_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
bool get_file_node(xml_node<> *node_file, int *file_id, std::string *file_name)
int stoi(const std::string &value)
bool get_enum_name_node(xml_node<> *node_file, int *thread_id, std::string *thread_name)
bool get_enum_value_node(xml_node<> *node_file, int *thread_id, std::string *enum_name)
bool build_log_meta_data(fw_logs_formating_options *logs_formating_options)