#ifndef TOTALS_H
#define TOTALS_H

#include "rack.h"

class Totals{
 public:
  double upmass, // Total used for this combination
    crewtrng,
    count,
    middecks,
    stowage,
    keepalive,
    MTL,
    acoustics,
    energy,
    crewtime;

  vector<double> upmass_partners, // Totals for each partner, corresponds to partners
    crewtrng_partners,
    count_partners,
    middecks_partners,
    stowage_partners,
    keepalive_partners,
    MTL_partners,
    acoustics_partners,
    energy_partners,
    crewtime_partners;
  static vector<string> partners; // Name of each partner
  Totals();
  ~Totals();
  void addRack(Rack rack);
  void addTotals(Totals totals);
  Totals operator + (const Totals& totals) const;
  Totals operator + (const Rack& rack) const;
  Totals operator += (const Totals& totals);
  Totals operator += (const Rack& rack);
};

// Error types
struct NoPartnersError{};
struct BadPartnerError{
  public: 
  string partner;
  BadPartnerError(string p){partner=p;}
  BadPartnerError(){partner="";}
};

// "Paperback Shelves" cross-section view:
//
//#|     +     |   DVD center of gravity
//#|-----------|   DVD
//#[=======]       Shelf
//#    +  ^        Shelf pin and added bracket
//
// DVD center of gravity causes shelf to tilt, DVD to fall.
// Possible solution: DVD "seatbelt" across front?

#endif
