PLCnext API Documentation
22.9.0.33
|
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. More... | |
virtual | ~XmlConfigDocument (void)=default |
Destructs this instance and frees all resouces. More... | |
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 More... | |
MultiXmlConfigDocument * | GetRootDocument (void) |
summary>Returns the recend implemented schema version, used by XmlSerializationContext More... | |
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 More... | |
void | Save (const String &documentPath) |
void | Save (const String &documentPath, bool syncFilesystem) |
summary>saves the content xml encoded to the file the document was loaded from with filesystem sync More... | |
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
Arp::System::Commons::Xml::XmlConfigDocument::XmlConfigDocument | ( | MultiXmlConfigDocument & | rootDocument, |
IXmlSerializable & | content | ||
) |
Constructs an XmlConfigDocument instance.
|
virtualdefault |
Destructs this instance and frees all resouces.
|
inline |
summary>Returns a pointer to the root document for MultiXmlConfigDocument
|
inline |
Returns the path to the current file loaded by this document
summary>Returns the current content of this document
|
inline |
summary>Returns the recend implemented schema version, used by XmlSerializationContext
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 the file the document was loaded from with filesystem sync
|
inline |
summary>saves the content xml encoded to the file the document was loaded from param name="syncFilesystem">true: synchronize filesystem
bool Arp::System::Commons::Xml::XmlConfigDocument::TryLoad | ( | const String & | documentPath | ) |
summary>saves the content xml encoded to documentPath with filesystem sync