15 #ifndef DETECTORGRAPH_INCLUDE_TOPICREGISTRY_LITE2_HPP_ 16 #define DETECTORGRAPH_INCLUDE_TOPICREGISTRY_LITE2_HPP_ 50 : storedPtr(NULL), next(NULL)
69 template<
class TTopicState>
72 #if defined(BUILD_FEATURE_DETECTORGRAPH_CONFIG_STATIC_ASSERTS) 73 static_assert(std::is_base_of<TopicState, TTopicState>::value,
74 "Trying to Resolve non-Topic type.");
76 RegistryNode* nodePtr = ResolveOrRegister<TTopicState>(NULL);
89 template<
class TTopicState>
92 #if defined(BUILD_FEATURE_DETECTORGRAPH_CONFIG_STATIC_ASSERTS) 93 static_assert(std::is_base_of<TopicState, TTopicState>::value,
94 "Trying to Register non-Topic type.");
97 DG_ASSERT(ResolveOrRegister<TTopicState>(NULL)->storedPtr == NULL);
99 RegistryNode* nodePtr = ResolveOrRegister<TTopicState>(topicPtr);
100 RegisterNode(nodePtr);
104 template<
class TTopicState>
107 static RegistryNode topicNode;
110 topicNode.storedPtr =
static_cast<BaseTopic*
>(inTopicPtr);
115 void RegisterNode(RegistryNode* node)
118 node->next = mTopNode;
124 RegistryNode* node = mTopNode;
127 RegistryNode* tmp = node->next;
128 node->storedPtr = NULL;
134 RegistryNode* mTopNode;
139 #endif // DETECTORGRAPH_INCLUDE_TOPICREGISTRY_LITE2_HPP_
Manage data and its handler.
Topic< TTopicState > * Resolve()
Internal - Retrieves a Topic pointer for a given TopicState.
Provide interface for a topic.
void Register(Topic< TTopicState > *topicPtr)
Internal - Registers a Topic pointer for a given TopicState.
#define DG_ASSERT(condition)