1 #ifndef GRAIL_OBJECT_INDEX_BINDING_H
2 #define GRAIL_OBJECT_INDEX_BINDING_H
4 #include "IPlannerObject.hh"
26 template<
class ObjectClass>
29 auto iter = indexToObjectBinding.find(index);
30 if (iter == indexToObjectBinding.end())
34 return static_cast<ObjectClass*
>(iter->second);
39 void CreateBinding(
const std::vector<IPlannerObject*>& plannerObjects);
41 std::map<const IPlannerObject*, unsigned int> objectToIndexBinding{};
42 std::map<unsigned int, IPlannerObject*> indexToObjectBinding{};
Definition: DomainTranslator.hh:19
The interface to be implemented by classes that should be converted and bound to plan-space WorldObje...
Definition: IPlannerObject.hh:16
Definition: ObjectIndexBinding.hh:14
ObjectClass * GetObjectByIndex(unsigned int index) const
Definition: ObjectIndexBinding.hh:27
bool TryGetIndexOfObject(const IPlannerObject *object, unsigned int &outIndex) const
Definition: ObjectIndexBinding.cpp:12