Container.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef CONT
  2. #define CONT
  3. #define DEBUG
  4. #include <string>
  5. #include <list>
  6. #include <tuple>
  7. #include <utility>
  8. //#include <vector>
  9. using namespace std;
  10. struct Container //ýòîò êëàññ õðàíèò â ñåáå âñå âîçìîæíûå äàííûõ, ñîîòíîñèò ââîäíûå ñ íèìè
  11. {
  12. //ïîòîì íàäî äîáàâèòü ìèíèìàëüíûå ðàññòîÿíèÿ
  13. list<tuple<string, double, size_t, double, double>> artyRangesAmmo; //íàçâàíèå àðòóñòàíîâîê, äàëüíîñòü ñòðåëüáû, ÷èñëî ñíàðÿäîâ â á/ê, ñêîðîñòðåëüíîñòü çàÿâëåííàÿ, êàëèáð
  14. list<string> shellTypes; //âîçìîæíûå òèïû çàðÿäîâ áîåïðèïàñîâ
  15. list<string> shellFuzes; //âîçìîæíûå âèäû âçðûâàòåëåé
  16. list<pair<string, size_t>> targetsPriorities; //ñïèñîê âîçìîæíûõ öåëåé è èõ ïðèîðèòåòû
  17. list<string> missions; //âîçìîæíûå îãíåâûå çàäà÷è
  18. list<string> targetGeometries; //âîçìîæíûå òèïû öåëåé ïî ãåîìåòðèè
  19. list<string> preparingTypes; //âîçìîæíûå òèïû ïðèñòðåëêè
  20. //
  21. //vector<pair<double, double>> artyCoords;
  22. Container(string file1, string file2);
  23. #ifdef DEBUG
  24. Container(); //äëÿ òåñòà
  25. #endif
  26. ~Container();
  27. bool checkCorrectArty(string _artyType, size_t _numInBattery, size_t _numAmmo, string _shellType,
  28. string _shellFuzes, double _temperature); //ïðîâåðèòü, åñòü ëè òàêîé âèä àðòèëëåðèè
  29. bool checkCorrectTarget(string _targetName, string _mission, string _entrenchedArmoured, string _targetGeom, string _preparingType); //ïðîâåðèòü, åñòü ëè òàêîé âèä öåëè
  30. size_t getPriority(string _targetName);
  31. //double measureFireRate(size_t _howManyShells, double _temperature, string _artyName, string _shellType); //ðàññ÷èòàòü ôàêòè÷åñêóþ ñêîðîñòðåëüíîñòü
  32. size_t getNormStationary(pair<string, size_t> _caliber, bool _isCluster = false,
  33. bool _isDoubleIndex = false, bool _isShortened = false, bool _isEntrenchedOrArmored = false,
  34. bool _isDestruction = false, bool _isActiveReactive = false, double range = 5.0, size_t _numInBattery = 1, string _targetName = "InfOpened");
  35. size_t getNormMoving(pair<string, size_t> _caliber, bool _isCluster, bool _isArmoured, size_t _numInBattery, string _targetName = "column");
  36. size_t getNormFireAtWill(pair<string, size_t> _caliber, double _meters, double _minutes);
  37. size_t getNormSmoke(pair<string, size_t> _caliber, double _meters, double _minutes, bool _isSideWind);
  38. double getRange(string _artyType);
  39. double getCaliber(string _artyType);
  40. string getType(string _artyType);
  41. bool checkStationary(string _targetType);
  42. size_t measureFireRate(pair<string, size_t> _caliber, size_t _charge, double _temperature, size_t _numShells, string _specificType);
  43. string getSpecificType(string _artyType);
  44. size_t getCharge(string _artyName, string _targetName, string _fuzeType, bool _isEntrenchedOrArmored, double _range);
  45. };
  46. #endif