string clean
This commit is contained in:
@@ -14,32 +14,19 @@
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
map<string, string> argumentsString = getArguments(argc, argv);
|
||||
map<string, string> arguments = getArguments(argc, argv);
|
||||
|
||||
const int csdLength = argumentsString["-csd"].length();
|
||||
char csdArg[32] = {};
|
||||
getCharsFromString(argumentsString["-csd"], csdArg, csdLength);
|
||||
|
||||
const int cidLength = argumentsString["-cid"].length();
|
||||
char cidArg[32] = {};
|
||||
getCharsFromString(argumentsString["-cid"], cidArg, cidLength);
|
||||
|
||||
PlcLicence plcWriteLicence = PlcLicence(cidArg, csdArg, argumentsString["-outputType"], argumentsString["-configFileName"]);
|
||||
PlcLicence plcWriteLicence = PlcLicence(arguments["-cid"], arguments["-csd"], arguments["-outputType"], arguments["-configFileName"]);
|
||||
if (plcWriteLicence.CreateLicence() == false)
|
||||
{
|
||||
cerr << "Licence creation failed";
|
||||
}
|
||||
|
||||
|
||||
/* READ LICENCE CODE
|
||||
// arguments: -cid, -csd, -licenceFileName, -licenceType=EOV_OSV, -licenceVersion
|
||||
|
||||
// arguments: -cid, -csd, -licenceFi leName, -licenceType=EOV_OSV, -licenceVersion
|
||||
|
||||
PlcLicence plcLicence = PlcLicence();
|
||||
const int fileNameLength = argumentsString["-licenceFileName"].length();
|
||||
char fileNameArg[fileNameLength] = {};
|
||||
getCharsFromString(argumentsString["-licenceFileName"], fileNameArg, fileNameLength);
|
||||
|
||||
if (plcLicence.ReadLicence(fileNameArg, argumentsString["-licenceType"], argumentsString["-licenceVersion"], cidArg, csdArg) == false)
|
||||
if (plcLicence.ReadLicence(argumentsString["-licenceFileName"], argumentsString["-licenceType"], argumentsString["-licenceVersion"], argumentsString["-cid"], argumentsString["-csd"]) == false)
|
||||
{
|
||||
cout << "Reading error: " << plcLicence.operationErrors << endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user