mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 08:26:39 +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
 |