|
hydrogen 1.1.1
|
Base class. More...
#include <Object.h>
Data Structures | |
| struct | obj_cpt_t |
| an objects class map item type More... | |
Public Member Functions | |
| ~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 Member Functions | |
| 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 | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Static Protected Attributes | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
Private Types | |
| typedef std::map< const char *, obj_cpt_t > | object_map_t |
| the objects class map type More... | |
Static Private Member Functions | |
| static void | del_object (const Object *obj) |
| search for the class name within __objects_map, decrease class and global counts More... | |
| static void | add_object (const Object *obj, bool copy) |
| search for the class name within __objects_map, create it if doesn't exists, increase class and global counts More... | |
Private Attributes | |
| const char * | __class_name |
| the object class name More... | |
Static Private Attributes | |
| static bool | __count = false |
| should we count class instances More... | |
| static unsigned | __objects_count = 0 |
| total objects count More... | |
| static object_map_t | __objects_map |
| objects classes and instances count structure More... | |
| static pthread_mutex_t | __mutex |
| yeah this has to be thread safe More... | |
Base class.
|
private |
the objects class map type
| ~Object | ( | ) |
destructor
| Object | ( | const char * | class_name | ) |
constructor
|
inlinestaticprivate |
search for the class name within __objects_map, create it if doesn't exists, increase class and global counts
| obj | the object to be taken into account |
| copy | is it called from a copy constructor |
|
static |
must be called before any Object instantiation !
| logger | the logger instance used to send messages to |
| count | should we count objects instances or not |
|
inline |
return the class name
|
inlinestatic |
return true if class instances counting is enabled
|
inlinestaticprivate |
search for the class name within __objects_map, decrease class and global counts
| obj | the object to be taken into account |
|
inlinestatic |
return the logger instance
|
inlinestatic |
return the number of objects
| void Print | ( | bool | bShort = true | ) | const |
Prints content of toQString() via DEBUGLOG.
| bShort | Whether to display the content of the member class variables and to use line breaks. |
|
static |
enable/disable class instances counting
| flag | the counting status to set |
|
virtual |
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 in ADSR, AutomationPath, Drumkit, DrumkitComponent, Instrument, InstrumentComponent, InstrumentLayer, InstrumentList, Note, Pattern, PatternList, Sample, and Song.
|
static |
output the full objects map to a given ostream
| out | the ostream to write to |
|
inlinestatic |
output objects map to stderr
|
private |
the object class name
|
staticprivate |
should we count class instances
|
staticprotected |
logger instance pointer
|
staticprivate |
yeah this has to be thread safe
|
staticprivate |
total objects count
|
staticprivate |
objects classes and instances count structure
|
static |
String used to format the debugging string output of some core classes.