/* * * Copyright (c) 1995 * Knowledge Science Institute, University of Calgary * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. The Knowledge Science Institute makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * */ #ifndef MOBJECT_H #define MOBJECT_H #ifndef MDEBUG_H #include #endif #ifndef __CSTRING_H #include #endif #ifndef MAP_H #include #endif #define ObjectCounterClass 7229 class METAUTIL_CLASS ObjectCounter { MDEBUG_DECL_VIRTUAL(ObjectCounter) public: ObjectCounter(); virtual ~ObjectCounter(); virtual int dummy() {return 0;} static long count() {return Count;} static void resetCount() {Count=0;} static void report(); void incObjectCount(); void decObjectCount(); private: static long Count; static map < string,int,less > Counts; }; #endif