JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
JMMMonitor Class Reference

#include <JMMMonitor.h>

Inheritance diagram for JMMMonitor:
[legend]

Public Member Functions

 ~JMMMonitor () override
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (const JBroadcaster &source)
 
bool HasSenders () const
 
JSize GetSenderCount () const
 
bool HasRecipients () const
 
JSize GetRecipientCount () const
 
virtual JString ToString () const
 
template<class T >
void ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f)
 

Protected Member Functions

 JMMMonitor ()
 
void Receive (JBroadcaster *sender, const Message &message) override
 
virtual void HandleObjectDeletedAsArray (const JMMRecord &record)
 
virtual void HandleArrayDeletedAsObject (const JMMRecord &record)
 
virtual void HandleUnallocatedDeletion (const JUtf8Byte *file, const JUInt32 line, const bool isArray)
 
virtual void HandleMultipleDeletion (const JMMRecord &thisRecord, const JUtf8Byte *file, const JUInt32 line, const bool isArray)
 
virtual void HandleMultipleAllocation (const JMMRecord &thisRecord, const JMMRecord &firstRecord)
 
- Protected Member Functions inherited from JBroadcaster
 JBroadcaster (const JBroadcaster &source)
 
void ListenTo (const JBroadcaster *sender)
 
void StopListening (const JBroadcaster *sender)
 
void ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember)
 
void StopListening (const JBroadcaster *sender, const std::type_info &messageType)
 
template<class T >
void Send (JBroadcaster *recipient, const T &message)
 
template<class T >
void Broadcast (const T &message)
 
void SendWithFeedback (JBroadcaster *recipient, Message *message)
 
void BroadcastWithFeedback (Message *message)
 
virtual void ReceiveWithFeedback (JBroadcaster *sender, Message *message)
 
virtual void ReceiveGoingAway (JBroadcaster *sender)
 

Detailed Description

A (conceptually) abstract base class for objects which monitor JMemoryManager
activity.  Derived classes override the appropriate message handlers to
perform their actions.





Base code generated by Codemill v0.1.0

Constructor & Destructor Documentation

◆ ~JMMMonitor()

JMMMonitor::~JMMMonitor ( )
override

◆ JMMMonitor()

JMMMonitor::JMMMonitor ( )
protected

Member Function Documentation

◆ HandleArrayDeletedAsObject()

void JMMMonitor::HandleArrayDeletedAsObject ( const JMMRecord record)
protectedvirtual

Reimplemented in JMMDebugErrorStream, and JMMErrorPrinter.

◆ HandleMultipleAllocation()

void JMMMonitor::HandleMultipleAllocation ( const JMMRecord thisRecord,
const JMMRecord firstRecord 
)
protectedvirtual

Called when memory is allocated more than once at the same location (indicates bugs in malloc or JMM, not client code). thisRecord is the record of the allocation that generated the message, firstRecord is the record of the first allocation at that address.

Reimplemented in JMMDebugErrorStream, and JMMErrorPrinter.

◆ HandleMultipleDeletion()

void JMMMonitor::HandleMultipleDeletion ( const JMMRecord originalRecord,
const JUtf8Byte file,
const JUInt32  line,
const bool  isArray 
)
protectedvirtual

Called when an already-deleted memory block is deleted again. originalRecord is the JMMRecord for the block including its first deletion, file and line are the location of the multiple deletion that triggered the message. This message cannot be generated unless delete records are being kept; otherwise, the message is UnallocatedDeletion rather than MultipleDeletion.

Reimplemented in JMMDebugErrorStream, and JMMErrorPrinter.

◆ HandleObjectDeletedAsArray()

void JMMMonitor::HandleObjectDeletedAsArray ( const JMMRecord record)
protectedvirtual

Reimplemented in JMMDebugErrorStream, and JMMErrorPrinter.

◆ HandleUnallocatedDeletion()

void JMMMonitor::HandleUnallocatedDeletion ( const JUtf8Byte file,
const JUInt32  line,
const bool  isArray 
)
protectedvirtual

Called when a block is deleted which was never allocated (more precisely, which has no allocation record; this includes multiple deletions if delete records are not being kept).

Reimplemented in JMMDebugErrorStream, and JMMErrorPrinter.

◆ Receive()

void JMMMonitor::Receive ( JBroadcaster sender,
const Message message 
)
overrideprotectedvirtual

Process the given message from the given sender. This function is not pure virtual because not all classes will want to implement it.

Reimplemented from JBroadcaster.


The documentation for this class was generated from the following files: