2015-12-07 23:27:53 +03:00
|
|
|
/*
|
|
|
|
* Vector.h
|
|
|
|
*
|
|
|
|
* Created on: 7 Dec 2015
|
|
|
|
* Author: hieu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2015-12-10 08:49:51 +03:00
|
|
|
#include <cassert>
|
2015-12-07 23:27:53 +03:00
|
|
|
#include "MemPool.h"
|
|
|
|
|
2015-12-10 23:49:30 +03:00
|
|
|
namespace Moses2
|
|
|
|
{
|
|
|
|
|
2015-12-07 23:27:53 +03:00
|
|
|
template <typename T>
|
2016-02-20 04:26:06 +03:00
|
|
|
class Vector : public std::vector<T>
|
2016-01-12 15:10:56 +03:00
|
|
|
{
|
2016-02-20 04:26:06 +03:00
|
|
|
typedef std::vector<T> Parent;
|
2015-12-10 08:49:51 +03:00
|
|
|
|
2016-01-12 15:10:56 +03:00
|
|
|
public:
|
2016-01-14 14:49:42 +03:00
|
|
|
Vector(MemPool &pool, size_t size = 0, const T &val = T())
|
2016-02-20 04:26:06 +03:00
|
|
|
:Parent(size, val)
|
2015-12-11 00:21:52 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-12-07 23:27:53 +03:00
|
|
|
protected:
|
|
|
|
};
|
|
|
|
|
2015-12-10 23:49:30 +03:00
|
|
|
}
|
|
|
|
|