Data Structures | Namespaces | Macros | Functions
xml_parse_utils.h File Reference

Basic functions to safely extract values from pugi::xml_node and open pugi::xml_document More...

#include <cstdlib>
#include <fstream>
#include <memory>
#include <sstream>
#include <string>
#include <utility>
#include <pugixml.hpp>
#include "ie_api.h"
#include "ie_precision.hpp"
#include "ie_common.h"
#include "file_utils.h"

Go to the source code of this file.

Data Structures

struct  parse_result
 A XML parse result structure with an error message and the pugi::xml_document document. More...
 

Namespaces

 XMLParseUtils
 XML helpers function to extract values from pugi::xml_node
 

Macros

#define FOREACH_CHILD(c, p, tag)   for (auto c = p.child(tag); !c.empty(); c = c.next_sibling(tag))
 Defines convinient for-each based cycle to iterate over node children. More...
 

Functions

int XMLParseUtils::GetIntAttr (const pugi::xml_node &node, const char *str)
 Gets the integer attribute from pugi::xml_node More...
 
int XMLParseUtils::GetIntAttr (const pugi::xml_node &node, const char *str, int defVal)
 Gets the integer attribute from pugi::xml_node More...
 
int64_t XMLParseUtils::GetInt64Attr (const pugi::xml_node &node, const char *str)
 Gets the int64_t attribute from pugi::xml_node More...
 
int64_t XMLParseUtils::GetInt64Attr (const pugi::xml_node &node, const char *str, int64_t defVal)
 Gets the int64_t attribute from pugi::xml_node More...
 
uint64_t XMLParseUtils::GetUInt64Attr (const pugi::xml_node &node, const char *str)
 Gets the uint64_t attribute from pugi::xml_node More...
 
uint64_t XMLParseUtils::GetUInt64Attr (const pugi::xml_node &node, const char *str, uint64_t defVal)
 Gets the uint64_t attribute from pugi::xml_node More...
 
unsigned int XMLParseUtils::GetUIntAttr (const pugi::xml_node &node, const char *str)
 Gets the unsigned integer attribute from pugi::xml_node More...
 
unsigned int XMLParseUtils::GetUIntAttr (const pugi::xml_node &node, const char *str, unsigned int defVal)
 Gets the unsigned integer attribute from pugi::xml_node More...
 
std::string XMLParseUtils::GetStrAttr (const pugi::xml_node &node, const char *str)
 Gets the string attribute from pugi::xml_node More...
 
std::string XMLParseUtils::GetStrAttr (const pugi::xml_node &node, const char *str, const char *def)
 Gets the string attribute from pugi::xml_node More...
 
bool XMLParseUtils::GetBoolAttr (const pugi::xml_node &node, const char *str)
 Gets the bool attribute from pugi::xml_node More...
 
bool XMLParseUtils::GetBoolAttr (const pugi::xml_node &node, const char *str, const bool def)
 Gets the bool attribute from pugi::xml_node More...
 
float XMLParseUtils::GetFloatAttr (const pugi::xml_node &node, const char *str)
 Gets the float attribute from pugi::xml_node More...
 
float XMLParseUtils::GetFloatAttr (const pugi::xml_node &node, const char *str, float defVal)
 Gets the float attribute from pugi::xml_node More...
 
InferenceEngine::Precision XMLParseUtils::GetPrecisionAttr (const pugi::xml_node &node, const char *str)
 Gets the Precision attribute from pugi::xml_node More...
 
InferenceEngine::Precision XMLParseUtils::GetPrecisionAttr (const pugi::xml_node &node, const char *str, InferenceEngine::Precision def)
 Gets the Precision attribute from pugi::xml_node More...
 
int XMLParseUtils::GetIntChild (const pugi::xml_node &node, const char *str, int defVal)
 Gets the integer value located in a child node. More...
 
parse_result ParseXml (const char *file_path)
 Parses a file and returns parse_result. More...
 

Detailed Description

Basic functions to safely extract values from pugi::xml_node and open pugi::xml_document