diff --git a/model/MotorModelDatabase.cpp b/model/MotorModelDatabase.cpp new file mode 100644 index 0000000..e05e41c --- /dev/null +++ b/model/MotorModelDatabase.cpp @@ -0,0 +1,6 @@ +#include "MotorModelDatabase.h" + +MotorModelDatabase::MotorModelDatabase() +{ + +} diff --git a/model/MotorModelDatabase.h b/model/MotorModelDatabase.h new file mode 100644 index 0000000..8d0e19c --- /dev/null +++ b/model/MotorModelDatabase.h @@ -0,0 +1,26 @@ +#ifndef MOTORMODELDATABASE_H +#define MOTORMODELDATABASE_H + +#include +#include "model/MotorModel.h" + +class MotorModelDatabase +{ +public: + MotorModelDatabase(); + + std::vector findMotorsByManufacturer(const std::string& manu); + + std::vector findMotersByImpulseClass(const std::string& imClass); + + MotorModel getMotorByName(const std::string& name); + + std::vector> getThrustCurveByName(const std::string& motorName); + +private: + + std::vector motors; + +}; + +#endif // MOTORMODELDATABASE_H diff --git a/qtrocket.pro b/qtrocket.pro index d8c0aaf..d6a9d07 100644 --- a/qtrocket.pro +++ b/qtrocket.pro @@ -18,6 +18,7 @@ SOURCES += \ gui/MainWindow.cpp \ model/MotorCase.cpp \ model/MotorModel.cpp \ + model/MotorModelDatabase.cpp \ model/Rocket.cpp \ model/Thrustcurve.cpp \ sim/ConstantGravityModel.cpp \ @@ -46,6 +47,7 @@ HEADERS += \ gui/qcustomplot.h \ model/MotorCase.h \ model/MotorModel.h \ + model/MotorModelDatabase.h \ model/Rocket.h \ model/Thrustcurve.h \ sim/AtmosphericModel.h \