![]() |
Limb Range Analyzer
Cross-platform application for human limb range analysis.
|
Class introduced in order to maintain XML loading and saving possibilities. More...
#include <xmlparser.hpp>
Public Member Functions | |
| XmlParser () | |
| Class XmlParser default constructor. More... | |
| ~XmlParser () | |
| Default destructor function of XmlParser. More... | |
| void | XmlParser_InitializePath () |
| Member function that manages required directory check and creation if it does not yet exist. More... | |
| void | XmlParser_InitializeSettings () |
| Function needed for initial settings XML file creation. More... | |
| void | XmlParser_InitializeClientData () |
| Function that is responsible for initial client XML file creation. More... | |
| QSharedPointer< Settings > | XmlParser_LoadSettings () |
| Member function meant for application Settings loading. More... | |
| QList< QSharedPointer< Client > > | XmlParser_LoadClientData () |
| Function designed for Client data loading from XML file. More... | |
| void | XmlParser_SaveSettings (QSharedPointer< Settings > settings) |
| Member function that manages Settings XML saving. More... | |
| void | XmlParser_SaveClientData (QList< QSharedPointer< Client > > clientList) |
| Function that receives a list of clients and saves it to XML file. More... | |
Private Attributes | |
| QString | mDirPath |
| QString member variable that carries the directory path used by XML files. | |
Class introduced in order to maintain XML loading and saving possibilities.
Class XmlParser is responsible for Limb Range Analyzer Client and Settings data model saving through XML documents. Needed files can be created and extended according to program needs, just as they can be accessed and read from.
| XmlParser::XmlParser | ( | ) |
Class XmlParser default constructor.
This default function is used as a member initializer when new instance is created.
| XmlParser::~XmlParser | ( | ) |
Default destructor function of XmlParser.
Unextended form of a default destructor function.
| void XmlParser::XmlParser_InitializeClientData | ( | ) |
| void XmlParser::XmlParser_InitializePath | ( | ) |
Member function that manages required directory check and creation if it does not yet exist.
This member function defines XML directory meant for usage and creates it, if it does not exist.
| void XmlParser::XmlParser_InitializeSettings | ( | ) |
| QList< QSharedPointer< Client > > XmlParser::XmlParser_LoadClientData | ( | ) |
Function designed for Client data loading from XML file.
Function serves as an obtainer of client related data stored in a XML file created by XmlParser_SaveClientData function. A required file is opened and read through until its end, while client instances are constructed. A list of Client instances is returned for further use by the application.
| QSharedPointer< Settings > XmlParser::XmlParser_LoadSettings | ( | ) |
Member function meant for application Settings loading.
Member function responsible for XML file loading. Processed text strings are used for Settings instance creation that is returned by this function and further used by the application.
| void XmlParser::XmlParser_SaveClientData | ( | QList< QSharedPointer< Client > > | clientList | ) |
Function that receives a list of clients and saves it to XML file.
Parametric member function that uses a list of Client data and saves it to a specific clients.xml file. The list is iterated through and for each entry a new record is made, so that it can be loaded via XmlParser_LoadClientData again when needed.
| clientList | - a list of pointers that carries application clients data meant for saving |
| void XmlParser::XmlParser_SaveSettings | ( | QSharedPointer< Settings > | settings | ) |
Member function that manages Settings XML saving.
This function is designed for application settings saving, which is handled through XML file usage. A Settings object transferred as a pointer parameter is decomposed and saved to settings.xml file with the use of QXmlStreamWriter .
| settings | - currently valid application settings to be saved |