8#include "Arp/Base/Core/PimplPtr.hxx"
9#include "Arp/Base/Core/TryConvert.hpp"
10#include "Arp/System/Commons/Exceptions/XmlException.hpp"
19namespace Arp::Io::Commons::Configuration
29 using AttributeReader = std::function<void(
TicReader& reader,
const String& readAttributeName)>;
30 using SubelementReader = std::function<void(
TicReader& reader,
const String& readElementName)>;
44 size_t GetLineNumber(
void);
45 const String& GetDocumentFileName(
void);
48 void ReadDocumentStart(
String& rootElementName);
49 void ReadDocumentEnd(
void);
50 void ReadElementContent(
const AttributeReader& attributeReader,
const SubelementReader& elementReader);
52 String ReadTicAttributeValue(
void);
55 template<
class T> T ReadTicAttributeValueAs(
void);
59 const Impl& GetImpl(
void)
const;
80 if (!TryConvert::ToValue<T>(attribute, result))
Adapter class to implement PImpl idiom.
Definition: PimplPtr.hxx:15
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
This class is used to read the content of Tic files.
Definition: TicReader.hpp:24
~TicReader(void)
Default destructor.
const String & GetDocumentFileName(void)
Returns the filename of the current Tic document.
Definition: TicReader.cpp:49
TicReader(TicReader &&arg) noexcept
Default move constructor.
size_t GetLineNumber(void)
Returns the current line number of the read Tic document.
Definition: TicReader.cpp:56
String ReadTicAttributeValue(void)
Reads the value of the current attribute as String.
Definition: TicReader.cpp:95
TicReader & operator=(TicReader &&arg) noexcept
Default move-assignment operator.
T ReadTicAttributeValueAs(void)
Reads the value of the current attribute and converts it to the specified type T .
Definition: TicReader.hpp:74
This exception is used for xml parsing errors.
Definition: XmlException.hpp:15
static XmlException Create(void)
Creates an XmlException instance using a default message text.
Definition: XmlException.cpp:47
Class to read an XML File. Non buffered reader, can only read forward
Definition: XmlReader.hpp:25
Namespace for classes to read XML files