Base class.
More...
#include <Object.h>
|
| | 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.
|
| |
| virtual QString | toQString (const QString &sPrefix="", bool bShort=true) const |
| | Formatted string version for debugging purposes.
|
| |
|
| static QString | sPrintIndention = " " |
| | String used to format the debugging string output of some core classes.
|
| |
Base class.
Definition at line 62 of file Object.h.
◆ Base() [1/2]
◆ Base() [2/2]
◆ ~Base()
◆ _class_name()
| static const char * _class_name |
( |
| ) |
|
|
inlinestatic |
return the class name
Definition at line 78 of file Object.h.
◆ base_clock()
| QString base_clock |
( |
const QString & | sMsg | ) |
|
|
static |
◆ base_clock_in()
| QString base_clock_in |
( |
const QString & | sMsg | ) |
|
|
static |
◆ bootstrap()
| int bootstrap |
( |
Logger * | logger, |
|
|
bool | count = false ) |
|
static |
must be called before any Object instantiation !
- Parameters
-
| logger | the logger instance used to send messages to |
| count | should we count objects instances or not |
Definition at line 66 of file Object.cpp.
◆ class_name()
| virtual const char * class_name |
( |
| ) |
const |
|
inlinevirtual |
◆ count_active()
| static bool count_active |
( |
| ) |
|
|
inlinestatic |
◆ getAliveObjectCount()
| int getAliveObjectCount |
( |
| ) |
|
|
static |
- Returns
- Total numbers of objects being alive.
Definition at line 139 of file Object.cpp.
◆ getObjectMap()
- Returns
- Copy of the object map.
Definition at line 154 of file Object.cpp.
◆ logBacktrace()
| void logBacktrace |
( |
| ) |
const |
Print the current stack at point into the debug log.
Definition at line 195 of file Object.cpp.
◆ logger()
return the logger instance
Definition at line 103 of file Object.h.
◆ objects_count()
| static int objects_count |
( |
| ) |
|
|
inlinestatic |
◆ Print()
| void Print |
( |
bool | bShort = true | ) |
const |
Prints content of toQString() via DEBUGLOG.
- Parameters
-
| bShort | Whether to display the content of the member class variables and to use line breaks. |
Definition at line 191 of file Object.cpp.
◆ printObjectMapDiff()
Creates the difference between a snapshot of the object map and its current state and prints it to std::cout.
- Parameters
-
Definition at line 167 of file Object.cpp.
◆ registerClass()
◆ set_count()
| void set_count |
( |
bool | flag | ) |
|
|
static |
enable/disable class instances counting
- Parameters
-
| flag | the counting status to set |
Definition at line 79 of file Object.cpp.
◆ toQString()
| QString toQString |
( |
const QString & | sPrefix = "", |
|
|
bool | bShort = true ) const |
|
virtual |
Formatted string version for debugging purposes.
- Parameters
-
| 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. |
- Returns
- String presentation of current object.
Reimplemented in Action, ADSR, AudioEngine, AutomationPath, Drumkit, DrumkitComponent, Hydrogen, Instrument, InstrumentComponent, InstrumentLayer, InstrumentList, License, Note, Pattern, PatternList, Playlist, Sample, Song, SoundLibraryDatabase, SoundLibraryInfo, Timeline, TransportPosition, and MidiMap.
Definition at line 186 of file Object.cpp.
◆ write_objects_map_to()
| void write_objects_map_to |
( |
std::ostream & | out, |
|
|
object_map_t * | map = nullptr ) |
|
static |
output the full objects map to a given ostream
- Parameters
-
| out | the ostream to write to |
| map | Object map to print out. Per default the current object map __objects_map will be used. |
Definition at line 89 of file Object.cpp.
◆ write_objects_map_to_cerr()
| static void write_objects_map_to_cerr |
( |
| ) |
|
|
inlinestatic |
output objects map to stderr
Definition at line 95 of file Object.h.
◆ __count
should we count class instances
Definition at line 155 of file Object.h.
◆ __last_clock
| timeval __last_clock = { 0, 0 } |
|
staticprotected |
◆ __logger
◆ __mutex
yeah this has to be thread safe
Definition at line 164 of file Object.h.
◆ __objects_count
| std::atomic< int > __objects_count |
|
staticprivate |
total objects count
Definition at line 162 of file Object.h.
◆ __objects_map
objects classes and instances count structure
Definition at line 163 of file Object.h.
◆ bLogColors
◆ sPrintIndention
| QString sPrintIndention = " " |
|
static |
String used to format the debugging string output of some core classes.
Definition at line 127 of file Object.h.