|
Grok 20.3.2
|
Dynamic array of pointers of type T. More...
#include <SequentialCache.h>
Public Member Functions | |
| SequentialCache (void) | |
| Constructs a SequentialCache. | |
| SequentialCache (uint64_t maxChunkSize) | |
| Constructs a SequentialCache. | |
| virtual | ~SequentialCache (void) |
| Destroys a SequentialCache. | |
| void | rewind (void) |
| Rewinds state of cache, in order to read from beginning. | |
| T * | next () |
| Gets next pointer in cache. | |
Protected Member Functions | |
| virtual T * | create (void) |
Private Attributes | |
| std::vector< T ** > | chunks |
| T ** | currChunk_ |
| uint64_t | chunkSize_ |
| uint64_t | index_ |
| bool | firstElement_ |
Static Private Attributes | |
| static constexpr uint64_t | kSequentialChunkSize = 1024 |
Dynamic array of pointers of type T.
This class uses a hybrid design : combination of std::vector and simple array
| T | pointer type |
|
inline |
Constructs a SequentialCache.
References kSequentialChunkSize, and SequentialCache().
Referenced by SequentialCache().
|
inline |
Constructs a SequentialCache.
| maxChunkSize | maximum chunk size |
References chunkSize_, currChunk_, firstElement_, index_, and kSequentialChunkSize.
|
inlinevirtual |
Destroys a SequentialCache.
References chunks, and chunkSize_.
|
inlineprotectedvirtual |
Referenced by next().
|
inline |
Gets next pointer in cache.
References chunks, chunkSize_, create(), currChunk_, firstElement_, and index_.
|
inline |
Rewinds state of cache, in order to read from beginning.
References chunks, currChunk_, firstElement_, and index_.
|
private |
Referenced by next(), rewind(), and ~SequentialCache().
|
private |
Referenced by next(), SequentialCache(), and ~SequentialCache().
|
private |
Referenced by next(), rewind(), and SequentialCache().
|
private |
Referenced by next(), rewind(), and SequentialCache().
|
private |
Referenced by next(), rewind(), and SequentialCache().
|
staticconstexprprivate |
Referenced by SequentialCache(), and SequentialCache().