namespace pugixml::utils¶
Overview¶
XML helpers function to extract values from pugi::xml_node
More…
namespace utils {
// global functions
int GetIntAttr(const pugi::xml_node& node, const char \* str);
int GetIntAttr(const pugi::xml_node& node, const char \* str, int defVal);
int64_t GetInt64Attr(const pugi::xml_node& node, const char \* str);
int64_t GetInt64Attr(
const pugi::xml_node& node,
const char \* str,
int64_t defVal
);
uint64_t GetUInt64Attr(const pugi::xml_node& node, const char \* str);
uint64_t GetUInt64Attr(
const pugi::xml_node& node,
const char \* str,
uint64_t defVal
);
unsigned int GetUIntAttr(const pugi::xml_node& node, const char \* str);
unsigned int GetUIntAttr(
const pugi::xml_node& node,
const char \* str,
unsigned int defVal
);
std::string GetStrAttr(const pugi::xml_node& node, const char \* str);
std::string GetStrAttr(
const pugi::xml_node& node,
const char \* str,
const char \* def
);
bool GetBoolAttr(const pugi::xml_node& node, const char \* str);
bool GetBoolAttr(const pugi::xml_node& node, const char \* str, const bool def);
float GetFloatAttr(const pugi::xml_node& node, const char \* str);
float GetFloatAttr(const pugi::xml_node& node, const char \* str, float defVal);
InferenceEngine::Precision GetPrecisionAttr(
const pugi::xml_node& node,
const char \* str
);
InferenceEngine::Precision GetPrecisionAttr(
const pugi::xml_node& node,
const char \* str,
InferenceEngine::Precision def
);
int GetIntChild(const pugi::xml_node& node, const char \* str, int defVal);
} // namespace utils
Detailed Documentation¶
XML helpers function to extract values from pugi::xml_node
Global Functions¶
int GetIntAttr(const pugi::xml_node& node, const char \* str)
Gets the integer attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string |
Returns:
An integer value
int GetIntAttr(const pugi::xml_node& node, const char \* str, int defVal)
Gets the integer attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
defVal |
The default value |
Returns:
An integer value
int64_t GetInt64Attr(const pugi::xml_node& node, const char \* str)
Gets the int64_t
attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
Returns:
An int64_t
value
int64_t GetInt64Attr(
const pugi::xml_node& node,
const char \* str,
int64_t defVal
)
Gets the int64_t
attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
defVal |
The default value |
Returns:
An int64_t
value
uint64_t GetUInt64Attr(const pugi::xml_node& node, const char \* str)
Gets the uint64_t
attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
Returns:
An uint64_t
value
uint64_t GetUInt64Attr(
const pugi::xml_node& node,
const char \* str,
uint64_t defVal
)
Gets the uint64_t
attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
defVal |
The default value |
Returns:
An uint64_t
value
unsigned int GetUIntAttr(const pugi::xml_node& node, const char \* str)
Gets the unsigned integer attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
Returns:
An unsigned integer value
unsigned int GetUIntAttr(
const pugi::xml_node& node,
const char \* str,
unsigned int defVal
)
Gets the unsigned integer attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
defVal |
The default value |
Returns:
An unsigned integer value
std::string GetStrAttr(const pugi::xml_node& node, const char \* str)
Gets the string attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
Returns:
A string value
std::string GetStrAttr(
const pugi::xml_node& node,
const char \* str,
const char \* def
)
Gets the string attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
def |
The default value |
Returns:
A string value
bool GetBoolAttr(const pugi::xml_node& node, const char \* str)
Gets the bool attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
Returns:
A boolean value
bool GetBoolAttr(const pugi::xml_node& node, const char \* str, const bool def)
Gets the bool attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
def |
The default value |
Returns:
A boolean value
float GetFloatAttr(const pugi::xml_node& node, const char \* str)
Gets the float attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
Returns:
A single-precision floating point value
float GetFloatAttr(const pugi::xml_node& node, const char \* str, float defVal)
Gets the float attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
defVal |
The default value |
Returns:
A single-precision floating point value
InferenceEngine::Precision GetPrecisionAttr(
const pugi::xml_node& node,
const char \* str
)
Gets the Precision attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
Returns:
A Precision value
InferenceEngine::Precision GetPrecisionAttr(
const pugi::xml_node& node,
const char \* str,
InferenceEngine::Precision def
)
Gets the Precision attribute from pugi::xml_node
Parameters:
node |
The node |
str |
The string identifying value name |
def |
The default value |
Returns:
A Precision value
int GetIntChild(const pugi::xml_node& node, const char \* str, int defVal)
Gets the integer value located in a child node.
Parameters:
node |
The node |
str |
The string value identifying a child node |
defVal |
The default value |
Returns:
An ingeter value located in a child node, devVal
otherwise.