mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-15 00:18:17 -05:00
31 lines
409 B
C++
31 lines
409 B
C++
/*
|
|
* PointerVector.h
|
|
*
|
|
*/
|
|
|
|
#ifndef TOOLS_POINTERVECTOR_H_
|
|
#define TOOLS_POINTERVECTOR_H_
|
|
|
|
#include <vector>
|
|
using namespace std;
|
|
|
|
template<class T>
|
|
class PointerVector : public vector<T>
|
|
{
|
|
int i;
|
|
|
|
public:
|
|
PointerVector() : i(0) {}
|
|
void clear()
|
|
{
|
|
vector<T>::clear();
|
|
i = 0;
|
|
}
|
|
T& next()
|
|
{
|
|
return (*this)[i++];
|
|
}
|
|
};
|
|
|
|
#endif /* TOOLS_POINTERVECTOR_H_ */
|