NSVD Reader  0.0.1
nodamushi::svd::boost_svd_reader Struct Reference

SVD reader with Boost property tree. More...

#include <boost.hpp>

Inheritance diagram for nodamushi::svd::boost_svd_reader:

Public Types

using ptree = boost::property_tree::ptree
 
using itr = ptree::iterator
 

Public Member Functions

 boost_svd_reader ()=default
 
 boost_svd_reader (ptree &t)
 
 boost_svd_reader (ptree &t, string_ref n, string_ref v, bool a)
 
 boost_svd_reader (const std::string &file_name, bool throw_error=false)
 constructor with file name More...
 
 boost_svd_reader (std::istream &file, bool throw_error=false)
 constructor with std::istream More...
 
bool ok () const noexcept
 file open / xml parse status More...
 
bool is_attribute () const noexcept
 svd_reader interface function More...
 
string_ref get_name () const noexcept
 svd_reader interface function More...
 
string_ref get_value () const noexcept
 svd_reader interface function More...
 
boost_svd_reader next_child () noexcept
 svd_reader interface function More...
 
 operator bool () const
 svd_reader interface function More...
 

Detailed Description

SVD reader with Boost property tree.

When you use this reader,you must add Boost library to include directories. note: Boost property tree is a header only library.
if(!r.ok())return; // xml read failed
See also
https://www.boost.org/doc/libs/1_65_1/doc/html/property_tree.html

Definition at line 38 of file boost.hpp.

Member Typedef Documentation

◆ itr

using nodamushi::svd::boost_svd_reader::itr = ptree::iterator

Definition at line 41 of file boost.hpp.

◆ ptree

using nodamushi::svd::boost_svd_reader::ptree = boost::property_tree::ptree

Definition at line 40 of file boost.hpp.

Constructor & Destructor Documentation

◆ boost_svd_reader() [1/5]

nodamushi::svd::boost_svd_reader::boost_svd_reader ( )
default

◆ boost_svd_reader() [2/5]

nodamushi::svd::boost_svd_reader::boost_svd_reader ( ptree t)
inline

Definition at line 45 of file boost.hpp.

◆ boost_svd_reader() [3/5]

nodamushi::svd::boost_svd_reader::boost_svd_reader ( ptree t,
string_ref  n,
string_ref  v,
bool  a 
)
inline

Definition at line 52 of file boost.hpp.

◆ boost_svd_reader() [4/5]

nodamushi::svd::boost_svd_reader::boost_svd_reader ( const std::string &  file_name,
bool  throw_error = false 
)
inline

constructor with file name

Parameters
file_namefilename
throw_errorIf this option is true, throw exception when file open failed / xml error found.
Exceptions
nodamushi::svd::file_read_exception
nodamushi::svd::xml_parser_error

Definition at line 66 of file boost.hpp.

◆ boost_svd_reader() [5/5]

nodamushi::svd::boost_svd_reader::boost_svd_reader ( std::istream &  file,
bool  throw_error = false 
)
inline

constructor with std::istream

Parameters
filefile contents istream
throw_errorIf this option is true, throw exception when file open failed / xml error found.
Exceptions
nodamushi::svd::file_read_exception
nodamushi::svd::xml_parser_error

Definition at line 96 of file boost.hpp.

Member Function Documentation

◆ get_name()

string_ref nodamushi::svd::boost_svd_reader::get_name ( ) const
inlinenoexcept

svd_reader interface function

Definition at line 128 of file boost.hpp.

◆ get_value()

string_ref nodamushi::svd::boost_svd_reader::get_value ( ) const
inlinenoexcept

svd_reader interface function

Definition at line 130 of file boost.hpp.

◆ is_attribute()

bool nodamushi::svd::boost_svd_reader::is_attribute ( ) const
inlinenoexcept

svd_reader interface function

Definition at line 126 of file boost.hpp.

◆ next_child()

boost_svd_reader nodamushi::svd::boost_svd_reader::next_child ( )
inlinenoexcept

svd_reader interface function

Definition at line 132 of file boost.hpp.

◆ ok()

bool nodamushi::svd::boost_svd_reader::ok ( ) const
inlinenoexcept

file open / xml parse status

Returns
file open / xml parse status

Definition at line 120 of file boost.hpp.

◆ operator bool()

nodamushi::svd::boost_svd_reader::operator bool ( ) const
inline

svd_reader interface function

Definition at line 144 of file boost.hpp.


The documentation for this struct was generated from the following file: