diff --git a/cargoentity.cpp b/cargoentity.cpp index 1b63d35..272e9ba 100644 --- a/cargoentity.cpp +++ b/cargoentity.cpp @@ -1,6 +1,6 @@ #include "cargoentity.h" -CargoEntity::CargoEntity(QString c_id, DeliveryPointEntity dest) +CargoEntity::CargoEntity(QString c_id, DeliveryPointEntity *dest) { this->_cargo_id = c_id; this->_destination = dest; diff --git a/cargoentity.h b/cargoentity.h index a682774..ae3e9be 100644 --- a/cargoentity.h +++ b/cargoentity.h @@ -6,13 +6,16 @@ #include +class DeliveryPointEntity; +class StorageEntity; class CargoEntity { QString _cargo_id; - DeliveryPointEntity _destination; + DeliveryPointEntity *_destination; public: - CargoEntity(QString _cargo_id, DeliveryPointEntity _destination); + CargoEntity(); + CargoEntity(QString _cargo_id, DeliveryPointEntity *_destination); }; #endif // CARGOENTITY_H diff --git a/deliverypointentity.h b/deliverypointentity.h index 6cb566f..e8ab27e 100644 --- a/deliverypointentity.h +++ b/deliverypointentity.h @@ -7,12 +7,15 @@ #include +class CargoEntity; +class StorageEntity; class DeliveryPointEntity { QString _title; std::vector _storage; public: + DeliveryPointEntity(); DeliveryPointEntity(QString title); }; diff --git a/storageentity.h b/storageentity.h index 5ec6d36..de7cbaa 100644 --- a/storageentity.h +++ b/storageentity.h @@ -5,7 +5,8 @@ #include - +class DeliveryPointEntity; +class CargoEntity; class StorageEntity { int _storage_id; @@ -13,6 +14,7 @@ class StorageEntity std::vector _cargo; public: + StorageEntity(); StorageEntity(int st_id, int mx_cap); };