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

ClassInfo Class Reference

#include <threads.h>

List of all members.

Public Methods

 ClassInfo (const ClassInfo &)
 ~ClassInfo ()
 ClassInfo (char *class_name, char *source_name, jclassID class_id)
const char* getShortInfo () const

Private Attributes

char* m_printable
char* m_class_name
char* m_source_name
jclassID m_class_id


Constructor & Destructor Documentation

ClassInfo::ClassInfo ( const ClassInfo & ci )
 

Definition at line 87 of file threads.cpp.

00088 {
00089     m_class_name = ci.m_class_name;
00090     m_source_name = ci.m_source_name;
00091     m_class_id = ci.m_class_id;
00092 
00093     if (ci.m_printable == null)
00094     {
00095         m_printable = null;
00096     }
00097     else
00098     {
00099         m_printable = new char[512];
00100         strncpy(m_printable, ci.m_printable, 512);
00101     }
00102 }

ClassInfo::~ClassInfo ( )
 

Definition at line 104 of file threads.cpp.

00105 {
00106     delete[] m_printable ;  // works even if m_printable is null
00107 }

ClassInfo::ClassInfo ( char * class_name,
char * source_name,
jclassID class_id )
 

Definition at line 109 of file threads.cpp.

00110 {
00111     if (!HotSpot)
00112     {
00113         m_class_name = class_name;
00114         m_source_name = source_name;
00115     }
00116     else
00117     {
00118 
00119         m_class_name = new char[512];
00120         strncpy(m_class_name, class_name, 512);
00121         
00122         if (source_name != null)
00123         {
00124             m_source_name = new char[512];
00125             strncpy(m_source_name, source_name, 512);
00126         }
00127         else
00128             m_source_name = null;
00129 
00130     }
00131     m_class_id = class_id;
00132     m_printable = null;
00133 }


Member Function Documentation

const char * ClassInfo::getShortInfo ( ) const [inline]
 

Definition at line 135 of file threads.cpp.

00136 {
00137     if (m_printable != null)
00138         return m_printable;
00139     m_printable = new char[512];
00140     _snprintf(m_printable, 512, "%08X %s %s", m_class_id, m_class_name, (m_source_name == null) ? "unknown" : m_source_name);
00141     return m_printable;
00142 }


Member Data Documentation

jclassID ClassInfo::m_class_id [private]
 

Definition at line 69 of file threads.h.

char * ClassInfo::m_class_name [private]
 

Definition at line 67 of file threads.h.

char * ClassInfo::m_printable [mutable, private]
 

Definition at line 66 of file threads.h.

char * ClassInfo::m_source_name [private]
 

Definition at line 68 of file threads.h.


The documentation for this class was generated from the following files:
Generated at Sun Jun 24 20:59:10 2001 for xdprof by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001