mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			878 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			878 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef IMAGEREADER_H
 | |
| #define IMAGEREADER_H
 | |
| 
 | |
| class SectorSet;
 | |
| class ImageSpec;
 | |
| 
 | |
| class ImageReader
 | |
| {
 | |
| public:
 | |
| 	ImageReader(const ImageSpec& spec);
 | |
| 	virtual ~ImageReader() {};
 | |
| 
 | |
| public:
 | |
|     static std::unique_ptr<ImageReader> create(const ImageSpec& spec);
 | |
| 	static void verifyImageSpec(const ImageSpec& spec);
 | |
| 
 | |
| private:
 | |
| 	typedef 
 | |
| 		std::function<
 | |
| 			std::unique_ptr<ImageReader>(const ImageSpec& spec)
 | |
| 		>
 | |
| 		Constructor;
 | |
| 
 | |
| 	static std::map<std::string, Constructor> formats;
 | |
| 
 | |
|     static std::unique_ptr<ImageReader> createDiskCopyImageReader(const ImageSpec& spec);
 | |
|     static std::unique_ptr<ImageReader> createImgImageReader(const ImageSpec& spec);
 | |
|     static std::unique_ptr<ImageReader> createJv3ImageReader(const ImageSpec& spec);
 | |
| 
 | |
| 	static Constructor findConstructor(const ImageSpec& spec);
 | |
| 
 | |
| public:
 | |
| 	virtual SectorSet readImage() = 0;
 | |
| 
 | |
| protected:
 | |
| 	ImageSpec spec;
 | |
| };
 | |
| 
 | |
| #endif
 | |
| 
 |