hydrogen 1.2.3
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)   __LOG_STATIC( H2Core::Logger::Debug, (x) );
 
#define ___ERRORLOG(x)   __LOG_STATIC( H2Core::Logger::Error, (x) );
 
#define ___INFOLOG(x)   __LOG_STATIC( H2Core::Logger::Info, (x) );
 
#define ___WARNINGLOG(x)   __LOG_STATIC(H2Core::Logger::Warning, (x) );
 
#define __DEBUGLOG(x)   __LOG_OBJ( H2Core::Logger::Debug, (x) );
 
#define __ERRORLOG(x)   __LOG_OBJ( H2Core::Logger::Error, (x) );
 
#define __INFOLOG(x)   __LOG_OBJ( H2Core::Logger::Info, (x) );
 
#define __LOG(logger, lvl, msg)   if( (logger)->should_log( (lvl) ) ) { (logger)->log( (lvl), 0, 0, QString( "%1" ).arg( msg ) ); }
 
#define __LOG_CLASS( lvl, msg)   if( logger()->should_log( (lvl) ) ) { logger()->log( (lvl), _class_name(), __FUNCTION__, QString( "%1" ).arg( msg ) ); }
 
#define __LOG_METHOD( lvl, msg)   if( __logger->should_log( (lvl) ) ) { __logger->log( (lvl), _class_name(), __FUNCTION__, QString( "%1" ).arg( msg ) ); }
 
#define __LOG_OBJ( lvl, msg)   if( __object->logger()->should_log( (lvl) ) ) { __object->logger()->log( (lvl), 0, __PRETTY_FUNCTION__, QString( "%1" ).arg( msg ) ); }
 
#define __LOG_STATIC( lvl, msg)   if( H2Core::Logger::get_instance()->should_log( (lvl) ) ) { H2Core::Logger::get_instance()->log( (lvl), 0, __PRETTY_FUNCTION__, QString( "%1" ).arg( msg ) ); }
 
#define __WARNINGLOG(x)   __LOG_OBJ( H2Core::Logger::Warning, (x) );
 
#define _DEBUGLOG(x)   __LOG_CLASS( H2Core::Logger::Debug, (x) );
 
#define _ERRORLOG(x)   __LOG_CLASS( H2Core::Logger::Error, (x) );
 
#define _INFOLOG(x)   __LOG_CLASS( H2Core::Logger::Info, (x) );
 
#define _WARNINGLOG(x)   __LOG_CLASS( H2Core::Logger::Warning, (x) );
 
#define CLOCK(...)   __LOG_METHOD( H2Core::Logger::Debug, base_clock( QString( "%1" ).arg( #__VA_ARGS__ ) ) );
 
#define CLOCKIN(...)   __LOG_METHOD( H2Core::Logger::Debug, base_clock_in( QString( "%1" ).arg( #__VA_ARGS__ ) ) );
 
#define DEBUGLOG(x)   __LOG_METHOD( H2Core::Logger::Debug, (x) );
 
#define ERRORLOG(x)   __LOG_METHOD( H2Core::Logger::Error, (x) );
 
#define H2_OBJECT(name)
 
#define INFOLOG(x)   __LOG_METHOD( H2Core::Logger::Info, (x) );
 
#define WARNINGLOG(x)   __LOG_METHOD( H2Core::Logger::Warning, (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)
 

Macro Definition Documentation

◆ ___DEBUGLOG

#define ___DEBUGLOG ( x)    __LOG_STATIC( H2Core::Logger::Debug, (x) );

Definition at line 254 of file Object.h.

◆ ___ERRORLOG

#define ___ERRORLOG ( x)    __LOG_STATIC( H2Core::Logger::Error, (x) );

Definition at line 257 of file Object.h.

◆ ___INFOLOG

#define ___INFOLOG ( x)    __LOG_STATIC( H2Core::Logger::Info, (x) );

Definition at line 255 of file Object.h.

◆ ___WARNINGLOG

#define ___WARNINGLOG ( x)    __LOG_STATIC(H2Core::Logger::Warning, (x) );

Definition at line 256 of file Object.h.

◆ __DEBUGLOG

#define __DEBUGLOG ( x)    __LOG_OBJ( H2Core::Logger::Debug, (x) );

Definition at line 248 of file Object.h.

◆ __ERRORLOG

#define __ERRORLOG ( x)    __LOG_OBJ( H2Core::Logger::Error, (x) );

Definition at line 251 of file Object.h.

◆ __INFOLOG

#define __INFOLOG ( x)    __LOG_OBJ( H2Core::Logger::Info, (x) );

Definition at line 249 of file Object.h.

◆ __LOG

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

Definition at line 233 of file Object.h.

◆ __LOG_CLASS

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

Definition at line 230 of file Object.h.

◆ __LOG_METHOD

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

Definition at line 229 of file Object.h.

◆ __LOG_OBJ

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

Definition at line 231 of file Object.h.

◆ __LOG_STATIC

#define __LOG_STATIC ( lvl,
msg )   if( H2Core::Logger::get_instance()->should_log( (lvl) ) ) { H2Core::Logger::get_instance()->log( (lvl), 0, __PRETTY_FUNCTION__, QString( "%1" ).arg( msg ) ); }

Definition at line 232 of file Object.h.

◆ __WARNINGLOG

#define __WARNINGLOG ( x)    __LOG_OBJ( H2Core::Logger::Warning, (x) );

Definition at line 250 of file Object.h.

◆ _DEBUGLOG

#define _DEBUGLOG ( x)    __LOG_CLASS( H2Core::Logger::Debug, (x) );

Definition at line 242 of file Object.h.

◆ _ERRORLOG

#define _ERRORLOG ( x)    __LOG_CLASS( H2Core::Logger::Error, (x) );

Definition at line 245 of file Object.h.

◆ _INFOLOG

#define _INFOLOG ( x)    __LOG_CLASS( H2Core::Logger::Info, (x) );

Definition at line 243 of file Object.h.

◆ _WARNINGLOG

#define _WARNINGLOG ( x)    __LOG_CLASS( H2Core::Logger::Warning, (x) );

Definition at line 244 of file Object.h.

◆ CLOCK

#define CLOCK ( ...)    __LOG_METHOD( H2Core::Logger::Debug, base_clock( QString( "%1" ).arg( #__VA_ARGS__ ) ) );

Definition at line 260 of file Object.h.

◆ CLOCKIN

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

Definition at line 261 of file Object.h.

◆ DEBUGLOG

#define DEBUGLOG ( x)    __LOG_METHOD( H2Core::Logger::Debug, (x) );

Definition at line 236 of file Object.h.

◆ ERRORLOG

#define ERRORLOG ( x)    __LOG_METHOD( H2Core::Logger::Error, (x) );

Definition at line 239 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 224 of file Object.h.

◆ INFOLOG

#define INFOLOG ( x)    __LOG_METHOD( H2Core::Logger::Info, (x) );

Definition at line 237 of file Object.h.

◆ WARNINGLOG

#define WARNINGLOG ( x)    __LOG_METHOD( H2Core::Logger::Warning, (x) );

Definition at line 238 of file Object.h.