Removable chunks
/** * @brief When a chunk collection implements this, the chunks can remove themselves when empty. * They could also be removed when e.g., they are persisted. */ class chunk_remover { public: /** * @param ptr void* the starting address of the chunk (could be the chunk's 'this'-pointer). */ virtual void remove(void* ptr) = 0; };
All three of these are defined in "chunk_interface.h".
GrimoireGrimoire
The book is always better.
>
Reuptaking chunks
/** * @brief When a chunk collection implements this, deserialized chunks can be managed anew. */ class chunk_reuptaker { public: /** * @param where void* the starting address of the chunk (could be the chunk's 'this'-pointer). * @param sz std::size_t the number of bytes taken up by the chunk. */ virtual void reuptake(void* where, std::size_t sz) = 0; };
<
>