8 #include "Arp/System/Commons/Logging.h" 9 #include "Arp/System/Commons/Exceptions/KeyNotFoundException.hpp" 10 #include "Arp/System/Commons/Configuration/PlaceholderExpression.hpp" 12 namespace Arp {
namespace System {
namespace Commons {
namespace Xml
20 class XmlConfigDocument;
21 class MultiXmlConfigDocument;
30 typedef std::map<String, String> Attributes;
46 const String& operator[](
const String& attributeName)
const;
49 static const char* IncludeXmlName;
50 static const char* IncludesXmlName;
56 Version GetDocumentSchemaVersion(
void)
const;
63 void ReadDocumentContext(
XmlReader& reader);
66 void WriteDocumentContext(
XmlWriter& writer)
const;
71 void InvalidXmlElementOccurs(
XmlReader& reader,
const char* xmlElementName);
74 void MissingXmlElementOccurs(
XmlReader& reader,
const char* xmlElementName);
76 void ReadIncludesElement(
XmlReader& reader);
78 String ResolvePath(
const char* documentPath);
82 String ResolvePlaceholder(
const char* input);
85 void AddIncludeFile(
const String& path);
91 void ResolveWildcards(
const String& path);
96 Attributes additionalAttributes;
107 return this->documentSchemaVersion;
112 return this->document;
117 return this->additionalAttributes[attributeName];
122 auto i = this->additionalAttributes.find(attributeName);
123 if (i == this->additionalAttributes.end())
133 return this->placeholderExpression.Resolve(input);
Class to write an XML File
Definition: XmlWriter.hpp:20
static KeyNotFoundException Create(const T &keyValue)
Creates an KeyNotFoundException instance using a default message text.
Definition: KeyNotFoundException.hpp:79
special version of XmlConfigDocument to include xml configuration data from other xml files inside a ...
Definition: MultiXmlConfigDocument.hpp:25
Arp::BasicVersion Version
The Arp Version class.
Definition: TypeSystem.h:29
String ResolvePlaceholder(const char *input)
summary>Adds a xml file to the list of included files
Definition: XmlSerializationContext.hpp:131
Version GetDocumentSchemaVersion(void) const
returns the document schema version stored in this context
Definition: XmlSerializationContext.hpp:105
This class represents the version of a special SDK or Arp build.
Definition: BasicVersion.hpp:34
Class handle xml configuration documents
Definition: XmlConfigDocument.hpp:20
Root namespace for the PLCnext API
Class to read an XML File. Non buffered reader, can only read forward
Definition: XmlReader.hpp:22
String & operator[](const String &attributeName)
operator [] to get and set attributes referenced by attributeName
Definition: XmlSerializationContext.hpp:115
Definition: PlaceholderExpression.hpp:16
System components used by the System, Device, Plc or Io domains.
Namespace for configuration related classes
Definition: CommandLineOptions.hpp:12
XML context used during XML reading and writing to hold the context information
Definition: XmlSerializationContext.hpp:25