Class representing a D64 image in memory. More...
#include <mkd64/image.h>
Related Functions | |
(Note that these are not member functions.) | |
BlockStatus | Image_blockStatus (const Image *self, const BlockPosition *pos) |
Get the current status of a block at a given position. | |
Track * | Image_track (const Image *self, int tracknum) |
Get track object for a given track number. | |
Block * | Image_block (const Image *self, const BlockPosition *pos) |
Get block object for a given position. | |
Block * | Image_allocateAt (const Image *self, const BlockPosition *pos) |
Try to allocate a block at a fixed position. | |
void | Image_setAllocator (Image *self, IBlockAllocator *allocator) |
Set custom allocator. | |
IBlockAllocator * | Image_allocator (const Image *self) |
Get current allocator. |
Class representing a D64 image in memory.
|
related |
Try to allocate a block at a fixed position.
This tries to allocate a given block. A module reserving this block is asked to release it if necessary. It will fail if the block is already allocated or a module reserving it refuses to release it.
self | the image |
pos | the position of the block to allocate |
|
related |
Get current allocator.
Get a pointer to the IBlockAllocator instance currently in use.
self | the image |
|
related |
Get block object for a given position.
This also locates blocks on tracks from modules providing extra tracks
self | the image |
pos | the position of the block to get |
|
related |
Get the current status of a block at a given position.
self | the image |
pos | the position of the block |
|
related |
Set custom allocator.
Set an IBlockAllocator instance to handle block allocations while writing files. The Image class has a default allocator that is used if this is never called – the default allocator is looking sequentially for free blocks, starting at track #1.
self | the image |
allocator | the allocator to use |
Get track object for a given track number.
This also tries to get a track from modules providing extra tracks
self | the image |
tracknum | the number of the track to get |