27 #include <MemoryX/interface/core/EntityBase.h>
28 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
29 #include <MemoryX/interface/memorytypes/MemorySegments.h>
37 virtual public EnvironmentalPrimitiveSegmentBase
42 EnvironmentalPrimitiveBaseList
43 getEnvironmentalPrimitives(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
44 PlanePrimitiveBaseList
45 getPlanes(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
46 SpherePrimitiveBaseList
47 getSpheres(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
48 CylinderPrimitiveBaseList
49 getCylinders(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
50 BoxPrimitiveBaseList getBoxes(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
52 EnvironmentalPrimitiveBasePtr
53 getEnvironmentalPrimitiveById(
const std::string&
id,
54 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
56 getPlaneById(
const std::string&
id,
57 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
58 SpherePrimitiveBasePtr
59 getSphereById(
const std::string&
id,
60 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
61 CylinderPrimitiveBasePtr
62 getCylinderById(
const std::string&
id,
63 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
64 BoxPrimitiveBasePtr getBoxById(
const std::string&
id,
65 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
67 EnvironmentalPrimitiveBaseList getEnvironmentalPrimitivesByTimestamp(
68 const armarx::TimestampBasePtr& timestamp,
69 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
70 PlanePrimitiveBaseList
71 getPlanesByTimestamp(
const armarx::TimestampBasePtr& timestamp,
72 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
73 SpherePrimitiveBaseList
74 getSpheresByTimestamp(
const armarx::TimestampBasePtr& timestamp,
75 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
76 CylinderPrimitiveBaseList
77 getCylindersByTimestamp(
const armarx::TimestampBasePtr& timestamp,
78 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
80 getBoxesByTimestamp(
const armarx::TimestampBasePtr& timestamp,
81 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
83 EnvironmentalPrimitiveBaseList getMostRecentEnvironmentalPrimitives(
84 const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
85 PlanePrimitiveBaseList
86 getMostRecentPlanes(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
87 SpherePrimitiveBaseList
88 getMostRecentSpheres(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
89 CylinderPrimitiveBaseList
90 getMostRecentCylinders(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
92 getMostRecentBoxes(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
94 void removePrimitivesByTimestamp(
const armarx::TimestampBasePtr& timestamp,
95 const ::Ice::Current&
c = Ice::emptyCurrent)
override;
96 void removeOlderPrimitives(
const armarx::TimestampBasePtr& olderThan,
97 const ::Ice::Current&
c = Ice::emptyCurrent)
override;
100 template <
typename EntityPtrType>
103 const ::Ice::Current&
c = Ice::emptyCurrent)
const
107 for (
auto& p : primitives)
110 if (t > mostRecentTimestamp)
112 mostRecentTimestamp = t;
116 return mostRecentTimestamp;