PLCnext API Documentation  22.9.0.33
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Arp::System::Commons::Xml::XmlConfigDocument Class Reference

Class handle xml configuration documents More...

#include <XmlConfigDocument.hpp>

Inheritance diagram for Arp::System::Commons::Xml::XmlConfigDocument:
Inheritance graph

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 StringGetPath (void) const
 Returns the path to the current file loaded by this document More...
 
IXmlSerializableGetContent (void)
 summary>Returns a pointer to the root document for MultiXmlConfigDocument More...
 
MultiXmlConfigDocumentGetRootDocument (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

MultiXmlConfigDocumentpRootDoc
 
IXmlSerializablecontent
 
String documentXmlElementName
 
String path
 
Version recentVersion
 

Friends

class XmlSerializationContext
 

Detailed Description

Class handle xml configuration documents

Constructor & Destructor Documentation

◆ XmlConfigDocument() [1/2]

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

◆ XmlConfigDocument() [2/2]

Arp::System::Commons::Xml::XmlConfigDocument::XmlConfigDocument ( MultiXmlConfigDocument rootDocument,
IXmlSerializable content 
)

Constructs an XmlConfigDocument instance.

◆ ~XmlConfigDocument()

virtual Arp::System::Commons::Xml::XmlConfigDocument::~XmlConfigDocument ( void  )
virtualdefault

Destructs this instance and frees all resouces.

Member Function Documentation

◆ GetContent()

IXmlSerializable & Arp::System::Commons::Xml::XmlConfigDocument::GetContent ( void  )
inline

summary>Returns a pointer to the root document for MultiXmlConfigDocument

◆ GetPath()

const String & Arp::System::Commons::Xml::XmlConfigDocument::GetPath ( void  ) const
inline

Returns the path to the current file loaded by this document

summary>Returns the current content of this document

◆ GetRootDocument()

MultiXmlConfigDocument * Arp::System::Commons::Xml::XmlConfigDocument::GetRootDocument ( void  )
inline

summary>Returns the recend implemented schema version, used by XmlSerializationContext

◆ Load()

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.

◆ Save() [1/3]

void Arp::System::Commons::Xml::XmlConfigDocument::Save ( const String documentPath)

summary>saves the content xml encoded to documentPath param name="syncFilesystem">true: synchronize filesystem

◆ Save() [2/3]

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

◆ Save() [3/3]

void Arp::System::Commons::Xml::XmlConfigDocument::Save ( void  )
inline

summary>saves the content xml encoded to the file the document was loaded from param name="syncFilesystem">true: synchronize filesystem

◆ TryLoad()

bool Arp::System::Commons::Xml::XmlConfigDocument::TryLoad ( const String documentPath)

summary>saves the content xml encoded to documentPath with filesystem sync


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