PLCnext API Documentation 23.6.0.37
Public Types | Public Member Functions | Protected Member Functions | List of all members
Arp::System::Commons::Xml::MultiXmlConfigDocument Class Reference

special version of XmlConfigDocument to include xml configuration data from other xml files inside a configuration file More...

#include <MultiXmlConfigDocument.hpp>

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

Public Types

using Base = XmlConfigDocument
 
using Files = std::deque< String >
 
using IncludedFiles = std::list< String >
 
using Logger = Arp::System::Commons::Diagnostics::Logging::Logger<>
 

Public Member Functions

 MultiXmlConfigDocument (const String &documentXmlElementName, IXmlSerializable &content)
 Constructs an MultiXmlConfigDocument instance. More...
 
virtual ~MultiXmlConfigDocument (void)=default
 Destructs this instance and frees all resouces.
 
void AddFile (const String &path)
 
void Load (const String &documentPath)
 Loads the document from specified <paramref="documentPath"/> More...
 
void Load (const ConfigurationSettings &configSettings)
 
bool TryLoad (const String &documentPath)
 
bool TryLoad (const ConfigurationSettings &configSettings)
 
- Public Member Functions inherited from Arp::System::Commons::Xml::XmlConfigDocument
 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 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
 
MultiXmlConfigDocumentGetRootDocument (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

void ReadDocument (XmlReader &reader) override
 
Files & GetFiles ()
 
IncludedFiles & GetIncludedFiles ()
 
virtual void ReadDocument (XmlReader &reader)
 

Additional Inherited Members

- Protected Attributes inherited from Arp::System::Commons::Xml::XmlConfigDocument
MultiXmlConfigDocumentpRootDoc
 
IXmlSerializablecontent
 
String documentXmlElementName
 
String path
 
Version recentVersion
 

Detailed Description

special version of XmlConfigDocument to include xml configuration data from other xml files inside a configuration file

files can be included by code> Includes> /Includes> /code>

Constructor & Destructor Documentation

◆ MultiXmlConfigDocument()

Arp::System::Commons::Xml::MultiXmlConfigDocument::MultiXmlConfigDocument ( const String documentXmlElementName,
IXmlSerializable content 
)
inline

Constructs an MultiXmlConfigDocument instance.

param name="documentXmlElementName">name of the root element of the document

param name="content">class which implements IXmlSerializable and can parse documentXmlElementName</param

Member Function Documentation

◆ Load() [1/2]

void Arp::System::Commons::Xml::MultiXmlConfigDocument::Load ( const ConfigurationSettings configSettings)

summary>Tries to load document from specified <paramref="documentPath"/>

returns>true if the document was loaded successfully, otherwise false.

◆ Load() [2/2]

void Arp::System::Commons::Xml::MultiXmlConfigDocument::Load ( const String documentPath)

Loads the document from specified <paramref="documentPath"/>

summary>Loads all documents specified by <paramref="configSettings" />

◆ ReadDocument()

void Arp::System::Commons::Xml::MultiXmlConfigDocument::ReadDocument ( XmlReader reader)
overrideprotectedvirtual

◆ TryLoad()

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

summary>Tries to load all documents from specified <paramref="configSettings"/>

returns>true if all documents could be loaded successfully, otherwise false.


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