open-license-manager
2014-04-14 3ba1ee60337c5e74027acb6f89a16e5ff3aa345c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * LicenseSigner.h
 *
 *  Created on: Apr 6, 2014
 *      Author: devel
 */
 
#ifndef LICENSE_GENERATOR_H_
#define LICENSE_GENERATOR_H_
 
#include <boost/program_options.hpp>
#include "../library/LicenseReader.h"
 
namespace license {
 
namespace po = boost::program_options;
/**
 * This class is used to generate a new license.
 * It has no metnod main, for testing reasons.
 */
class LicenseGenerator {
private:
    LicenseGenerator();
    static void printHelp(const char* prog_name, const po::options_description& options);
    static po::options_description configureProgramOptions();
    static vector<FullLicenseInfo> parseLicenseInfo(po::variables_map vm);
    static void generateAndOutptuLicenses(const po::variables_map& vm,
            ostream& outputFile);
 
public:
    static int generateLicense(int argc, const char** argv);
};
 
} /* namespace license */
 
#endif /* LICENSE_GENERATOR_H_ */