//===========================================================================// // File: evtstat.hpp // // Project: MUNGA Brick: Event Manager // // Contents: interface specification of event manager // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 05/15/96 ECH Initial coding. // //---------------------------------------------------------------------------// // Copyright (C) 1994-1995, Virtual World Entertainment, Inc. // // PROPRIETARY AND CONFIDENTIAL // //===========================================================================// #pragma once #include "Adept.hpp" #include "Receiver.hpp" namespace Adept { //######################################################################### //######################## EventStatistics ########################## //######################################################################### class EventStatistics: public Stuff::Plug { friend class EventStatisticsManager; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Construction, Destruction // public: EventStatistics( ClassID class_id, Receiver::MessageID message_ID ); ~EventStatistics() {} //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Private Data // private: ClassID classID; Receiver::MessageID messageID; long eventCount; }; //######################################################################### //##################### EventStatisticsManager ###################### //######################################################################### class EventStatisticsManager: public Stuff::Plug { public: static void InitializeClass(); static void TerminateClass(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Construction, Destruction // public: EventStatisticsManager(); ~EventStatisticsManager() {} void TestInstance(); static EventStatisticsManager *Instance; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class Data Support // public: static ClassData *DefaultData; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Statistic collection and reporting // public: void Maintain(Event *event); void Report(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Private Data // private: Stuff::TableOf eventStatisticsSocket; bool printedReport; }; }