00001 /* 00009 * LEGAL: COPYRIGHT (C) 2006 JIM E. BROOKS 00010 * THIS SOURCE CODE IS RELEASED UNDER THE TERMS 00011 * OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2). 00012 *****************************************************************************/ 00013 00014 #ifndef ENG_STATS 00015 #define ENG_STATS 1 00016 00017 #include "base_stats.hh" 00018 00019 namespace eng { 00020 00021 #if ! STATS 00022 00023 // Expands code. 00024 #define ENGINE_STATS_CODE( CODE ) {{ }} 00025 00026 #else 00027 00028 #define ENGINE_STATS_CODE( CODE ) {{ CODE }} 00029 00033 class EngineStats 00034 { 00035 public: 00036 EngineStats( void ); 00037 private: 00039 class ListenerPreDraw : public Event<>::ListenerFunctor 00040 { 00041 public: 00042 ListenerPreDraw( EngineStats& stats ) : mEngineStats(stats) { } 00043 void operator()( Void nothing ); 00044 private: 00045 EngineStats& mEngineStats; 00046 }; 00047 00048 public: 00049 uint mGraphsDrawn; 00050 uint mObjectsDrawn; 00051 }; 00052 00053 ostream& operator<<( ostream& strm, const EngineStats& stats ); 00054 00055 #endif // STATS 00056 00057 } // namespace eng 00058 00059 #endif // ENG_STATS_HH
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:09 2007