#ifndef _RESOURCEUSEEVENTSINK_H #define _RESOURCEUSEEVENTSINK_H #include "define_platform.h" //set this on anything that accepts it to recieve memory delta information //passive classes (classes that do not directly do anything) may use this interface to //respond to changes in memory usage triggered by external function calls //ResourceMonitor can recieve notifications from another ResourceMonitor //but also keeps track of its own memory usage class ResourceMonitor { //for recieving notfications from other ResourceMonitor's protected: size_t m_memoryUsage; ResourceMonitor *m_re; //for signalling changes (optional) friend class Report_DomainSummary; friend class Report_Full; public: ResourceMonitor(ResourceMonitor *_re=0); //optionally set the listener on instanciation virtual void setResourceMonitorEventSink(ResourceMonitor *_re=0); virtual const int memoryDelta(const int bytes, ResourceMonitor *ru=0); //for recieving notfications from other ResourceMonitor's }; #endif