Skip to content

Commit

Permalink
dds-topology: add STopoRuntimeTask::m_taskId and STopoRuntimeCollecti…
Browse files Browse the repository at this point in the history
…on::m_collectionId
  • Loading branch information
AndreyLebedev authored and AnarManafov committed Jul 13, 2020
1 parent c0e744c commit 0aea0b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
1 change: 1 addition & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### dds-topology
Added: new std::istream based APIs.
Added: new CTopology::getRuntimeTask and CTopology::getRuntimeCollection methods which take either ID or runtime path as input.
Added: task ID to STopoRuntimeTask and collection ID to STopoRuntimeCollection.


## v3.4 (2020-07-01)
Expand Down
11 changes: 3 additions & 8 deletions dds-topology-lib/src/TopoCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,9 @@ namespace dds
typedef std::pair<STopoRuntimeCollection::FilterIterator_t, STopoRuntimeCollection::FilterIterator_t>
FilterIteratorPair_t;

STopoRuntimeCollection()
: m_collection(nullptr)
, m_collectionIndex(0)
, m_collectionPath()
{
}
CTopoCollection::Ptr_t m_collection;
size_t m_collectionIndex;
CTopoCollection::Ptr_t m_collection{ nullptr };
Id_t m_collectionId{ 0 };
size_t m_collectionIndex{ 0 };
std::string m_collectionPath;
STopoRuntimeTask::Map_t m_idToRuntimeTaskMap; ///< Map of task ID to STopoRuntimeTask
};
Expand Down
2 changes: 2 additions & 0 deletions dds-topology-lib/src/TopoCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ void CTopoCore::FillIdToTopoElementMap(const CTopoElement::Ptr_t& _element)

STopoRuntimeTask info;
info.m_task = task;
info.m_taskId = crc;
info.m_taskIndex = index;
info.m_collectionIndex = collectionCounter;
info.m_taskPath = idPath;
Expand Down Expand Up @@ -448,6 +449,7 @@ void CTopoCore::FillIdToTopoElementMap(const CTopoElement::Ptr_t& _element)

STopoRuntimeCollection info;
info.m_collection = collection;
info.m_collectionId = crc;
info.m_collectionIndex = index;
info.m_collectionPath = m_currentCollectionIdPath;
m_idToRuntimeCollectionMap.insert(make_pair(crc, info));
Expand Down
17 changes: 5 additions & 12 deletions dds-topology-lib/src/TopoTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,12 @@ namespace dds
typedef std::pair<STopoRuntimeTask::FilterIterator_t, STopoRuntimeTask::FilterIterator_t>
FilterIteratorPair_t;

STopoRuntimeTask()
: m_task(nullptr)
, m_taskIndex(0)
, m_collectionIndex(std::numeric_limits<uint32_t>::max())
, m_taskPath()
, m_taskCollectionId(0)
{
}
CTopoTask::Ptr_t m_task;
size_t m_taskIndex;
size_t m_collectionIndex;
CTopoTask::Ptr_t m_task{ nullptr };
Id_t m_taskId{ 0 };
size_t m_taskIndex{ 0 };
size_t m_collectionIndex{ std::numeric_limits<uint32_t>::max() };
std::string m_taskPath;
Id_t m_taskCollectionId;
Id_t m_taskCollectionId{ 0 };
};
} // namespace topology_api
} // namespace dds
Expand Down

0 comments on commit 0aea0b1

Please sign in to comment.