|
hydrogen 1.2.6
|
Wrapper class to help Hydrogen deal with the license information specified in a drumkit. More...
#include <License.h>
Public Types | |
| enum | LicenseType { CC_0 = 0 , CC_BY = 1 , CC_BY_NC = 2 , CC_BY_SA = 3 , CC_BY_NC_SA = 4 , CC_BY_ND = 5 , CC_BY_NC_ND = 6 , GPL = 7 , AllRightsReserved = 8 , Other = 9 , Unspecified = 10 } |
| A couple of recognized licenses. More... | |
Public Member Functions | |
| License (const License *pOther) | |
| License (const QString &sLicenseString="", const QString &sCopyrightHolder="") | |
| ~License () | |
| QString | getCopyrightHolder () const |
| QString | getLicenseString () const |
| LicenseType | getType () const |
| bool | hasAttribution () const |
| bool | isCopyleft () const |
| bool | operator!= (const License &other) const |
| bool | operator== (const License &other) const |
| void | parse (const QString &sLicenseString) |
| void | setCopyrightHolder (const QString &sCopyrightHolder) |
| void | setType (LicenseType license) |
| QString | toQString (const QString &sPrefix="", bool bShort=true) const override |
| Formatted string version for debugging purposes. | |
Public Member Functions inherited from Object< License > | |
| Object () | |
| Object (const Object< License > &other) | |
Public Member Functions inherited from Base | |
| Base () | |
| Base (const Base &other) | |
| virtual const char * | class_name () const |
| void | logBacktrace () const |
| Print the current stack at point into the debug log. | |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. | |
Static Public Member Functions | |
| static QString | getGPLLicenseNotice (const QString &sAuthor) |
| static QString | LicenseTypeToQString (LicenseType license) |
Static Public Member Functions inherited from Base | |
| static const char * | _class_name () |
| return the class name | |
| static QString | base_clock (const QString &sMsg) |
| Measures the current time and stores it in __last_clock. | |
| static QString | base_clock_in (const QString &sMsg) |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! | |
| static bool | count_active () |
| static int | getAliveObjectCount () |
| static object_map_t | getObjectMap () |
| static Logger * | logger () |
| return the logger instance | |
| static int | objects_count () |
| static void | printObjectMapDiff (object_map_t map) |
| Creates the difference between a snapshot of the object map and its current state and prints it to std::cout. | |
| static void | set_count (bool flag) |
| enable/disable class instances counting | |
| static void | write_objects_map_to (std::ostream &out, object_map_t *map=nullptr) |
| output the full objects map to a given ostream | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr | |
Private Attributes | |
| LicenseType | m_license |
| QString | m_sCopyrightHolder |
| This variable will not be written to disk. | |
| QString | m_sLicenseString |
Additional Inherited Members | |
Static Public Attributes inherited from Base | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. | |
Protected Member Functions inherited from Object< License > | |
| ~Object () | |
Protected Member Functions inherited from Base | |
| ~Base () | |
Static Protected Member Functions inherited from Base | |
| static void | registerClass (const char *name, const atomic_obj_cpt_t *counters) |
Static Protected Attributes inherited from Base | |
| static bool | __count = false |
| should we count class instances | |
| static timeval | __last_clock = { 0, 0 } |
| static Logger * | __logger = nullptr |
| static bool | bLogColors = true |
Wrapper class to help Hydrogen deal with the license information specified in a drumkit.
In order support the user in assigning the right license when creating a new drumkit or song, Hydrogen will keep track of the license information of each individual sample and checks whether any copyleft ones are included or credit must be given due to a CC BY* license.
The license string contained in the XML file is parsed and Hydrogen tries to map it to one of its supported LicenseType.
| enum LicenseType |
A couple of recognized licenses.
The ones supplied by Creative Commons are the most desired ones.
| License | ( | const QString & | sLicenseString = "", |
| const QString & | sCopyrightHolder = "" ) |
Definition at line 28 of file License.cpp.
Definition at line 35 of file License.cpp.
| ~License | ( | ) |
Definition at line 41 of file License.cpp.
|
inlinestatic |
|
inline |
| bool hasAttribution | ( | ) | const |
Definition at line 139 of file License.cpp.
| bool isCopyleft | ( | ) | const |
Definition at line 129 of file License.cpp.
|
inlinestatic |
| void parse | ( | const QString & | sLicenseString | ) |
Definition at line 49 of file License.cpp.
|
inline |
| void setType | ( | LicenseType | license | ) |
Definition at line 44 of file License.cpp.
|
overridevirtual |
Formatted string version for debugging purposes.
| sPrefix | String prefix which will be added in front of every new line |
| bShort | Instead of the whole content of all classes stored as members just a single unique identifier will be displayed without line breaks. |
Reimplemented from Base.
Definition at line 152 of file License.cpp.
|
private |
|
private |