1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-19 23:32:28 +00:00
CLK/Storage/Disk/DiskImage/Formats/NIB.hpp

43 lines
1009 B
C++
Raw Normal View History

//
// NIB.hpp
// Clock Signal
//
// Created by Thomas Harte on 21/04/2018.
// Copyright 2018 Thomas Harte. All rights reserved.
//
#ifndef NIB_hpp
#define NIB_hpp
#include "../DiskImage.hpp"
#include "../../../FileHolder.hpp"
namespace Storage {
namespace Disk {
/*!
Provides a @c DiskImage describing an Apple NIB disk image:
2018-05-25 22:30:55 +00:00
a bit stream capture that omits sync zeroes, and doesn't define
the means for full reconstruction.
*/
class NIB: public DiskImage {
public:
NIB(const std::string &file_name);
2018-05-25 22:30:55 +00:00
// Implemented to satisfy @c DiskImage.
HeadPosition get_maximum_head_position() final;
std::shared_ptr<::Storage::Disk::Track> get_track_at_position(::Storage::Disk::Track::Address address) final;
void set_tracks(const std::map<Track::Address, std::shared_ptr<Track>> &tracks) final;
bool get_is_read_only() final;
private:
FileHolder file_;
long get_file_offset_for_position(Track::Address address);
2018-05-25 22:30:55 +00:00
long file_offset(Track::Address address);
};
}
}
#endif /* NIB_hpp */