Files
ink-board/main/external/mtr/station_info.h
2026-01-27 19:15:44 +08:00

28 lines
623 B
C++

#pragma once
#include "esp_log.h"
#include "external/mtr/line_info.h"
#include <string>
#define 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;
};