|
hydrogen 1.1.1
|
PatternList is a collection of patterns. More...
#include <PatternList.h>
Public Member Functions | |
| PatternList () | |
| constructor More... | |
| ~PatternList () | |
| destructor More... | |
| PatternList (PatternList *other) | |
| copy constructor More... | |
| int | size () const |
| returns the numbers of patterns More... | |
| void | operator<< (Pattern *new_pattern) |
| add a pattern to the list More... | |
| Pattern * | operator[] (int idx) |
| get a pattern from the list More... | |
| void | add (Pattern *pattern) |
| add a pattern to the list More... | |
| void | insert (int idx, Pattern *pattern) |
| insert a pattern into the list More... | |
| Pattern * | get (int idx) |
| get a pattern from the list More... | |
| const Pattern * | get (int idx) const |
| Pattern * | del (int idx) |
| remove the pattern at a given index, does not delete it More... | |
| Pattern * | del (Pattern *pattern) |
| remove a pattern from the list, does not delete it More... | |
| int | index (const Pattern *pattern) |
| get the index of the pattern within the patterns More... | |
| Pattern * | replace (int idx, Pattern *pattern) |
| replace the pattern at a given index with a new one More... | |
| void | clear () |
| empty the pattern list More... | |
| void | set_to_old () |
| mark all patterns as old More... | |
| Pattern * | find (const QString &name) |
| find a pattern within the patterns More... | |
| void | swap (int idx_a, int idx_b) |
| swap the patterns of two different indexes More... | |
| void | move (int idx_a, int idx_b) |
| move a pattern from a position to another More... | |
| void | flattened_virtual_patterns_compute () |
| call compute_flattened_virtual_patterns on each pattern More... | |
| void | virtual_pattern_del (Pattern *pattern) |
| call del_virtual_pattern on each pattern More... | |
| bool | check_name (QString patternName, Pattern *ignore=NULL) |
| check if a pattern with name patternName already exists in this list More... | |
| QString | find_unused_pattern_name (QString sourceName, Pattern *ignore=NULL) |
| find unused patternName More... | |
| int | longest_pattern_length () |
| Get the length of the longest pattern in the list. More... | |
| QString | toQString (const QString &sPrefix, bool bShort=true) const override |
| Formatted string version for debugging purposes. More... | |
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... | |
Public Member Functions inherited from AudioEngineLocking | |
| void | setNeedsLock (bool bNeedsLock) |
| The audio processing thread can modify some PatternLists. More... | |
| AudioEngineLocking () | |
Private Attributes | |
| std::vector< Pattern * > | __patterns |
| the list of patterns More... | |
Additional Inherited Members | |
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 Public Attributes inherited from Object | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Protected Member Functions inherited from AudioEngineLocking | |
| void | assertAudioEngineLocked () const |
| Assert that the AudioEngine lock is held if needed. More... | |
Static Protected Attributes inherited from Object | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
PatternList is a collection of patterns.
| PatternList | ( | ) |
constructor
| ~PatternList | ( | ) |
destructor
| PatternList | ( | PatternList * | other | ) |
copy constructor
| other |
| void add | ( | Pattern * | pattern | ) |
add a pattern to the list
| pattern | a pointer to the pattern to add |
| bool check_name | ( | QString | patternName, |
| Pattern * | ignore = NULL |
||
| ) |
check if a pattern with name patternName already exists in this list
| patternName | name of a pattern to check |
| ignore | optional pattern in the list to ignore |
|
inline |
empty the pattern list
| Pattern * del | ( | int | idx | ) |
remove the pattern at a given index, does not delete it
| idx | the index |
remove a pattern from the list, does not delete it
| pattern | the pattern to be removed |
| Pattern * find | ( | const QString & | name | ) |
find a pattern within the patterns
| name | the name of the pattern to find |
| QString find_unused_pattern_name | ( | QString | sourceName, |
| Pattern * | ignore = NULL |
||
| ) |
find unused patternName
| sourceName | base name to start with |
| ignore | optional pattern in the list to ignore |
| void flattened_virtual_patterns_compute | ( | ) |
call compute_flattened_virtual_patterns on each pattern
| Pattern * get | ( | int | idx | ) |
get a pattern from the list
| idx | the index to get the pattern from |
| const Pattern * get | ( | int | idx | ) | const |
| int index | ( | const Pattern * | pattern | ) |
get the index of the pattern within the patterns
| pattern | a pointer to the pattern to find |
| void insert | ( | int | idx, |
| Pattern * | pattern | ||
| ) |
insert a pattern into the list
| idx | the index to insert the pattern at |
| pattern | a pointer to the pattern to add |
| int longest_pattern_length | ( | ) |
Get the length of the longest pattern in the list.
| void move | ( | int | idx_a, |
| int | idx_b | ||
| ) |
move a pattern from a position to another
| idx_a | the start index |
| idx_b | the finish index |
|
inline |
add a pattern to the list
| new_pattern | a pointer to the pattern to add |
|
inline |
get a pattern from the list
| idx | the index to get the pattern from |
replace the pattern at a given index with a new one
| idx | the index |
| pattern | the new pattern to insert |
| void set_to_old | ( | ) |
mark all patterns as old
|
inline |
returns the numbers of patterns
| void swap | ( | int | idx_a, |
| int | idx_b | ||
| ) |
swap the patterns of two different indexes
| idx_a | the first index |
| idx_b | the second index |
|
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 Object.
| void virtual_pattern_del | ( | Pattern * | pattern | ) |
call del_virtual_pattern on each pattern
| pattern | the pattern to remove where it's found |
|
private |
the list of patterns