mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			665 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			665 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef SECTORSET_H
 | |
| #define SECTORSET_H
 | |
| 
 | |
| class Sector;
 | |
| 
 | |
| class SectorSet
 | |
| {
 | |
| private:
 | |
| 	typedef std::tuple<int, int, int> key_t;
 | |
| 
 | |
| public:
 | |
| 	static key_t keyof(int track, int head, int sector)
 | |
| 	{ return std::tuple<int, int, int>(track, head, sector); }
 | |
| 
 | |
| 	SectorSet() {};
 | |
| 
 | |
| 	std::unique_ptr<Sector>& get(int track, int head, int sector);
 | |
| 	Sector* get(int track, int head, int sector) const;
 | |
| 
 | |
| 	const std::map<const key_t, std::unique_ptr<Sector>>& get() const
 | |
| 	{ return _data; }
 | |
| 
 | |
| 	void calculateSize(
 | |
| 		unsigned& numTracks, unsigned& numHeads, unsigned& numSectors,
 | |
| 		unsigned& sectorSize) const;
 | |
| 
 | |
| private:
 | |
| 	std::map<const key_t, std::unique_ptr<Sector>> _data;
 | |
| };
 | |
| 
 | |
| #endif
 | |
| 
 |