Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
arxml::ArxmlReader Class Reference

A class to read ARXML configuration files. More...

#include <arxml_reader.h>

Public Member Functions

 ArxmlReader (const std::string &filePath)
 Constructor. More...
 
 ArxmlReader (const char *content, std::size_t length)
 Constructor. More...
 
ArxmlNode GetRootNode (std::initializer_list< std::string > children) const
 Get (relative) ARXML root node. More...
 
template<size_t N>
ArxmlNode GetRootNode (const std::array< std::string, N > &children) const
 Get (relative) ARXML root node. More...
 
ArxmlNodeRange GetNodes (std::initializer_list< std::string > children) const
 Get a range of ARXML nodes deep down the ARXML content. More...
 
template<size_t N>
ArxmlNodeRange GetNodes (const std::array< std::string, N > &children) const
 Get a range of ARXML nodes deep down the ARXML content. More...
 

Detailed Description

A class to read ARXML configuration files.

Constructor & Destructor Documentation

◆ ArxmlReader() [1/2]

arxml::ArxmlReader::ArxmlReader ( const std::string &  filePath)
explicit

Constructor.

Parameters
filePathARXML document file path
Exceptions
std::invalid_argumentThrows when the ARXML file is not valid

◆ ArxmlReader() [2/2]

arxml::ArxmlReader::ArxmlReader ( const char *  content,
std::size_t  length 
)

Constructor.

Parameters
contentARXML document file content
lengthContent length

Member Function Documentation

◆ GetNodes() [1/2]

template<size_t N>
ArxmlNodeRange arxml::ArxmlReader::GetNodes ( const std::array< std::string, N > &  children) const
inline

Get a range of ARXML nodes deep down the ARXML content.

Template Parameters
NChildren hierarchy depth level
Parameters
childrenHierarchical children node array
Returns
Read-only range of ARXML nodes

◆ GetNodes() [2/2]

ArxmlNodeRange arxml::ArxmlReader::GetNodes ( std::initializer_list< std::string >  children) const

Get a range of ARXML nodes deep down the ARXML content.

Parameters
childrenHierarchical children nodes
Returns
Read-only range of ARXML nodes

◆ GetRootNode() [1/2]

template<size_t N>
ArxmlNode arxml::ArxmlReader::GetRootNode ( const std::array< std::string, N > &  children) const
inline

Get (relative) ARXML root node.

Template Parameters
NChildren hierarchy depth level
Parameters
childrenHierarchical children node array
Returns
ARXML root node relative to the children nodes (if there is any)

◆ GetRootNode() [2/2]

ArxmlNode arxml::ArxmlReader::GetRootNode ( std::initializer_list< std::string >  children) const

Get (relative) ARXML root node.

Parameters
childrenHierarchical children nodes
Returns
ARXML root node relative to the children nodes (if there is any)