mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
搭建PVB架构,实现前端的基础布局、菜单、表格、图示等功能
This commit is contained in:
21
src/app/Station.cpp
Normal file
21
src/app/Station.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "Station.h"
|
||||
|
||||
|
||||
Station::Station(int id) : id(id)
|
||||
{
|
||||
}
|
||||
|
||||
void Station::addDevice(int deviceId, std::shared_ptr<Device> device)
|
||||
{
|
||||
mapDevice_[deviceId] = device;
|
||||
}
|
||||
|
||||
std::shared_ptr<Device> Station::getDevice(int deviceId)
|
||||
{
|
||||
auto iter = mapDevice_.find(deviceId);
|
||||
if (iter!=mapDevice_.end())
|
||||
{
|
||||
return iter->second;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
Reference in New Issue
Block a user