hydrogen 1.2.3
SoundLibraryInfo Class Reference

This class holds information about a soundlibrary. More...

#include <SoundLibraryInfo.h>

Inheritance diagram for SoundLibraryInfo:
Object< SoundLibraryInfo > Base

Public Member Functions

 SoundLibraryInfo ()
 
 ~SoundLibraryInfo ()
 
QString getAuthor () const
 
QString getCategory () const
 
QString getDrumkitName ()
 
QString getImage () const
 
H2Core::License getImageLicense () const
 
QString getInfo () const
 
H2Core::License getLicense () const
 
QString getName () const
 
QString getPath ()
 
QString getType () const
 
QString getUrl () const
 
bool load (const QString &sPath)
 Reads the content found in sPath.
 
void setAuthor (const QString &author)
 
void setCategory (const QString &category)
 
void setDrumkitName (const QString &sDrumkitName)
 
void setImage (const QString &image)
 
void setImageLicense (const H2Core::License &imageLicense)
 
void setInfo (const QString &info)
 
void setLicense (const H2Core::License &license)
 
void setName (const QString &name)
 
void setPath (const QString &path)
 
void setType (const QString &type)
 
void setUrl (const QString &url)
 
QString toQString (const QString &sPrefix="", bool bShort=true) const override
 Formatted string version for debugging purposes.
 
- Public Member Functions inherited from Object< SoundLibraryInfo >
 Object ()
 
 Object (const Object< SoundLibraryInfo > &other)
 
- Public Member Functions inherited from Base
 Base ()
 
 Base (const Base &other)
 
virtual const char * class_name () const
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG.
 

Private Attributes

H2Core::License m_imageLicense
 
H2Core::License m_license
 
QString m_sAuthor
 
QString m_sCategory
 
QString m_sDrumkitName
 Drumkit the pattern was created with.
 
QString m_sImage
 
QString m_sInfo
 
QString m_sName
 
QString m_sPath
 
QString m_sType
 
QString m_sURL
 

Additional Inherited Members

- 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 Loggerlogger ()
 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
 
- 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< SoundLibraryInfo >
 ~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
 

Detailed Description

This class holds information about a soundlibrary.

This class is used to represent soundlibrary items. It contains the metadata for (songs,) pattern, and drumkits.

Author
Sebastian Moors

Definition at line 46 of file SoundLibraryInfo.h.

Constructor & Destructor Documentation

◆ SoundLibraryInfo()

Definition at line 31 of file SoundLibraryInfo.cpp.

◆ ~SoundLibraryInfo()

Definition at line 112 of file SoundLibraryInfo.cpp.

Member Function Documentation

◆ getAuthor()

QString getAuthor ( ) const
inline

Definition at line 73 of file SoundLibraryInfo.h.

◆ getCategory()

QString getCategory ( ) const
inline

Definition at line 77 of file SoundLibraryInfo.h.

◆ getDrumkitName()

QString getDrumkitName ( )
inline

Definition at line 144 of file SoundLibraryInfo.h.

◆ getImage()

QString getImage ( ) const
inline

Definition at line 89 of file SoundLibraryInfo.h.

◆ getImageLicense()

H2Core::License getImageLicense ( ) const
inline

Definition at line 93 of file SoundLibraryInfo.h.

◆ getInfo()

QString getInfo ( ) const
inline

Definition at line 69 of file SoundLibraryInfo.h.

◆ getLicense()

H2Core::License getLicense ( ) const
inline

Definition at line 85 of file SoundLibraryInfo.h.

◆ getName()

QString getName ( ) const
inline

Definition at line 61 of file SoundLibraryInfo.h.

◆ getPath()

QString getPath ( )
inline

Definition at line 137 of file SoundLibraryInfo.h.

◆ getType()

QString getType ( ) const
inline

Definition at line 81 of file SoundLibraryInfo.h.

◆ getUrl()

QString getUrl ( ) const
inline

Definition at line 65 of file SoundLibraryInfo.h.

◆ load()

bool load ( const QString & sPath)

Reads the content found in sPath.

Parameters
sPathPath to .h2pattern XML file
Returns
true on success

Definition at line 36 of file SoundLibraryInfo.cpp.

◆ setAuthor()

void setAuthor ( const QString & author)
inline

Definition at line 109 of file SoundLibraryInfo.h.

◆ setCategory()

void setCategory ( const QString & category)
inline

Definition at line 117 of file SoundLibraryInfo.h.

◆ setDrumkitName()

void setDrumkitName ( const QString & sDrumkitName)
inline

Definition at line 141 of file SoundLibraryInfo.h.

◆ setImage()

void setImage ( const QString & image)
inline

Definition at line 125 of file SoundLibraryInfo.h.

◆ setImageLicense()

void setImageLicense ( const H2Core::License & imageLicense)
inline

Definition at line 129 of file SoundLibraryInfo.h.

◆ setInfo()

void setInfo ( const QString & info)
inline

Definition at line 105 of file SoundLibraryInfo.h.

◆ setLicense()

void setLicense ( const H2Core::License & license)
inline

Definition at line 121 of file SoundLibraryInfo.h.

◆ setName()

void setName ( const QString & name)
inline

Definition at line 97 of file SoundLibraryInfo.h.

◆ setPath()

void setPath ( const QString & path)
inline

Definition at line 133 of file SoundLibraryInfo.h.

◆ setType()

void setType ( const QString & type)
inline

Definition at line 113 of file SoundLibraryInfo.h.

◆ setUrl()

void setUrl ( const QString & url)
inline

Definition at line 101 of file SoundLibraryInfo.h.

◆ toQString()

QString toQString ( const QString & sPrefix = "",
bool bShort = true ) const
overridevirtual

Formatted string version for debugging purposes.

Parameters
sPrefixString prefix which will be added in front of every new line
bShortInstead of the whole content of all classes stored as members just a single unique identifier will be displayed without line breaks.
Returns
String presentation of current object.

Reimplemented from Base.

Definition at line 117 of file SoundLibraryInfo.cpp.

Field Documentation

◆ m_imageLicense

H2Core::License m_imageLicense
private

Definition at line 167 of file SoundLibraryInfo.h.

◆ m_license

H2Core::License m_license
private

Definition at line 165 of file SoundLibraryInfo.h.

◆ m_sAuthor

QString m_sAuthor
private

Definition at line 162 of file SoundLibraryInfo.h.

◆ m_sCategory

QString m_sCategory
private

Definition at line 163 of file SoundLibraryInfo.h.

◆ m_sDrumkitName

QString m_sDrumkitName
private

Drumkit the pattern was created with.

Definition at line 171 of file SoundLibraryInfo.h.

◆ m_sImage

QString m_sImage
private

Definition at line 166 of file SoundLibraryInfo.h.

◆ m_sInfo

QString m_sInfo
private

Definition at line 161 of file SoundLibraryInfo.h.

◆ m_sName

QString m_sName
private

Definition at line 159 of file SoundLibraryInfo.h.

◆ m_sPath

QString m_sPath
private

Definition at line 168 of file SoundLibraryInfo.h.

◆ m_sType

QString m_sType
private

Definition at line 164 of file SoundLibraryInfo.h.

◆ m_sURL

QString m_sURL
private

Definition at line 160 of file SoundLibraryInfo.h.