1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
/**
* @file
* @author pavel.iqx
* @date 2014
* @copyright GNU General Public License v2
*/
#ifndef _VALGRINDPROCESSOR_H_
#define _VALGRINDPROCESSOR_H_
#include <wx/xml/xml.h>
#include "imemcheckprocessor.h"
/**
* @class ValgrindMemcheckProcessor
* @brief Implementation of valgrind's memcheck tool parser
*
* Settings for this parset is implemented in global settings. It could be moved here or to own file.
*/
class ValgrindMemcheckProcessor:public IMemCheckProcessor
{
public:
/**
* @brief interface implementation, does nothing more than inherited ctor
* @param settings
*/
ValgrindMemcheckProcessor(MemCheckSettings * const settings);
/**
* @brief interface implementation
* @return list of supp files
*
* Some files are specified in setting. Workspace specific supp file need to be named just before analyse run, according to current opened workspace.
*/
virtual wxArrayString GetSuppressionFiles();
/**
* @brief interface implementation
* @param originalCommand
* @return
*
* Takes original command and prepend it with Valgrind command and its arguments.
*/
virtual wxString GetExecutionCommand(const wxString & originalCommand);
/**
* @brief interface implementation
* @param outputLogFileName
* @return
*
* Loads Valgrind's xml log to wxXmlDocument, and goes trought nodes
*/
virtual bool Process(const wxString & outputLogFileName = wxEmptyString);
protected:
/**
* @brief creates one MemCheckError object
* @param doc whole log document
* @param errorNode reference to current processed node in that doc file
* @return MemCheckError object
*
* Auxiliary section is not in subnode. First part of the node describes particular error, second part describes auxiliary info. For auxiliary is created sub MemCheckError object.
*/
MemCheckError ProcessError(wxXmlDocument & doc, wxXmlNode * errorNode);
/**
* @brief creates one MemCheckErrorLocation object
* @param doc whole log document
* @param locationNode reference to current processed node in that doc file
* @return MemCheckErrorLocation object
*/
MemCheckErrorLocation ProcessLocation(wxXmlDocument & doc, wxXmlNode * locationNode);
};
#endif // _VALGRINDPROCESSOR_H_
|