Hi, I found a LIFO (QValueStack) but I don't find a FIFO, it does not exists ?
If it does not exists, what kind of template should I use in order to have the behaviour of a FIFO ?
Thanks in advance.
Hi, I found a LIFO (QValueStack) but I don't find a FIFO, it does not exists ?
If it does not exists, what kind of template should I use in order to have the behaviour of a FIFO ?
Thanks in advance.
Hmm, I could use the QValueList and its first/last, pop_front/pop_back, push_front/push_back functions for such a behaviour, but it is not a stack.
There is a QValueStack class (and its cousin QPtrStack).
You always can give stack singularity to your own inherits from QValueList class![]()
a life without programming is like an empty bottle![]()
There is no such thing as FIFO stack --- stacks always have LIFO access. What you need is a queue.Originally Posted by yellowmat
QValueList implements both stack and queue interfaces. If you don't like it, you can write your own class that encapsulates QValueList and delivers only queue interface.
There is a QPtrQueue class if you can use pointers and not values. And of course std::queue.
Bookmarks