5#include <SimoxUtility/meta/type_name.h>
17 template <
class... Args>
19 MemoryRemoteGui::_makeGroupBox(
const armem::base::MemoryBase<Args...>& memory)
const
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())
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
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
97 auto addChild = [
this, &group](
const armem::wm::EntitySnapshot& snapshot)
106 const int margin = 2;
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 <<
")";
bool forEachProviderSegment(ProviderSegmentFunctionT &&func)
void forEachSnapshotInIndexRange(long first, long last, FunctionT &&func) const
Return all snapshots from first to last index.
bool forEachSnapshot(SnapshotFunctionT &&func)
const DataT & data() const
bool forEachInstance(InstanceFunctionT &&func)
bool forEachCoreSegment(CoreSegmentFunctionT &&func)
bool forEachEntity(EntityFunctionT &&func)
aron::type::ObjectPtr & aronType()
GroupBox makeGroupBox(const armem::wm::Memory &memory) const
armarx::RemoteGui::Client::GroupBox GroupBox
armarx::RemoteGui::Client::Label Label
std::string makeGroupLabel(const std::string &term, const std::string &name, size_t size, const std::string &namePrefix=": '", const std::string &nameSuffix="'") const
std::string makeNoItemsMessage(const std::string &term) const
auto doLocked(FunctionT &&function) const
Execute function under shared (read) lock.
Client-side working memory core segment.
Client-side working entity instance.
Client-side working memory entity snapshot.
Client-side working memory entity.
Client-side working memory.
Client-side working memory provider segment.
Brief description of class memory.
std::string toDateTimeMilliSeconds(const Time &time, int decimals=6)
Returns timeas e.g.
void visitRecursive(RecursiveVisitorImplementation &v, typename RecursiveVisitorImplementation::Input &o)
void setLabel(std::string const &text)
void setCollapsed(bool collapsed)