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

#include <JMMErrorPrinter.h>

Inheritance diagram for JMMErrorPrinter:
[legend]

Public Member Functions

 JMMErrorPrinter ()
 
 ~JMMErrorPrinter () override
 
bool GetPrintErrors () const
 
void SetPrintErrors (const bool print)
 
- Public Member Functions inherited from JMMMonitor
 ~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

void HandleObjectDeletedAsArray (const JMMRecord &record) override
 
void HandleArrayDeletedAsObject (const JMMRecord &record) override
 
void HandleUnallocatedDeletion (const JUtf8Byte *file, const JUInt32 line, const bool isArray) override
 
void HandleMultipleDeletion (const JMMRecord &thisRecord, const JUtf8Byte *file, const JUInt32 line, const bool isArray) override
 
void HandleMultipleAllocation (const JMMRecord &thisRecord, const JMMRecord &firstRecord) override
 
- Protected Member Functions inherited from JMMMonitor
 JMMMonitor ()
 
void Receive (JBroadcaster *sender, const Message &message) override
 
- 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

Interface for the JMMErrorPrinter class.

Base code generated by Codemill v0.1.0

A simple JMMMonitor which listens for error messages from the memory
manager and prints them to std::cerr.  It is intended only as a proxy object
for JMemoryManager, so its environment variable is documented there and
its public interface is exposed there.  Anyone wanting to do a similar
job would need to create their own JMMMonitor anyway.





Base code generated by Codemill v0.1.0

Constructor & Destructor Documentation

◆ JMMErrorPrinter()

JMMErrorPrinter::JMMErrorPrinter ( )

◆ ~JMMErrorPrinter()

JMMErrorPrinter::~JMMErrorPrinter ( )
override

Member Function Documentation

◆ GetPrintErrors()

bool JMMErrorPrinter::GetPrintErrors ( ) const
inline

◆ HandleArrayDeletedAsObject()

void JMMErrorPrinter::HandleArrayDeletedAsObject ( const JMMRecord record)
overrideprotectedvirtual

Reimplemented from JMMMonitor.

◆ HandleMultipleAllocation()

void JMMErrorPrinter::HandleMultipleAllocation ( const JMMRecord thisRecord,
const JMMRecord firstRecord 
)
overrideprotectedvirtual

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 from JMMMonitor.

◆ HandleMultipleDeletion()

void JMMErrorPrinter::HandleMultipleDeletion ( const JMMRecord originalRecord,
const JUtf8Byte file,
const JUInt32  line,
const bool  isArray 
)
overrideprotectedvirtual

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 from JMMMonitor.

◆ HandleObjectDeletedAsArray()

void JMMErrorPrinter::HandleObjectDeletedAsArray ( const JMMRecord record)
overrideprotectedvirtual

Reimplemented from JMMMonitor.

◆ HandleUnallocatedDeletion()

void JMMErrorPrinter::HandleUnallocatedDeletion ( const JUtf8Byte file,
const JUInt32  line,
const bool  isArray 
)
overrideprotectedvirtual

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 from JMMMonitor.

◆ SetPrintErrors()

void JMMErrorPrinter::SetPrintErrors ( const bool  print)
inline

Sets whether error notifications will be printed. Overrides the JMM_NO_PRINT_ERRORS environment variable.


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