66 return newData((
void*)data.c_str(), data.size() + 1);
69 return newData((
void*)&data,
sizeof(T));
83 return add((
void*)data.c_str(), data.size() + 1);
86 return add((
void*)&data,
sizeof(T));
94 return addTop((
void*)data.c_str(), data.size() + 1);
97 return addTop((
void*)&data,
sizeof(T));
105 return addAfter((
void*)data.c_str(), data.size() + 1, after);
108 return addAfter((
void*)&data,
sizeof(T), after);
teoQueueData * teoQueueIteratorNext(teoQueueIterator *it)
Get next element from Teo Queue iterator.
Definition: queue.c:421
teoQueueData * add(const std::string &data)
Definition: queue.hpp:82
teoQueueData * addAfter(const T &data, teoQueueData *after)
Definition: queue.hpp:107
teoQueueData * teoQueueMoveToEnd(teoQueue *q, teoQueueData *qd)
Move element from this queue to the end of queue.
Definition: queue.c:336
int teoQueueDeleteLast(teoQueue *q)
Delete last element from queue and free it.
Definition: queue.c:325
int del(teoQueueData *qd)
Definition: queue.hpp:117
int delLast()
Definition: queue.hpp:127
static T getData(void *data)
Definition: queue.hpp:188
teoQueueData * addTop(const T &data)
Definition: queue.hpp:96
teoQueueIterator * teoQueueIteratorNew(teoQueue *q)
Create new Teo Queue iterator.
Definition: queue.c:385
size_t size()
Definition: queue.hpp:147
teoQueueData * teoQueueNewData(void *data, size_t data_length)
Create new teoQueueData buffer.
Definition: queue.c:135
teoQueueData * put(teoQueueData *qd)
Definition: queue.hpp:142
teoQueueData * teoQueueRemove(teoQueue *q, teoQueueData *qd)
Remove element from queue but not free it.
Definition: queue.c:274
teoQueueData * newData(std::string data)
Definition: queue.hpp:65
int teoQueueFree(teoQueue *q)
Remove all elements from Teo queue.
Definition: queue.c:74
int freeAll()
Definition: queue.hpp:59
int iteratorFree(teoQueueIterator *it)
Definition: queue.hpp:177
teoQueueData * addTop(std::string data)
Definition: queue.hpp:93
virtual ~Queue()
Definition: queue.hpp:54
Queue()
Definition: queue.hpp:53
int(* teoQueueForeachFunction)(teoQueue *q, int idx, teoQueueData *data, void *user_data)
Definition: queue.h:102
teoQueueData * addAfter(void *data, size_t data_length, teoQueueData *after)
Definition: queue.hpp:101
teoQueueData * teoQueueAddTop(teoQueue *q, void *data, size_t data_length)
Add new element to the top of Teo queue.
Definition: queue.c:183
teoQueueData * teoQueueAdd(teoQueue *q, void *data, size_t data_length)
Add new element to the end of Teo queue.
Definition: queue.c:162
teoQueueData * moveToTop(teoQueueData *qd)
Definition: queue.hpp:132
Queue module, linked list with data in body.
Definition: queue.h:49
int teoQueueForeach(teoQueue *q, teoQueueForeachFunction callback, void *user_data)
Loop through queue and call callback function with index and data in parameters.
Definition: queue.c:479
teoQueueData * moveToEnd(teoQueueData *qd)
Definition: queue.hpp:137
teoQueueData * teoQueueIteratorElement(teoQueueIterator *it)
Get current Teo Queue iterator element.
Definition: queue.c:454
int teoQueueDeleteFirst(teoQueue *q)
Delete first element from queue and free it.
Definition: queue.c:315
int delFirst()
Definition: queue.hpp:122
teoQueueIterator * iteratorElement(teoQueueIterator *it, Queue *q=NULL)
Definition: queue.hpp:172
teoQueueData * iteratorPrev(teoQueueIterator *it)
Definition: queue.hpp:162
teoQueue * teoQueueNew()
Create new Teo Queue.
Definition: queue.c:41
int freeData(teoQueueData *qd)
Definition: queue.hpp:73
teoQueueData * teoQueueMoveToTop(teoQueue *q, teoQueueData *qd)
Move element from this queue to the top of queue.
Definition: queue.c:361
teoQueueData * addAfter(std::string data, teoQueueData *after)
Definition: queue.hpp:104
teoQueueData * teoQueuePut(teoQueue *q, teoQueueData *qd)
Put (add, copy) existing queue record to the end of selected queue.
Definition: queue.c:109
teoQueueData * teoQueueAddAfter(teoQueue *q, void *data, size_t data_length, teoQueueData *qd)
Add new element after selected in qd field.
Definition: queue.c:199
teoQueueData * iteratorElement(teoQueueIterator *it)
Definition: queue.hpp:167
teoQueueData * addTop(void *data, size_t data_length)
Definition: queue.hpp:90
teoQueueData * teoQueueIteratorPrev(teoQueueIterator *it)
Get previous element from Teo Queue iterator.
Definition: queue.c:438
teoQueueData * add(void *data, size_t data_length)
Definition: queue.hpp:79
int teoQueueIteratorFree(teoQueueIterator *it)
Free (destroy) Teo Queue iterator.
Definition: queue.c:465
teoQueueData * newData(void *data, size_t data_length)
Definition: queue.hpp:62
size_t teoQueueSize(teoQueue *q)
Get number of elements in Teo queue.
Definition: queue.c:97
teoQueueIterator * teoQueueIteratorReset(teoQueueIterator *it, teoQueue *q)
Reset iterator (or swith to new Queue)
Definition: queue.c:404
teoQueueIterator * iterator()
Definition: queue.hpp:152
int teoQueueDelete(teoQueue *q, teoQueueData *qd)
Delete element from queue and free it.
Definition: queue.c:300
teoQueueData * iteratorNext(teoQueueIterator *it)
Definition: queue.hpp:157
teoQueueData * newData(const T &data)
Definition: queue.hpp:68
int teoQueueDestroy(teoQueue *q)
Destroy Teo Queue.
Definition: queue.c:57
teoQueueData * add(const T &data)
Definition: queue.hpp:85