Initial commit
This commit is contained in:
commit
4f4397b3e1
48 changed files with 2002 additions and 0 deletions
21
VectorFiller/atlas/collection/impl/AbstractVectorFactory.h
Normal file
21
VectorFiller/atlas/collection/impl/AbstractVectorFactory.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include "../VectorFactory.h"
|
||||
|
||||
namespace atlas::collection {
|
||||
template <typename T>
|
||||
class AbstractVectorFactory : public VectorFactory<T> {
|
||||
|
||||
public:
|
||||
using base_type = VectorFactory<T>;
|
||||
|
||||
auto createAndFillVector(size_t const size) -> typename base_type::product_type override final
|
||||
{
|
||||
auto result = std::make_shared<std::vector<T>>(size);
|
||||
fill(*result);
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void fill(std::vector<T>&) = 0;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue