|
hydrogen 1.2.6
|
#include <InstrumentComponent.h>
Public Member Functions | |
| InstrumentComponent (int related_drumkit_componentID) | |
| InstrumentComponent (std::shared_ptr< InstrumentComponent > other) | |
| ~InstrumentComponent () | |
| std::vector< std::shared_ptr< InstrumentLayer > >::iterator | begin () |
| Iteration. | |
| std::vector< std::shared_ptr< InstrumentLayer > >::iterator | end () |
| int | get_drumkit_componentID () |
| Returns the component ID of the drumkit. | |
| float | get_gain () const |
| std::shared_ptr< InstrumentLayer > | get_layer (int idx) |
| std::shared_ptr< InstrumentLayer > | operator[] (int ix) |
| void | save_to (XMLNode *node, int component_id, bool bRecentVersion=true, bool bFull=false) |
| void | set_drumkit_componentID (int related_drumkit_componentID) |
| Sets the component ID __related_drumkit_componentID. | |
| void | set_gain (float gain) |
| void | set_layer (std::shared_ptr< InstrumentLayer > layer, int idx) |
| QString | toQString (const QString &sPrefix="", bool bShort=true) const override |
| Formatted string version for debugging purposes. | |
Public Member Functions inherited from Object< InstrumentComponent > | |
| Object () | |
| Object (const Object< InstrumentComponent > &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 int | getMaxLayers () |
| static std::shared_ptr< InstrumentComponent > | load_from (XMLNode *pNode, const QString &sDrumkitPath, const License &drumkitLicense=License(), bool bSilent=false) |
| static void | setMaxLayers (int layers) |
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 | |
| float | __gain |
| std::vector< std::shared_ptr< InstrumentLayer > > | __layers |
| int | __related_drumkit_componentID |
| Component ID of the drumkit. | |
Static Private Attributes | |
| static int | m_nMaxLayers |
| Maximum number of layers to be used in the Instrument editor. | |
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< InstrumentComponent > | |
| ~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 |
Definition at line 43 of file InstrumentComponent.h.
| InstrumentComponent | ( | int | related_drumkit_componentID | ) |
Definition at line 46 of file InstrumentComponent.cpp.
| InstrumentComponent | ( | std::shared_ptr< InstrumentComponent > | other | ) |
Definition at line 56 of file InstrumentComponent.cpp.
| ~InstrumentComponent | ( | ) |
Definition at line 71 of file InstrumentComponent.cpp.
| std::vector< std::shared_ptr< InstrumentLayer > >::iterator begin | ( | ) |
Iteration.
Definition at line 182 of file InstrumentComponent.cpp.
| std::vector< std::shared_ptr< InstrumentLayer > >::iterator end | ( | ) |
Definition at line 186 of file InstrumentComponent.cpp.
|
inline |
Returns the component ID of the drumkit.
Definition at line 113 of file InstrumentComponent.h.
|
inline |
Definition at line 123 of file InstrumentComponent.h.
|
inline |
Definition at line 134 of file InstrumentComponent.h.
|
static |
Definition at line 89 of file InstrumentComponent.cpp.
|
static |
Definition at line 94 of file InstrumentComponent.cpp.
|
inline |
Definition at line 128 of file InstrumentComponent.h.
| void save_to | ( | XMLNode * | node, |
| int | component_id, | ||
| bool | bRecentVersion = true, | ||
| bool | bFull = false ) |
Definition at line 127 of file InstrumentComponent.cpp.
|
inline |
Sets the component ID __related_drumkit_componentID.
| related_drumkit_componentID | New value for the component ID |
Definition at line 107 of file InstrumentComponent.h.
|
inline |
Definition at line 118 of file InstrumentComponent.h.
| void set_layer | ( | std::shared_ptr< InstrumentLayer > | layer, |
| int | idx ) |
Definition at line 78 of file InstrumentComponent.cpp.
|
static |
| layers | Sets m_nMaxLayers. |
Definition at line 84 of file InstrumentComponent.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 147 of file InstrumentComponent.cpp.
|
private |
Definition at line 91 of file InstrumentComponent.h.
|
private |
Definition at line 101 of file InstrumentComponent.h.
|
private |
Component ID of the drumkit.
It is set by set_drumkit_componentID() and accessed via get_drumkit_componentID().
Definition at line 90 of file InstrumentComponent.h.
|
staticprivate |
Maximum number of layers to be used in the Instrument editor.
It is set by setMaxLayers(), queried by getMaxLayers(), and inferred from Preferences::m_nMaxLayers. Default value assigned in Preferences::Preferences(): 16.
Definition at line 100 of file InstrumentComponent.h.