auto_bus/include/railsModel.h

52 lines
848 B
C
Raw Normal View History

2022-06-10 21:21:35 +08:00
//
// Created by ricardo on 2022/6/10.
//
#ifndef AUTO_BUS_GUI_RAILSMODEL_H
#define AUTO_BUS_GUI_RAILSMODEL_H
#include "cstdlib"
struct rail_node{
/**
*
*/
int id;
/**
*
*/
int last_node_distance;
/**
*
*/
int next_node_distance;
/**
*
*/
struct rail_node* last_node;
/**
*
*/
struct rail_node* next_node;
};
typedef struct rail_node rail_node_t;
class RailsModel
{
public:
/**
*
*/
rail_node_t *rails;
explicit RailsModel(int distance = 2, int node_number = 5);
rail_node_t *FindNode(int node_num) const;
~RailsModel();
};
#endif //AUTO_BUS_GUI_RAILSMODEL_H