Feck forward declaration

This commit is contained in:
unknown 2020-09-19 08:27:52 +07:00
parent a22680711e
commit 9622afb211
4 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,6 @@
#include "cargoentity.h" #include "cargoentity.h"
CargoEntity::CargoEntity(QString c_id, DeliveryPointEntity dest) CargoEntity::CargoEntity(QString c_id, DeliveryPointEntity *dest)
{ {
this->_cargo_id = c_id; this->_cargo_id = c_id;
this->_destination = dest; this->_destination = dest;

View file

@ -6,13 +6,16 @@
#include <QString> #include <QString>
class DeliveryPointEntity;
class StorageEntity;
class CargoEntity class CargoEntity
{ {
QString _cargo_id; QString _cargo_id;
DeliveryPointEntity _destination; DeliveryPointEntity *_destination;
public: public:
CargoEntity(QString _cargo_id, DeliveryPointEntity _destination); CargoEntity();
CargoEntity(QString _cargo_id, DeliveryPointEntity *_destination);
}; };
#endif // CARGOENTITY_H #endif // CARGOENTITY_H

View file

@ -7,12 +7,15 @@
#include <vector> #include <vector>
class CargoEntity;
class StorageEntity;
class DeliveryPointEntity class DeliveryPointEntity
{ {
QString _title; QString _title;
std::vector<StorageEntity> _storage; std::vector<StorageEntity> _storage;
public: public:
DeliveryPointEntity();
DeliveryPointEntity(QString title); DeliveryPointEntity(QString title);
}; };

View file

@ -5,7 +5,8 @@
#include <vector> #include <vector>
class DeliveryPointEntity;
class CargoEntity;
class StorageEntity class StorageEntity
{ {
int _storage_id; int _storage_id;
@ -13,6 +14,7 @@ class StorageEntity
std::vector<CargoEntity> _cargo; std::vector<CargoEntity> _cargo;
public: public:
StorageEntity();
StorageEntity(int st_id, int mx_cap); StorageEntity(int st_id, int mx_cap);
}; };