Render placefile Place statement

This commit is contained in:
Dan Paulat 2023-07-20 23:38:43 -05:00
parent 1c39464228
commit 9f5de14f6b
5 changed files with 148 additions and 29 deletions

View file

@ -61,6 +61,24 @@ public:
PlacefileManager::PlacefileManager() : p(std::make_unique<Impl>(this)) {}
PlacefileManager::~PlacefileManager() = default;
std::vector<std::shared_ptr<gr::Placefile>>
PlacefileManager::GetActivePlacefiles()
{
std::vector<std::shared_ptr<gr::Placefile>> placefiles;
std::shared_lock lock {p->placefileRecordLock_};
for (const auto& record : p->placefileRecords_)
{
if (record->enabled_)
{
placefiles.emplace_back(record->placefile_);
}
}
return placefiles;
}
void PlacefileManager::LoadFile(const std::string& filename)
{
logger_->debug("LoadFile: {}", filename);