8 #ifndef OBJECTMAPCOMPONENT 9 #define OBJECTMAPCOMPONENT 11 #include "columns/BaseObject.hpp" 28 virtual void setObjectType()
override { mObjectType =
"ObjectMapComponent"; }
30 void setObjectMap(std::map<std::string, Observer *>
const &table) { mObjectMap = table; }
33 S *lookup(std::string
const &name)
const {
34 S *lookupResult =
nullptr;
35 auto findResult = mObjectMap.find(name);
36 if (findResult != mObjectMap.end()) {
37 auto observerPtr = findResult->second;
38 lookupResult =
dynamic_cast<S *
>(observerPtr);
46 int initialize(
char const *name,
HyPerCol *hc) {
return BaseObject::initialize(name, hc); }
49 std::map<std::string, Observer *> mObjectMap;
55 #endif // OBJECTMAPCOMPONENT