#include <map>
#include <string>
#include <vector>
#include "cyber/common/log.h"
Go to the source code of this file.
◆ PERCEPTION_REGISTER_CLASS
#define PERCEPTION_REGISTER_CLASS |
( |
|
clazz, |
|
|
|
name |
|
) |
| |
Value:namespace { \
public: \
virtual ~ObjectFactory##name() {} \
virtual ::apollo::perception::lib::Any NewInstance() { \
return ::apollo::perception::lib::Any(new name()); \
} \
}; \
__attribute__((constructor)) void RegisterFactory##name() { \
if (map.find(#name) == map.end()) map[#name] = new ObjectFactory##name(); \
} \
}
BaseClassMap & GlobalFactoryMap()
Definition: registerer.h:69
std::map< std::string, ObjectFactory * > FactoryMap
Definition: registerer.h:80
◆ PERCEPTION_REGISTER_REGISTERER
#define PERCEPTION_REGISTER_REGISTERER |
( |
|
base_class | ) |
|