/**
 * \file core/spoms/location.h
 * \date 18/02/2026
 * \author Aurélien Berthier, BENOIST Emile, TESSIER Dominique
 * \brief store alignment interpretations
 */


/*
 * PeptidOMS, Spectra to protein alignment tool
 * Copyright (C) 2026  Olivier Langella
 * <olivier.langella@cnrs.fr>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#pragma once
#include "spomsaa.h"

namespace pappso
{
namespace spoms
{


class Location
{


  /*
  public Location(int[] protein_sequence, int beginning, int end)
  {
    this.protein_sequence = protein_sequence;
    this.beginning = Math.max(0, beginning);
    this.length = Math.min(protein_sequence.length - 1 ,end) - beginning + 1;
  }
  */

  public:
  Location(const std::vector<SpomsAa> &protein_sequence,
           int beginning,
           int end);

  Location(const Location &other);

  virtual ~Location();

  int getLength() const;

  const SpomsAa &get(int position) const;

  QString toString() const;

  int getStartPositionOnProtein(const QString &protein_sequence,
                                const QString &peptide_sequence) const;

  private:
  const std::vector<SpomsAa> &protein_sequence;
  int beginning;
  int length;
};

} // namespace spoms
} // namespace pappso
