#if !defined(PROFILER_H)
#define PROFILER_H

#include <string>

class Process;
class ProcessExit;
class ProcessExec;
class Sample;

class Profiler
{
private:

    unsigned m_sampleCount;

    const std::string& m_dataFile;
    bool m_showlines;

public:

    Profiler( const std::string& dataFile, bool showlines ) :
        m_sampleCount(0),
        m_dataFile( dataFile ),
        m_showlines( showlines )
    {
    }

    const std::string& getDataFile()
    {
        return m_dataFile;
    }

    unsigned getSampleCount()
    {
        return m_sampleCount;
    }

    void createProfile();

    void processEvent( const ProcessExec& processExec );
    void processEvent( const ProcessExit& processExit );
    void processEvent( const Sample& sample );
};

#endif // #if !defined(PROFILER_H)

