OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
LicenseGenerator Class Reference

#include <LicenseGenerator.hh>

Collaboration diagram for LicenseGenerator:
Collaboration graph

Public Member Functions

 ~LicenseGenerator ()
 

Static Public Member Functions

static std::string generateMITLicense (const std::string &year, const std::string &comment)
 

Private Member Functions

 LicenseGenerator ()=delete
 

Detailed Description

Definition at line 33 of file LicenseGenerator.hh.

Constructor & Destructor Documentation

◆ ~LicenseGenerator()

LicenseGenerator::~LicenseGenerator ( )

Destructor

Definition at line 34 of file LicenseGenerator.cc.

34{}

◆ LicenseGenerator()

LicenseGenerator::LicenseGenerator ( )
privatedelete

Member Function Documentation

◆ generateMITLicense()

std::string LicenseGenerator::generateMITLicense ( const std::string &  year,
const std::string &  comment 
)
static

Generates a MIT license header for a module.

Parameters
yearThe copyright year
commentString used for comment
Returns
The generated MIT license

Definition at line 44 of file LicenseGenerator.cc.

45 {
46 std::string license;
47 license =
48 comment + " Copyright (c) " + year + " Tampere University.\n"
49 + comment + "\n"
50 + comment + " Module generated by OpenASIP.\n"
51 + comment + "\n"
52 + comment + " Permission is hereby granted, free of charge, to any"
53 " person obtaining a\n"
54 + comment + " copy of this software and associated documentation files"
55 " (the \"Software\"),\n"
56 + comment + " to deal in the Software without restriction, including"
57 " without limitation\n"
58 + comment + " the rights to use, copy, modify, merge, publish, "
59 "distribute, sublicense,\n"
60 + comment + " and/or sell copies of the Software, and to permit "
61 "persons to whom the\n"
62 + comment + " Software is furnished to do so, subject to the following"
63 " conditions:\n"
64 + comment + "\n"
65 + comment + " The above copyright notice and this permission notice"
66 " shall be included in\n"
67 + comment + " all copies or substantial portions of the Software.\n"
68 + comment + "\n"
69 + comment + " THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY"
70 " OF ANY KIND, EXPRESS OR\n"
71 + comment + " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES"
72 " OF MERCHANTABILITY,\n"
73 + comment + " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT."
74 " IN NO EVENT SHALL THE\n"
75 + comment + " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,"
76 " DAMAGES OR OTHER\n"
77 + comment + " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR"
78 " OTHERWISE, ARISING\n"
79 + comment + " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR"
80 " THE USE OR OTHER\n"
81 + comment + " DEALINGS IN THE SOFTWARE.\n\n";
82
83 return license;
84}

Referenced by ProGe::RV32MicroCodeGenerator::generateMap(), and HDLGenerator::Module::set_header().


The documentation for this class was generated from the following files: