#include "logbook/logbookEntry.h" namespace germanairlinesva { namespace file { namespace logbook { LogbookEntry::LogbookEntry(std::string date, std::string flightNumber, std::string aircraftType, std::string aircraftRegistration, std::string departureAirport, std::string departureGate, std::string departureRunway, std::string arrivalAirport, std::string arrivalGate, std::string arrivalRunway, std::string offBlockTime, std::string outTime, std::string onTime, std::string onBlockTime, float totalFlightTime, float taxiOutFuel, float inFlightFuel, float taxiInFuel, float totalFuel, float taxiOutDistance, float inFlightDistance, float taxiInDistance, float totalDistance, float maxLandingRate, std::uint8_t touchdowns, float maxLandingGees, std::string recordingFilename, float points, std::uint8_t flags) { this->date = date; this->flightNumber = flightNumber; this->aircraftType = aircraftType; this->aircraftRegistration = aircraftRegistration; this->departureAirport = departureAirport; this->departureGate = departureGate; this->departureRunway = departureRunway; this->arrivalAirport = arrivalAirport; this->arrivalGate = arrivalGate; this->arrivalRunway = arrivalRunway; this->offBlockTime = offBlockTime; this->outTime = outTime; this->onTime = onTime; this->onBlockTime = onBlockTime; this->totalFlightTime = totalFlightTime; this->taxiOutFuel = taxiOutFuel; this->inFlightFuel = inFlightFuel; this->taxiInFuel = taxiInFuel; this->totalFuel = totalFuel; this->taxiOutDistance = taxiOutDistance; this->inFlightDistance = inFlightDistance; this->taxiInDistance = taxiInDistance; this->totalDistance = totalDistance; this->maxLandingRate = maxLandingRate; this->touchdowns = touchdowns; this->maxLandingGees = maxLandingGees; this->recordingFilename = recordingFilename; this->points = points; this->flags = flags; } void LogbookEntry::toFile(std::ofstream &out) const { writeString(out, this->date, 10); writeString(out, this->flightNumber, 4); writeString(out, this->aircraftType, 4); writeString(out, this->aircraftRegistration, 6); writeString(out, this->departureAirport); writeString(out, this->departureGate); writeString(out, this->departureRunway); writeString(out, this->arrivalAirport); writeString(out, this->arrivalGate); writeString(out, this->arrivalRunway); writeString(out, this->offBlockTime, 5); writeString(out, this->outTime, 5); writeString(out, this->onTime, 5); writeString(out, this->onBlockTime, 5); writetotalFlightTime)>(out, this->totalFlightTime); writetaxiOutFuel)>(out, this->taxiOutFuel); writeinFlightFuel)>(out, this->inFlightFuel); writetaxiInFuel)>(out, this->taxiInFuel); writetotalFuel)>(out, this->totalFuel); writetaxiOutDistance)>(out, this->taxiOutDistance); writeinFlightDistance)>(out, this->inFlightDistance); writetaxiInDistance)>(out, this->taxiInDistance); writetotalDistance)>(out, this->totalDistance); writemaxLandingRate)>(out, this->maxLandingRate); writetouchdowns)>(out, this->touchdowns); writemaxLandingGees)>(out, this->maxLandingGees); writeString(out, this->recordingFilename); writepoints)>(out, this->points); writeflags)>(out, this->flags); } } // namespace logbook } // namespace file } // namespace germanairlinesva