66 lines
1.4 KiB
C++
66 lines
1.4 KiB
C++
#ifndef LICENCE_GENERATOR_H_
|
|
#define LICENCE_GENERATOR_H_
|
|
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <iomanip>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <vector>
|
|
#include <wchar.h>
|
|
#include <time.h>
|
|
#include <map>
|
|
#include <stdint.h>
|
|
#include "licenceCommon.h"
|
|
#include "licenceELC11.h"
|
|
#include "licenceELC21.h"
|
|
#include "licenceELC31.h"
|
|
|
|
using namespace std;
|
|
|
|
class LicenceGenerator
|
|
{
|
|
|
|
public:
|
|
int elcSwitchType;
|
|
string operationErrors = "";
|
|
pugi::xml_document doc;
|
|
bool argumentsCorrect = false;
|
|
ErrorMessage error;
|
|
LicenceELC11 *licence11;
|
|
LicenceELC21 *licence21;
|
|
LicenceELC31 *licence31;
|
|
|
|
LicenceGenerator();
|
|
~LicenceGenerator();
|
|
LicenceGenerator(string uid, string cid, string csd, string dataFileName);
|
|
LicenceGenerator(int elcType, int licenceType, int licenceVersion, int licenceIndex, int compatibility);
|
|
|
|
void createLicenceFile();
|
|
void readLicenceFile();
|
|
|
|
int getDataPointsCount(int protocolId);
|
|
bool getLicenceInfo(int protocolId, void *returnStructure);
|
|
bool getLicenceItemInfo(int protocolId, void *returnItemStructure);
|
|
|
|
LicenceInfoGeneral licenceInfo;
|
|
|
|
private:
|
|
LicenceIdentification licIdentification;
|
|
LicData licData;
|
|
string configFileName = "";
|
|
|
|
void *licence = nullptr;
|
|
|
|
bool processInputConfiguration();
|
|
|
|
void createLicenceELC1();
|
|
void createLicenceELC2();
|
|
void createLicenceELC3();
|
|
|
|
void readLicenceELC1();
|
|
void readLicenceELC2();
|
|
void readLicenceELC3();
|
|
};
|
|
|
|
#endif |