many changes, need testing
rewrite PIDiagnostics, but not fully testing change PIQueue to PIDeque many fixes in PIBaseTransfer, it will be threadsafe and stable git-svn-id: svn://db.shs.com.ru/pip@187 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -25,17 +25,17 @@
|
||||
#ifndef PIQUEUE_H
|
||||
#define PIQUEUE_H
|
||||
|
||||
#include "pivector.h"
|
||||
#include "pideque.h"
|
||||
|
||||
template<typename T>
|
||||
class PIP_EXPORT PIQueue: public PIVector<T> {
|
||||
class PIP_EXPORT PIQueue: public PIDeque<T> {
|
||||
public:
|
||||
PIQueue() {;}
|
||||
PIVector<T> & enqueue(const T & v) {PIVector<T>::push_front(v); return *this;}
|
||||
T dequeue() {return PIVector<T>::take_back();}
|
||||
T & head() {return PIVector<T>::back();}
|
||||
const T & head() const {return PIVector<T>::back();}
|
||||
PIVector<T> toVector() {PIVector<T> v(PIVector<T>::size()); for (uint i = 0; i < PIVector<T>::size(); ++i) v[i] = PIVector<T>::at(i); return v;}
|
||||
PIDeque<T> & enqueue(const T & v) {PIDeque<T>::push_front(v); return *this;}
|
||||
T dequeue() {return PIDeque<T>::take_back();}
|
||||
T & head() {return PIDeque<T>::back();}
|
||||
const T & head() const {return PIDeque<T>::back();}
|
||||
PIVector<T> toVector() {PIVector<T> v(PIDeque<T>::size()); for (uint i = 0; i < PIDeque<T>::size(); ++i) v[i] = PIDeque<T>::at(i); return v;}
|
||||
};
|
||||
|
||||
#endif // PIQUEUE_H
|
||||
|
||||
Reference in New Issue
Block a user