32 lines
881 B
C++
32 lines
881 B
C++
#ifndef _LRU_LIFO_H
|
|
#define _LRU_LIFO_H
|
|
|
|
#include <vector>
|
|
#include <cstdint>
|
|
#include <mentalEntity.h>
|
|
|
|
namespace smo {
|
|
|
|
/** EXPLANATION:
|
|
* LruLifo is a Last In First Out (LIFO) buffer with Least Recently Used (LRU)
|
|
* eviction. It is used to store a limited number of items, and the oldest item
|
|
* is removed when the buffer is full.
|
|
*
|
|
* This is used to store the most recent qualia to be processed by drctr.
|
|
* Drctr pops objects off the LruLifos in its main loop.
|
|
*
|
|
* Naturally since a mind is operating in dynamic world, we may very well be
|
|
* flooded with with too many qualia to process. Some qualia may just have to be
|
|
* dropped. So we may very well literally forget those qualia that get dropped
|
|
* from the LruLifos. (Because LruLifos have a fixed size.)
|
|
*/
|
|
class LruLifo {
|
|
public:
|
|
LruLifo() = default;
|
|
~LruLifo() = default;
|
|
};
|
|
|
|
} // namespace smo
|
|
|
|
#endif
|