mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-22 11:23:51 +00:00
28 lines
514 B
C++
28 lines
514 B
C++
#ifndef SSL_TEMPL_H
|
|
#define SSL_TEMPL_H
|
|
|
|
template <class SourceT, bool stream, bool file>
|
|
class SSL_Template : public SampleSourceLoader
|
|
{
|
|
public:
|
|
|
|
SSL_Template()
|
|
{
|
|
canLoadStream = stream;
|
|
canLoadFile = file;
|
|
}
|
|
|
|
SampleSourcePtr load(const std::string &filename)
|
|
{
|
|
assert(canLoadFile);
|
|
return SampleSourcePtr(new SourceT(filename));
|
|
}
|
|
|
|
SampleSourcePtr load(Stream::StreamPtr input)
|
|
{
|
|
assert(canLoadStream);
|
|
return SampleSourcePtr(new SourceT(input));
|
|
}
|
|
};
|
|
|
|
#endif
|