Changeset 162

Show
Ignore:
Timestamp:
07/17/08 16:00:55 (6 months ago)
Author:
zork
Message:

suport for stream debug flag

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dba/dba/stream.h

    r97 r162  
    1616#include "shared_ptr.h" 
    1717#include <list> 
     18 
     19#define _DEBUG 
    1820 
    1921namespace dba { 
     
    113115    virtual void destroy() = 0; 
    114116    /** 
     117      Enable debugging and tracing for stream 
     118    */ 
     119#ifdef _DEBUG 
     120    void enableDebug(bool pFlag = true) { mDebugFlag = pFlag; }; 
     121#else 
     122    void enableDebug(bool pFlag = true) {}; 
     123#endif 
     124    /** 
    115125      Desctructor 
    116126    */   
     
    172182    */ 
    173183    void createTree(const StoreTable* pRootTable); 
     184#ifdef _DEBUG 
     185    /** 
     186      Stream debugging 
     187    */ 
     188    void debug(const char* pFormat, ...); 
     189#else 
     190    void debug(const char* pFormat, ...) {}; 
     191#endif 
    174192    /** 
    175193      Data for binded variables 
     
    246264    */ 
    247265    const char* mRootTable; 
     266#ifdef _DEBUG 
     267    /** 
     268      True if stream should output debug information 
     269    */ 
     270    bool mDebugFlag; 
     271#endif 
    248272  private: 
    249273    void unbindVar(void* pPtr);