casacore
Public Member Functions | Private Attributes | List of all members
casacore::MemoryTraceBlock Class Reference

Class to write begin and end block message. More...

#include <MemoryTrace.h>

Public Member Functions

 MemoryTraceBlock (const std::string &name)
 The constructor writes a block begin message. More...
 
 MemoryTraceBlock (const char *name)
 
 ~MemoryTraceBlock ()
 The constructor writes a block end message. More...
 

Private Attributes

std::string itsName
 

Detailed Description

Class to write begin and end block message.

Synopsis

This class is meant to write memory trace messages indicating the beginning and end of a code block. In this way it is known that the (de)allocate messages between these messages belong to that code block. The constructor writes the begin message, while the destructor writes the end message. Because the destructor is called automatically by the compiler, the user does not have to worry about it; it will also work fine in case of a premature exit from a function.

It is possible to nest blocks as deeply as one likes.

Definition at line 135 of file MemoryTrace.h.

Constructor & Destructor Documentation

◆ MemoryTraceBlock() [1/2]

casacore::MemoryTraceBlock::MemoryTraceBlock ( const std::string &  name)

The constructor writes a block begin message.

◆ MemoryTraceBlock() [2/2]

casacore::MemoryTraceBlock::MemoryTraceBlock ( const char *  name)

◆ ~MemoryTraceBlock()

casacore::MemoryTraceBlock::~MemoryTraceBlock ( )

The constructor writes a block end message.

Member Data Documentation

◆ itsName

std::string casacore::MemoryTraceBlock::itsName
private

Definition at line 144 of file MemoryTrace.h.


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