PLCnext API Documentation 23.6.0.37
|
Class handle xml configuration documents More...
#include <XmlConfigDocument.hpp>
Public Member Functions | |
XmlConfigDocument (const String &documentXmlElementName, IXmlSerializable &content) | |
Constructs an XmlConfigDocument instance. More... | |
XmlConfigDocument (MultiXmlConfigDocument &rootDocument, IXmlSerializable &content) | |
Constructs an XmlConfigDocument instance. | |
virtual | ~XmlConfigDocument (void)=default |
Destructs this instance and frees all resouces. | |
const String & | GetPath (void) const |
Returns the path to the current file loaded by this document More... | |
IXmlSerializable & | GetContent (void) |
summary>Returns a pointer to the root document for MultiXmlConfigDocument | |
MultiXmlConfigDocument * | GetRootDocument (void) |
summary>Returns the recend implemented schema version, used by XmlSerializationContext | |
Version | GetRecentVersion (void) const |
void | Load (const String &documentPath) |
Loads the document from specified <paramref="documentPath"/> More... | |
bool | TryLoad (const String &documentPath) |
summary>saves the content xml encoded to documentPath with filesystem sync | |
void | Save (const String &documentPath) |
void | Save (const String &documentPath, bool syncFilesystem) |
void | Save (const String &documentPath, bool syncFilesystem, const Version &schemaVersion) |
summary>saves the content xml encoded to the file the document was loaded from with filesystem sync | |
void | Save (void) |
void | Save (bool syncFilesystem) |
summary>Loads the document from a string | |
void | LoadString (const String &xmlContent) |
Protected Member Functions | |
virtual void | ReadDocument (XmlReader &reader) |
Protected Attributes | |
MultiXmlConfigDocument * | pRootDoc |
IXmlSerializable & | content |
String | documentXmlElementName |
String | path |
Version | recentVersion |
Friends | |
class | XmlSerializationContext |
Class handle xml configuration documents
Arp::System::Commons::Xml::XmlConfigDocument::XmlConfigDocument | ( | const String & | documentXmlElementName, |
IXmlSerializable & | content | ||
) |
Constructs an XmlConfigDocument instance.
param name="documentXmlElementName">name of the root element of the document
param name="content">class which implements IXmlSerializable and can parse documentXmlElementName
|
inline |
Returns the path to the current file loaded by this document
summary>Returns the current content of this document
void Arp::System::Commons::Xml::XmlConfigDocument::Load | ( | const String & | documentPath | ) |
Loads the document from specified <paramref="documentPath"/>
summary>Tries to load document from specified <paramref="documentPath"/>
returns>true
if the document was loaded successfully, otherwise false
.
void Arp::System::Commons::Xml::XmlConfigDocument::Save | ( | const String & | documentPath | ) |
summary>saves the content xml encoded to documentPath
param name="syncFilesystem">true: synchronize filesystem
void Arp::System::Commons::Xml::XmlConfigDocument::Save | ( | const String & | documentPath, |
bool | syncFilesystem | ||
) |
summary>saves the content xml encoded to documentPath
param name="syncFilesystem">true: synchronize filesystem
param name="schemaVersion">version of the XML schema as attribute schemaVersion at the document element, omitted if equal to Version()
|
inline |
summary>saves the content xml encoded to the file the document was loaded from
param name="syncFilesystem">true: synchronize filesystem