

#ifndef _PEAKFAMILYDETECTOR_HPP_
#define _PEAKFAMILYDETECTOR_HPP_


#include "pwiz/utility/misc/Export.hpp"
#include "pwiz/data/msdata/MSData.hpp"
#include "pwiz/data/misc/PeakData.hpp"


namespace pwiz {
namespace analysis {


///
/// interface for peak family (isotope envelope) detection
/// 
class PWIZ_API_DECL PeakFamilyDetector
{
    public:

    typedef pwiz::msdata::MZIntensityPair MZIntensityPair;
    typedef pwiz::data::peakdata::PeakFamily PeakFamily;
    
    /// find peak families in a specified array of MZIntensityPair 
    virtual void detect(const MZIntensityPair* begin,
                        const MZIntensityPair* end,
                        std::vector<PeakFamily>& result) = 0;

    /// convenience function -- equivalent to:
    ///   detect(&data[0], &data[0]+data.size(), result) 
    virtual void detect(const std::vector<MZIntensityPair>& data,
                        std::vector<PeakFamily>& result);

    virtual ~PeakFamilyDetector() {} 
};


} // namespace analysis 
} // namespace pwiz


#endif // _PEAKFAMILYDETECTOR_HPP_

