hydrogen 1.2.6
Object.h File Reference

Go to the source code of this file.

Data Structures

struct  atomic_obj_cpt_t
 an objects class map item type More...
 
class  Base
 Base class. More...
 
struct  obj_cpt_t
 
class  Object< T >
 

Namespaces

namespace  H2Core
 

Macros

#define ___DEBUGLOG(x)
 
#define ___ERRORLOG(x)
 
#define ___INFOLOG(x)
 
#define ___WARNINGLOG(x)
 
#define __DEBUGLOG(x)
 
#define __ERRORLOG(x)
 
#define __INFOLOG(x)
 
#define __LOG(logger, lvl, msg)
 
#define __LOG_CLASS( lvl, msg)
 
#define __LOG_METHOD( lvl, msg)
 
#define __LOG_OBJ( lvl, msg)
 
#define __LOG_STATIC( lvl, msg)
 
#define __WARNINGLOG(x)
 
#define _DEBUGLOG(x)
 
#define _ERRORLOG(x)
 
#define _INFOLOG(x)
 
#define _WARNINGLOG(x)
 
#define CLOCK(...)
 
#define CLOCKIN(...)
 
#define DEBUGLOG(x)
 
#define ERRORLOG(x)
 
#define H2_OBJECT(name)
 
#define INFOLOG(x)
 
#define WARNINGLOG(x)
 

Typedefs

typedef struct H2Core::atomic_obj_cpt_t atomic_obj_cpt_t
 an objects class map item type
 
typedef std::map< const char *, const atomic_obj_cpt_t * > object_internal_map_t
 
typedef std::map< const char *, obj_cpt_tobject_map_t
 the objects class map types
 

Functions

QDebug operator<< (QDebug d, Base *o)
 
QDebug operator<< (QDebug d, std::shared_ptr< Base > o)
 
std::ostream & operator<< (std::ostream &os, const Base &object)
 
std::ostream & operator<< (std::ostream &os, const Base *object)
 

Variables

template<typename T>
atomic_obj_cpt_t Object< T >::counters
 

Macro Definition Documentation

◆ ___DEBUGLOG

#define ___DEBUGLOG ( x)
Value:
#define __LOG_STATIC( lvl, msg)
Definition Object.h:235

Definition at line 257 of file Object.h.

◆ ___ERRORLOG

#define ___ERRORLOG ( x)
Value:

Definition at line 260 of file Object.h.

◆ ___INFOLOG

#define ___INFOLOG ( x)
Value:

Definition at line 258 of file Object.h.

◆ ___WARNINGLOG

#define ___WARNINGLOG ( x)
Value:

Definition at line 259 of file Object.h.

◆ __DEBUGLOG

#define __DEBUGLOG ( x)
Value:
#define __LOG_OBJ( lvl, msg)
Definition Object.h:234

Definition at line 251 of file Object.h.

◆ __ERRORLOG

#define __ERRORLOG ( x)
Value:

Definition at line 254 of file Object.h.

◆ __INFOLOG

#define __INFOLOG ( x)
Value:

Definition at line 252 of file Object.h.

◆ __LOG

#define __LOG ( logger,
lvl,
msg )
Value:
if( (logger)->should_log( (lvl) ) ) { (logger)->log( (lvl), 0, 0, QString( "%1" ).arg( msg ) ); }

Definition at line 236 of file Object.h.

◆ __LOG_CLASS

#define __LOG_CLASS ( lvl,
msg )
Value:
if( logger()->should_log( (lvl) ) ) { logger()->log( (lvl), _class_name(), __FUNCTION__, QString( "%1" ).arg( msg ) ); }

Definition at line 233 of file Object.h.

◆ __LOG_METHOD

#define __LOG_METHOD ( lvl,
msg )
Value:
if( __logger->should_log( (lvl) ) ) { __logger->log( (lvl), _class_name(), __FUNCTION__, QString( "%1" ).arg( msg ) ); }

Definition at line 232 of file Object.h.

◆ __LOG_OBJ

#define __LOG_OBJ ( lvl,
msg )
Value:
if( __object->logger()->should_log( (lvl) ) ) { __object->logger()->log( (lvl), 0, __PRETTY_FUNCTION__, QString( "%1" ).arg( msg ) ); }

Definition at line 234 of file Object.h.

◆ __LOG_STATIC

#define __LOG_STATIC ( lvl,
msg )
Value:
if( H2Core::Logger::get_instance()->should_log( (lvl) ) ) { H2Core::Logger::get_instance()->log( (lvl), 0, __PRETTY_FUNCTION__, QString( "%1" ).arg( msg ) ); }
void log(unsigned level, const QString &sClassName, const char *func_name, const QString &sMsg, const QString &sColor="")
the log function
Definition Logger.cpp:223
static Logger * get_instance()
Returns a pointer to the current H2Core::Logger singleton stored in __instance.
Definition Logger.h:81

Definition at line 235 of file Object.h.

◆ __WARNINGLOG

#define __WARNINGLOG ( x)
Value:

Definition at line 253 of file Object.h.

◆ _DEBUGLOG

#define _DEBUGLOG ( x)
Value:
#define __LOG_CLASS( lvl, msg)
Definition Object.h:233

Definition at line 245 of file Object.h.

◆ _ERRORLOG

#define _ERRORLOG ( x)
Value:

Definition at line 248 of file Object.h.

◆ _INFOLOG

#define _INFOLOG ( x)
Value:

Definition at line 246 of file Object.h.

◆ _WARNINGLOG

#define _WARNINGLOG ( x)
Value:

Definition at line 247 of file Object.h.

◆ CLOCK

#define CLOCK ( ...)
Value:
__LOG_METHOD( H2Core::Logger::Debug, base_clock( QString( "%1" ).arg( #__VA_ARGS__ ) ) );
#define __LOG_METHOD( lvl, msg)
Definition Object.h:232

Definition at line 263 of file Object.h.

◆ CLOCKIN

#define CLOCKIN ( ...)
Value:
__LOG_METHOD( H2Core::Logger::Debug, base_clock_in( QString( "%1" ).arg( #__VA_ARGS__ ) ) );

Definition at line 264 of file Object.h.

◆ DEBUGLOG

#define DEBUGLOG ( x)
Value:

Definition at line 239 of file Object.h.

◆ ERRORLOG

#define ERRORLOG ( x)
Value:

Definition at line 242 of file Object.h.

◆ H2_OBJECT

#define H2_OBJECT ( name)
Value:
public: static const char* _class_name() { return #name; } \
const char* class_name() const override { return _class_name(); }

Definition at line 227 of file Object.h.

◆ INFOLOG

#define INFOLOG ( x)
Value:

Definition at line 240 of file Object.h.

◆ WARNINGLOG

#define WARNINGLOG ( x)
Value:

Definition at line 241 of file Object.h.