// bytran -|- spectral calculations for portable devices using the HITRAN database
//
// Developed by Dzianis Pliutau (Denis Plutov) and Kostya Roslyakov
// www.bytran.org | bytran@bytran.org
// Copyright (c) 2016 Dzianis Pliutau
// Distributed under the MIT license
//
// The MIT License (MIT)
// Copyright (c) 2016 Dzianis Pliutau
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
// is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



// Object for a single HITRAN isotope
#ifndef HITRANONEISO_H
#define HITRANONEISO_H

#include <QVector>

class HitranOneIso
{
public:
    HitranOneIso();

public:

    // Array of type double with the TIPS coefficients for the corresponding temperature values
    QVector<double> *getTips();
    void setTips(QVector<double> *newTips);
    double getTipsAtIndex(int index);
    void setTipsAtIndex(int index, double tipsValue);
    // Variable indicating if the isotope is selected for calculation (1 - selected, 0 - not selected)
    bool getSelected();
    void setSelected(bool newSelected);
    // Isotopologue number
    int getIsoLog();
    void setIsoLog(int newIsoLog);
    // Terrestrial isotope abundance
    double getTerrAbund();
    void setTerrAbund(double newTerrAbund);
    // Used isotope abundance
    double getAbund();
    void setAbund(double newAbund);
    // Partition sum value at a temperature of 296K
    double getQ296K();
    void setQ296K(double newQ296K);
    // Degeneracy factor
    double getGj();
    void setGj(double newGj);
    // Molar mass for the current isotope
    double getMolarMass();
    void setMolarMass(double newMolarMass);
    // Color to use for plotting a given isotope
    int getColor();
    void setColor(int newColor);
    // Getting and setting the global isotopologue ID
    int getGlobalId();
    void setGlobalId(int newGlobalId);
    // Getting and setting a variable indicating if the Total Internal Partition Sums are available
    bool getTipsFileAvailableLocally();
    void setTipsFileAvailableLocally(bool newTipsFileAvailableLocally);
    // Getting and setting the TIPS file name
    bool getTipsFileAvailableOnHitranServer();
    void setTipsFileAvailableOnHitranServer(bool newTipsFileAvailableOnHitranServer);

private:

    QVector<double> tips;  // Array of type double with the TIPS coefficients for the corresponding temperature values
    bool selected;  // Variable indicating if the isotope is selected for calculation (1 - selected, 0 - not selected)
    int isoLog;     // Isotopologue number
    double terrAbund;   // Terrestrial isotope abundance
    double abund;   // Used isotope abundance (in the case of terrestrial atmosphere this is the same as the terrestrial abundance)
    double Q296K;   // Partition sum value at a temperature of 296K
    double gj;      // Degeneracy factor
    double molarMass;  // Molar mass for the current isotope
    int color;      // Color to use for plotting a given isotope
    int globalId;   // Global isotopologue ID
    bool tipsFileAvailableLocally;  // Variable indicates if Total Internal Partition Sums are available for a given molecule (on the local computer)
    bool tipsFileAvailableOnHitranServer;  // Variable indicates if the TIPS file for a given Global ID (isotope) is available on the HITRAN server

};

#endif // HITRANONEISO_H
