statisticSampler.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef EQ_STATISTICSAMPLER_H
00019 #define EQ_STATISTICSAMPLER_H
00020
00021 #include <eq/client/configEvent.h>
00022
00023 namespace eq
00024 {
00026 template< typename Owner >
00027 class StatisticSampler
00028 {
00029 public:
00030 StatisticSampler( const Statistic::Type type, Owner* owner,
00031 const uint32_t frameNumber )
00032 : _owner( owner )
00033 {
00034 EQASSERT( owner );
00035
00036 event.data.type = Event::STATISTIC;
00037 event.data.originator = owner->getID();
00038 event.data.statistic.type = type;
00039 event.data.statistic.frameNumber = frameNumber;
00040 event.data.statistic.resourceName[0] = '\0';
00041 }
00042
00043 virtual ~StatisticSampler() {}
00044
00045 ConfigEvent event;
00046
00047 protected:
00048 Owner* const _owner;
00049 };
00050 }
00051
00052 #endif // EQ_STATISTICSAMPLER_H