GetFindInstanceMixin< DerivedT > Struct Template Reference

#include <RobotAPI/libraries/armem/core/base/detail/lookup_mixins.h>

+ Inheritance diagram for GetFindInstanceMixin< DerivedT >:

Public Member Functions

auto * findInstance (const MemoryID &instanceID)
 Find an entity instance.
 
const auto * findInstance (const MemoryID &instanceID) const
 
auto & getInstance (const MemoryID &instanceID)
 Retrieve an entity instance.
 
const auto & getInstance (const MemoryID &instanceID) const
 
bool hasInstance (const MemoryID &instanceID) const
 Indicate whether this container has an instance with the given ID.
 
bool hasInstances () const
 Indicate whether this container contains at least one entity instance.
 

Member Function Documentation

◆ findInstance() [1/2]

template<class DerivedT>
auto * findInstance ( const MemoryID & instanceID)
inline

Find an entity instance.

Parameters
idThe instance ID.
Returns
The instance or nullptr if it is missing.

◆ findInstance() [2/2]

template<class DerivedT>
const auto * findInstance ( const MemoryID & instanceID) const
inline

◆ getInstance() [1/2]

template<class DerivedT>
auto & getInstance ( const MemoryID & instanceID)
inline

Retrieve an entity instance.

Parameters
idThe instance ID.
Returns
The instance if it is found.
Exceptions
armem::error::ArMemErrorif it is missing.

◆ getInstance() [2/2]

template<class DerivedT>
const auto & getInstance ( const MemoryID & instanceID) const
inline

◆ hasInstance()

template<class DerivedT>
bool hasInstance ( const MemoryID & instanceID) const
inline

Indicate whether this container has an instance with the given ID.

Parameters
instanceIDThe instance ID.
Returns
... WIP

◆ hasInstances()

template<class DerivedT>
bool hasInstances ( ) const
inline

Indicate whether this container contains at least one entity instance.

Returns
True if there is at least one entity instance.

The documentation for this struct was generated from the following file: