uprava souboru
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "pugixml.hpp"
|
#include "pugixml.hpp"
|
||||||
|
|
||||||
|
|
||||||
#define CID_LENGTH 32
|
#define CID_LENGTH 32
|
||||||
#define CSD_LENGTH 32
|
#define CSD_LENGTH 32
|
||||||
|
|
||||||
@@ -60,8 +59,13 @@ PlcLicence::PlcLicence()
|
|||||||
/// @param dataFileName
|
/// @param dataFileName
|
||||||
void PlcLicence::processConfigFile(string &dataFileName)
|
void PlcLicence::processConfigFile(string &dataFileName)
|
||||||
{
|
{
|
||||||
|
string fullFile = getCompletePath(dataFileName);
|
||||||
|
const int fileNameLength = fullFile.length();
|
||||||
|
char fileName[fileNameLength] = {};
|
||||||
|
getCharsFromString(fullFile, fileName, fileNameLength);
|
||||||
|
|
||||||
pugi::xml_document doc;
|
pugi::xml_document doc;
|
||||||
pugi::xml_parse_result result = doc.load_file("licData.xml");
|
pugi::xml_parse_result result = doc.load_file(fileName);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
this->stationName = doc.child("data").child("station").child_value();
|
this->stationName = doc.child("data").child("station").child_value();
|
||||||
|
|||||||
Reference in New Issue
Block a user