15 #ifndef DETECTORGRAPH_INCLUDE_GRAPHINPUTQUEUE_LITE_HPP_ 16 #define DETECTORGRAPH_INCLUDE_GRAPHINPUTQUEUE_LITE_HPP_ 32 InputQueueNode(uint8_t* aDispatcherStorage)
33 : dispatcherStorage(aDispatcherStorage), dispatcher(NULL)
34 , next(NULL), busy(
false)
38 uint8_t* dispatcherStorage;
47 template<
class TTopicState>
50 InputQueueNode* node = GetQueueNode<TTopicState>();
78 InputQueueNode* nextNode = DequeueNode();
86 nextNode->busy =
false;
98 return mHeadNode == NULL;
103 InputQueueNode* nextNode = DequeueNode();
105 while(nextNode != NULL)
107 nextNode->busy =
false;
108 nextNode = DequeueNode();
113 void EnqueueNode(InputQueueNode* node)
115 if (mTailNode == NULL)
119 mTailNode->next = NULL;
123 mTailNode->next = node;
125 mTailNode->next = NULL;
129 InputQueueNode* DequeueNode()
131 InputQueueNode* tmp = mHeadNode;
134 if (mHeadNode->next == NULL)
138 mHeadNode = mHeadNode->next;
144 InputQueueNode* mHeadNode;
145 InputQueueNode* mTailNode;
147 template<
class TTopicState>
148 InputQueueNode* GetQueueNode()
151 static InputQueueNode node = InputQueueNode(mInputDispatcherStorage);
158 #endif // DETECTORGRAPH_INCLUDE_GRAPHINPUTQUEUE_LITE_HPP_
Manage data and its handler.
#define DG_ASSERT(condition)