write add_train

This commit is contained in:
2024-05-23 09:10:47 +00:00
parent dbbbe38774
commit 66109d3674
6 changed files with 59 additions and 12 deletions

View File

@ -15,9 +15,11 @@ struct StationNameData {
char name[100][40];
};
static_assert(sizeof(StationNameData) == 4000);
struct TicketPriceData {
uint32_t price[99];
};
// waring: this struct is extremely large, later DiskManager should be optimized to handle this
struct FullTrainData {
struct CoreTrainData {
char trainID[21];
uint8_t stationNum;
hash_t stations_hash[100];
@ -25,12 +27,8 @@ struct FullTrainData {
uint16_t startTime : 12;
uint16_t saleDate_beg : 10, saleDate_end : 10;
uint8_t type : 6;
uint8_t is_released : 1;
uint16_t travelTime[100];
uint16_t stopoverTime[100];
};
struct TicketPriceData {};
class TrainDataDrive : public DataDriverBase {};
class TransactionDataDrive : public DataDriverBase {};
#endif