#include <coherence/lang/AbstractHeapAnalyzer.hpp>
Inherits Object, and HeapAnalyzer.
Inherited by ClassBasedHeapAnalyzer.
Most notibly it includes support for detecting analyzer reentrance so that analyzers can avoid endlessly recursing if they create objects as part of the registration process.
Public Types | ||||
| typedef spec::Handle | Handle | |||
| AbstractHeapAnalyzer Handle definition. | ||||
| typedef spec::View | View | |||
| AbstractHeapAnalyzer View definition. | ||||
| typedef spec::Holder | Holder | |||
| AbstractHeapAnalyzer Holder definition. | ||||
Public Member Functions | ||||
| virtual void | toStream (std::ostream &out) const | |||
| Capture a snapshot and output it to the supplied stream. | ||||
Protected Member Functions | ||||
| virtual void | safeRegisterObject (const Object &o)=0 | |||
| Registers an object with the heap analyzer. | ||||
| virtual void | safeUnregisterObject (const Object &o)=0 | |||
| Unregisters an object with the heap analyzer. | ||||
| virtual void | registerObject (const Object &o) | |||
| Register a newly created Object with the system. This method is called automatically by coherence::lang::Object once the Object has finished construction.
| ||||
| virtual void | unregisterObject (const Object &o) | |||
| Unregister an Object with the system. This method is called automatically by coherence::lang::Object just prior to the deletion of the Object. No new handles or views may be created to the object.
| ||||
| virtual void safeRegisterObject | ( | const Object & | o | ) | [protected, pure virtual] |
Registers an object with the heap analyzer.
| o | the object to register |
Implemented in ClassBasedHeapAnalyzer.
| virtual void safeUnregisterObject | ( | const Object & | o | ) | [protected, pure virtual] |
Unregisters an object with the heap analyzer.
| o | the object to unregister |
Implemented in ClassBasedHeapAnalyzer.
| virtual void registerObject | ( | const Object & | o | ) | [protected, virtual] |
Register a newly created Object with the system.
This method is called automatically by coherence::lang::Object once the Object has finished construction.
| o | the newly created Object. |
If the calling thread is reentering this method return immediatley otherwise delegates to safeRegisterObject.
Implements HeapAnalyzer.
Reimplemented in ClassBasedHeapAnalyzer.
| virtual void unregisterObject | ( | const Object & | o | ) | [protected, virtual] |
Unregister an Object with the system.
This method is called automatically by coherence::lang::Object just prior to the deletion of the Object. No new handles or views may be created to the object.
| o | the Object to unregister |
If the calling thread is reentering this method return immediatley otherwise delegates to safeUnregisterObject.
Implements HeapAnalyzer.
Reimplemented in ClassBasedHeapAnalyzer.
| virtual void toStream | ( | std::ostream & | out | ) | const [virtual] |
Capture a snapshot and output it to the supplied stream.
| out | the stream to output to |
Reimplemented from Object.