#ifndef CAMP_H
#define CAMP_H
#include "campmode.h"

enum sensitivityUnit { volt, dBu };

class cAmp
{
public:
    cAmp();
    ~cAmp();
    cAmp(std::string name, double sensitivity, sensitivityUnit sensUnit);
    std::string getName();
    void setName(std::string name);
    void setName(QString name);
    void setSensivity(double sens);
    void setSensUnit(sensitivityUnit unit);
    double getSensitivity();
    sensitivityUnit getSensivityUnit();
    cAmpMode* getAmpModes();
    cAmpMode getAmpMode(unsigned int idx);
    unsigned int getAmpModesCount();
    void addAmpMode(cAmpMode mode);
    bool modifyAmpMode(unsigned int idx, cAmpMode mode);
    void deleteAmpMode(unsigned int idx);
    void setAmpMode(unsigned int idx, cAmpMode mode);
    void print();

    friend QDataStream& operator <<(QDataStream& out, cAmp& amp);
    friend QDataStream& operator >>(QDataStream& in, cAmp& amp);
private:
    std::string m_name;
    double m_sensitvity;
    sensitivityUnit m_sensivityUnit;

    cAmpMode* m_pAmpModes;
    unsigned int m_numAmpModes;
};

#endif // CAMP_H
