27 lines
619 B
C++
27 lines
619 B
C++
#pragma once
|
|
#include "esp_log.h"
|
|
#include "external/mtr/line_info.h"
|
|
|
|
static const char* STATION_INFO_TAG = "StationInfo";
|
|
|
|
// Forward declaration
|
|
struct LineInfo;
|
|
|
|
struct StationInfo {
|
|
public:
|
|
StationInfo(cJSON* station_json);
|
|
|
|
const char* name() const { return _name.c_str(); }
|
|
const char* code() const { return _code.c_str(); }
|
|
|
|
friend class LineInfo;
|
|
|
|
private:
|
|
// Caller transfers ownership of station_name and station_code to StationInfo
|
|
StationInfo(std::string& station_name, std::string& station_code)
|
|
: _name(station_name), _code(station_code) { }
|
|
|
|
std::string _name;
|
|
std::string _code;
|
|
};
|