72 lines
1.4 KiB
C++
72 lines
1.4 KiB
C++
#ifndef LICENCE_GENERATOR_H_
|
|
#define LICENCE_GENERATOR_H_
|
|
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include "pugixml.hpp"
|
|
#include "licenceCommon.h"
|
|
#include "licenceELC11.h"
|
|
#include "licenceELC21.h"
|
|
#include "licenceELC31.h"
|
|
|
|
#include "licGenELC1.h"
|
|
#include "licGenELC2.h"
|
|
#include "licGenELC3.h"
|
|
|
|
using namespace std;
|
|
|
|
class LicenceGenerator
|
|
{
|
|
|
|
struct LicData
|
|
{
|
|
string station = "";
|
|
string distributor = "";
|
|
string licenceName = "";
|
|
string projectDescription = "";
|
|
string cid = ""; // CID z SD karty
|
|
string csd = ""; // CSD z SD karty
|
|
string uid = ""; // jedinečný identifikátor z jiného systému
|
|
pugi::xml_document *doc;
|
|
};
|
|
|
|
public:
|
|
int elcSwitchType;
|
|
string operationErrors = "";
|
|
pugi::xml_document doc;
|
|
bool argumentsCorrect = false;
|
|
ErrorMessage error;
|
|
LicenceELC11 *licence11;
|
|
LicenceELC21 *licence21;
|
|
LicenceELC31 *licence31;
|
|
Mapping mapping;
|
|
|
|
|
|
LicenceGenerator();
|
|
~LicenceGenerator();
|
|
LicenceGenerator(string uid, string cid, string csd, string dataFileName);
|
|
|
|
void createLicenceFile();
|
|
|
|
|
|
LicenceInfoGeneral licenceInfo;
|
|
|
|
|
|
private:
|
|
LicenceIdentification licIdentification;
|
|
LicData licData;
|
|
string configFileName = "";
|
|
|
|
void *licence = nullptr;
|
|
|
|
bool processInputConfiguration();
|
|
|
|
void createLicenceELC1();
|
|
void createLicenceELC2();
|
|
void createLicenceELC3();
|
|
|
|
};
|
|
|
|
#endif |