15 #ifndef DETECTORGRAPH_INCLUDE_TOPICREGISTRY_STL_HPP_ 16 #define DETECTORGRAPH_INCLUDE_TOPICREGISTRY_STL_HPP_ 40 std::map<const char*, BaseTopic*> registry;
46 template<
class TTopicState>
49 #if __cplusplus >= 201103L 50 static_assert(std::is_base_of<TopicState, TTopicState>::value,
51 "Trying to Resolve non-Topic type.");
53 const char* typeKey =
typeid(TTopicState).name();
54 if (registry.count(typeKey) != 0)
64 template<
class TTopicState>
67 #if __cplusplus >= 201103L 68 static_assert(std::is_base_of<TopicState, TTopicState>::value,
69 "Trying to Register non-Topic type.");
71 registry[
typeid(TTopicState).name()] = obj;
77 #endif // DETECTORGRAPH_INCLUDE_TOPICREGISTRY_STL_HPP_
Manage data and its handler.
void Register(Topic< TTopicState > *obj)
Internal - Registers a Topic pointer for a given TopicState.
Topic< TTopicState > * Resolve()
Internal - Retrieves a Topic pointer for a given TopicState.