5 #include <SimoxUtility/meta/type_name.h>
17 template <
class... Args>
19 MemoryRemoteGui::_makeGroupBox(
const armem::base::MemoryBase<Args...>& memory)
const
28 memory.forEachCoreSegment([
this, &group](
const auto& coreSegment)
34 getTypeString(
const armem::base::detail::AronTyped& typed)
36 std::stringstream type;
39 type <<
" (" << typed.aronType()->getFullName() <<
")";
43 type <<
" (no Aron type)";
48 template <
class... Args>
50 MemoryRemoteGui::_makeGroupBox(
const armem::base::CoreSegmentBase<Args...>& coreSegment)
const
54 getTypeString(coreSegment));
56 if (coreSegment.empty())
60 coreSegment.forEachProviderSegment(
61 [
this, &group](
const auto& providerSegment)
62 { group.addChild(this->
makeGroupBox(providerSegment)); });
66 template <
class... Args>
68 MemoryRemoteGui::_makeGroupBox(
69 const armem::base::ProviderSegmentBase<Args...>& providerSegment)
const
73 makeGroupLabel(
"Provider Segment", providerSegment.name(), providerSegment.size()) +
74 getTypeString(providerSegment));
76 if (providerSegment.empty())
80 providerSegment.forEachEntity([
this, &group](
const auto& entity)
85 template <
class... Args>
87 MemoryRemoteGui::_makeGroupBox(
const armem::base::EntityBase<Args...>& entity)
const
102 entity.forEachSnapshot(addChild);
106 const int margin = 2;
107 entity.forEachSnapshotInIndexRange(0, margin, addChild);
108 entity.forEachSnapshotInIndexRange(-margin, -1, addChild);
110 group.setCollapsed(
true);
118 return this->_makeGroupBox(
memory);
124 return this->_makeGroupBox(
memory);
130 return coreSegment.
doLocked([
this, &coreSegment]()
131 {
return this->_makeGroupBox(coreSegment); });
137 return this->_makeGroupBox(coreSegment);
143 return this->_makeGroupBox(providerSegment);
149 return this->_makeGroupBox(providerSegment);
155 return this->_makeGroupBox(entity);
161 return this->_makeGroupBox(entity);
171 if (snapshot.
empty())
202 std::stringstream ss;
203 ss <<
"Instance #" << instance.
index();
212 const std::string& name,
214 const std::string& namePrefix,
215 const std::string& nameSuffix)
const
217 std::stringstream ss;
218 ss << term << namePrefix << name << nameSuffix <<
" (" << size <<
")";
225 std::stringstream ss;
226 ss <<
"(no " << term <<
")";