Kstars
starblockfactory.h
A factory that creates StarBlocks and recycles them in an LRU Cache.
Definition starblockfactory.h:22
~StarBlockFactory()
Destructor Deletes the linked list that maintains the Cache, sets the pointer to nullptr.
Definition starblockfactory.cpp:35
bool markNext(std::shared_ptr< StarBlock > &after, std::shared_ptr< StarBlock > &block)
Rank a given StarBlock after another given StarBlock in the LRU list and sync its drawID with the cur...
Definition starblockfactory.cpp:122
int getBlockCount() const
Returns the number of StarBlocks currently produced.
Definition starblockfactory.h:67
int freeUnused()
Frees all StarBlocks that are not used in this draw cycle.
Definition starblockfactory.cpp:287
std::shared_ptr< StarBlock > getBlock()
Return a StarBlock available for use.
Definition starblockfactory.cpp:42
void printStructure() const
Prints the structure of the cache, for debugging.
Definition starblockfactory.cpp:257
bool markFirst(std::shared_ptr< StarBlock > &block)
Mark a StarBlock as most recently used and sync its drawID with the current drawID.
Definition starblockfactory.cpp:82
Holds a block of stars and various peripheral variables to mark its place in data structures.
Definition starblock.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.