|
hydrogen 1.1.1
|
Files is in charge of writing and reading Patterns, Drumkits, Songs to the filesystem. More...
#include <Files.h>
Public Types | |
| enum | SaveMode { SAVE_NEW , SAVE_OVERWRITE , SAVE_PATH , SAVE_TMP } |
Static Public Member Functions | |
| static QString | savePatternNew (const QString &fileName, Pattern *pattern, Song *song, const QString &drumkitName) |
| save the given pattern to <user_data_path>/pattern/<drumkitName>/<fileName>.h2pattern will NOT overwrite an existing file More... | |
| static QString | savePatternOver (const QString &fileName, Pattern *pattern, Song *song, const QString &drumkitName) |
| save the given pattern to <user_data_path>/pattern/<drumkitName>/<fileName>.h2pattern will overwrite an existing file More... | |
| static QString | savePatternPath (const QString &filePath, Pattern *pattern, Song *song, const QString &drumkitName) |
| save the given pattern to filePath will overwrite an existing file More... | |
| static QString | savePatternTmp (const QString &fileName, Pattern *pattern, Song *song, const QString &drumkitName) |
| save the given pattern under <Tmp_directory> with a unique filename built from <fileName> will overwrite an existing file More... | |
| static QString | savePlaylistPath (const QString &filePath, Playlist *playlist, bool relativePaths) |
| save the given playlist to filePath will overwrite an existing file More... | |
Static Public Member Functions inherited from Object | |
| static void | set_count (bool flag) |
| enable/disable class instances counting More... | |
| static bool | count_active () |
| return true if class instances counting is enabled More... | |
| static unsigned | objects_count () |
| return the number of objects More... | |
| static void | write_objects_map_to (std::ostream &out) |
| output the full objects map to a given ostream More... | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr More... | |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! More... | |
| static Logger * | logger () |
| return the logger instance More... | |
Static Private Member Functions | |
| static QString | savePattern (SaveMode mode, const QString &fileName, const Pattern *pattern, Song *song, const QString &drumkitName) |
| static QString | savePlaylist (SaveMode mode, const QString &fileName, Playlist *playlist, bool relativePaths) |
Additional Inherited Members | |
Public Member Functions inherited from Object | |
| ~Object () | |
| destructor More... | |
| Object (const Object &obj) | |
| copy constructor More... | |
| Object (const char *class_name) | |
| constructor More... | |
| const char * | class_name () const |
| return the class name More... | |
| virtual QString | toQString (const QString &sPrefix, bool bShort=true) const |
| Formatted string version for debugging purposes. More... | |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. More... | |
Static Public Attributes inherited from Object | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Static Protected Attributes inherited from Object | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
Files is in charge of writing and reading Patterns, Drumkits, Songs to the filesystem.
| enum SaveMode |
|
staticprivate |
|
inlinestatic |
save the given pattern to <user_data_path>/pattern/<drumkitName>/<fileName>.h2pattern will NOT overwrite an existing file
| fileName | to build filePath from |
| pattern | the one to be saved |
| song | to access license, author info |
| drumkitName | to build filePath from and to access name info |
|
inlinestatic |
save the given pattern to <user_data_path>/pattern/<drumkitName>/<fileName>.h2pattern will overwrite an existing file
| fileName | to build filePath from |
| pattern | the one to be saved |
| song | to access license, author info |
| drumkitName | to build filePath from and to access name info |
|
inlinestatic |
save the given pattern to filePath will overwrite an existing file
| filePath | to write the pattern to |
| pattern | the one to be saved |
| song | to access license, author info |
| drumkitName | to access name info |
|
inlinestatic |
save the given pattern under <Tmp_directory> with a unique filename built from <fileName> will overwrite an existing file
| fileName | to build filePath from |
| pattern | the one to be saved |
| song | to access license, author info |
| drumkitName | to access name info |
|
staticprivate |
|
inlinestatic |
save the given playlist to filePath will overwrite an existing file
| filePath | to write the playlist to |
| playlist | the one to be saved |
| relativePaths | should the path to the songs be relative to the playlist instead of absolute |