add GL/Buffer
This commit is contained in:
27
common/factory.hh
Normal file
27
common/factory.hh
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "nf7.hh"
|
||||
|
||||
#include "common/future.hh"
|
||||
|
||||
|
||||
namespace nf7 {
|
||||
|
||||
template <typename T>
|
||||
class Factory : public nf7::File::Interface {
|
||||
public:
|
||||
using Product = T;
|
||||
|
||||
Factory() = default;
|
||||
Factory(const Factory&) = delete;
|
||||
Factory(Factory&&) = delete;
|
||||
Factory& operator=(const Factory&) = delete;
|
||||
Factory& operator=(Factory&&) = delete;
|
||||
|
||||
virtual Product Create() noexcept = 0;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
using AsyncFactory = Factory<nf7::Future<T>>;
|
||||
|
||||
} // namespace nf7
|
Reference in New Issue
Block a user