Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

idObject.h

00001 /*
00002  *                         Sun Public License Notice
00003  *
00004  * The contents of this file are subject to the Sun Public License
00005  * Version 1.0 (the "License"); you may not use this file except
00006  * in compliance with the License. A copy of the License is available
00007  * at http://www.sun.com/
00008  *
00009  * The Original Code is the Java Profiler module.  The Initial Developers
00010  * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner,
00011  * Lukas Petru and Marek Przeczek.
00012  *
00013  * Portions created by Jan Stola are Copyright (C) 2000-2001.
00014  * All Rights Reserved.
00015  *
00016  * Portions created by Pavel Vacha are Copyright (C) 2000-2001.
00017  * All Rights Reserved.
00018  *
00019  * Portions created by Michal Pise are Copyright (C) 2000-2001.
00020  * All Rights Reserved.
00021  *
00022  * Portions created by Petr Luner are Copyright (C) 2000-2001.
00023  * All Rights Reserved.
00024  *
00025  * Portions created by Lukas Petru are Copyright (C) 2000-2001.
00026  * All Rights Reserved.
00027  *
00028  * Portions created by Marek Przeczek are Copyright (C) 2000-2001.
00029  * All Rights Reserved.
00030  *
00031  * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner,
00032  *               Lukas Petru and Marek Przeczek.
00033  */
00034 
00035 #ifndef _ID_OBJECT_H_
00036 #define _ID_OBJECT_H_
00037 
00038 #include "../main/includes.h"
00039 
00048 class IdObject {
00049 
00051         jint profId;
00052 
00054         int _active;
00055 
00056 public:
00057 
00059         enum eClassIdent {
00060 
00061                 ALLOC = 1, // 0001b
00062                 CPU   = 2, // 0010b
00063                 MON   = 4, // 0100b
00064 
00065                 ALLOC_ARENA                = ( 1 << 8),
00066                 ALLOC_OBJECT               = ( 2 << 8) | ALLOC,
00067                 ALLOC_OBJECT_METHOD        = ( 3 << 8) | ALLOC,
00068                 ALLOC_OBJECT_TRACE         = ( 4 << 8) | ALLOC,
00069                 ALLOC_THREAD_METHOD        = ( 5 << 8) | ALLOC,
00070                 ALLOC_THREAD_OBJECT        = ( 6 << 8) | ALLOC,
00071                 ALLOC_THREAD_OBJECT_METHOD = ( 7 << 8) | ALLOC,
00072                 ALLOC_THREAD_OBJECT_TRACE  = ( 8 << 8) | ALLOC,
00073                 ALLOC_THREAD_TRACE         = ( 9 << 8) | ALLOC,
00074                 ALLOC_TRACE                = (10 << 8) | ALLOC,
00075                 CPU_THREAD_METHOD          = (11 << 8) | CPU,
00076                 CPU_THREAD_TRACE           = (12 << 8) | CPU,
00077                 CPU_TRACE                  = (13 << 8) | CPU,
00078                 GARBAGE_C                  = (14 << 8),           // don't use GC as a name of type !!!
00079                 CLASS                      = (15 << 8),
00080                 CLASS_FIELD                = (16 << 8),
00081                 GROUP_THREAD               = (17 << 8),
00082                 METHOD                     = (18 << 8) | ALLOC | CPU | MON,
00083                 THREAD                     = (19 << 8) | ALLOC,
00084                 MON_THREAD_METHOD          = (20 << 8) | MON,
00085                 MON_THREAD_TRACE           = (21 << 8) | MON,
00086                 MON_TRACE                  = (22 << 8) | MON
00087         };
00088 
00089 public:
00090 
00095         IdObject();
00096 
00098         virtual ~IdObject() {}
00099 
00105         jint getProfID() { return profId;}
00106 
00114         int isOfType( eClassIdent classIdent) {
00115         
00116                 return (getClassIdent() == classIdent);
00117         }
00118 
00123         virtual eClassIdent getClassIdent() = 0;
00124 
00131         virtual int isActive() { return 1;}
00132 
00138   int activeChanged();
00139 
00145         virtual int isChanged() { return activeChanged();}
00146 
00149         virtual void setUnchanged() { _active = isActive();}
00150 };
00151 
00152 #endif // _ID_OBJECT_H_

Generated on Mon Jan 28 14:53:26 2002 for Java Profiler Dynamic Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001