Go to the documentation of this file.
23 template <
class _EntityInstanceT,
class _Derived>
74 return not this->
empty();
102 const size_t si =
static_cast<size_t>(
index);
176 template <
class InstanceFunctionT>
186 template <
class InstanceFunctionT>
196 template <
class InstanceFunctionT>
200 if (
id.hasInstanceIndex())
214 template <
class InstanceFunctionT>
218 if (
id.hasInstanceIndex())
235 for (
size_t i = 0; i < this->
size(); ++i)
237 indices.push_back(
static_cast<int>(i));
272 if (instance.index() > 0 &&
static_cast<size_t>(instance.index()) > this->_container.size())
276 "EntitySnapshot::addInstance",
277 "Cannot add an EntityInstance because its index is too big.");
280 int index = instance.index();
291 int index =
static_cast<int>(this->
size());
303 if (this->
size() != other.size())
310 if (not instance.equalsDeep(other.getInstance(i)))
328 return "entity snapshot";
const EntityInstanceT & getInstance(int index) const
EntityInstanceT & getInstance(int index)
Get the given instance.
const EntityInstanceT & getInstance(const MemoryID &instanceID) const
Indicates that an argument was invalid.
EntityInstanceT & addInstance(const EntityInstanceT &instance)
Add a single instance with data.
bool forEachInstance(InstanceFunctionT &&func)
Base class of memory classes on different levels.
Data of an entity at one point in time.
bool forEachChild(ChildFunctionT &&func)
std::string getKeyString() const
bool forEachInstance(InstanceFunctionT &&func) const
Provides default implmentations of MemoryContainer, as well as iterators (which requires a template).
bool forEachInstanceIn(const MemoryID &id, InstanceFunctionT &&func)
bool equalsDeep(const DerivedT &other) const
EntityInstanceT * findInstance(const MemoryID &instanceID)
const Time & time() const
bool forEachInstanceIn(const MemoryID &id, InstanceFunctionT &&func) const
void throwIfNotEqual(const Time &ownTime, const Time &updateTime)
bool hasInstances() const
Indicate whether this snapshot has any instances.
bool hasInstance(const MemoryID &instanceID) const
EntityInstanceT & addInstance(EntityInstanceT &&instance)
std::vector< int > getInstanceIndices() const
pcl::PointIndices::Ptr indices(const PCG &g)
Retrieve the indices of the points of the point cloud stored in a point cloud graph that actually bel...
std::string toDateTimeMilliSeconds(const Time &time, int decimals=6)
Returns timeas e.g.
EntitySnapshotBase(Time time, const MemoryID &parentID={})
EntitySnapshotBase & operator=(const EntitySnapshotBase &other)=default
An update of an entity for a specific point in time.
const EntityInstanceT * findInstance(const MemoryID &instanceID) const
void checkHasInstanceIndex(const MemoryID &instanceID)
Throw armem::error::InvalidMemoryID if the given ID has no instance index.
armarx::core::time::DateTime Time
const std::string & to_string(const std::string &s)
std::vector< _EntityInstanceT > ContainerT
static std::string getLevelName()
Represents a point in time.
bool hasInstance(int index) const
void update(const EntityUpdate &update)
const EntityInstanceT * findInstance(int index) const
EntityInstance EntityInstanceT
bool call(FunctionT &&func, ChildT &&child)
EntityInstanceT & getInstance(const MemoryID &instanceID)
Get the given instance.
MemoryID withInstanceIndex(int index) const
EntityInstanceT & addInstance()
EntitySnapshotBase(const MemoryID &id)
EntityInstanceT * findInstance(int index)