32 #ifndef HURRICANE_DEBUG_SESSION_H
33 #define HURRICANE_DEBUG_SESSION_H
37 #include "hurricane/Commons.h"
61 static inline bool isTraced (
const void* symbol );
62 static inline void isTracedNet (
const Net* );
63 static inline void addToTrace (
const void* symbol );
66 static inline void open (
int minLevel,
int maxLevel );
67 static inline void open (
const void* symbol,
int minLevel,
int maxLevel );
68 static inline void close ();
70 inline bool _isTraced (
const void* symbol )
const;
71 inline void _addToTrace (
const void* symbol );
72 void _addToTrace (
const Cell*,
const Name& );
73 inline void _addToTrace (
const Net* net );
75 Record* _getRecord ()
const;
76 string _getString ()
const;
77 string _getTypeName ()
const;
82 set<const void*> _symbols;
83 stack< pair<int,int> > _levels;
102 _singleton->_levels.push( make_pair( cdebug.
setMinLevel(minLevel)
114 if ( _singleton->_isTraced(symbol) ) {
115 _singleton->_levels.push( make_pair( cdebug.
setMinLevel(minLevel)
120 _singleton->_levels.push ( make_pair( cdebug.
getMinLevel()
130 if ( not _singleton->_levels.empty() ) {
131 cdebug.
setMinLevel( _singleton->_levels.top().first );
132 cdebug.
setMaxLevel( _singleton->_levels.top().second );
133 _singleton->_levels.pop ();
140 DebugSession* DebugSession::get () {
return _singleton; }
145 ,
const Name& name ) { _singleton->_addToTrace( cell, name ); }
146 bool DebugSession::_isTraced (
const void* symbol )
const {
return _symbols.find(symbol) != _symbols.end(); }
147 void DebugSession::_addToTrace (
const void* symbol ) { _symbols.insert( symbol ); }
148 void DebugSession::_addToTrace (
const Net* net ) { _addToTrace(
static_cast<const void*
>(net) ); }
The model (API).
Definition: Cell.h:64
Enable/Disable trace information (API).
Definition: DebugSession.h:55
static bool isTraced(const void *symbol)
Definition: DebugSession.h:141
static void addToTrace(const void *symbol)
Definition: DebugSession.h:142
static void open(int minLevel, int maxLevel)
Definition: DebugSession.h:97
static void close()
Definition: DebugSession.h:128
Name description (API)
Definition: Name.h:35
Net description (API)
Definition: Net.h:48
int setMinLevel(int)
Definition: Commons.h:1052
int setMaxLevel(int)
Definition: Commons.h:1053
int getMinLevel() const
Definition: Commons.h:1050
int getMaxLevel() const
Definition: Commons.h:1051
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5