The header for the cache, this is used to check if the serialized cache is compatible
| 362 | |
| 363 | // The header for the cache, this is used to check if the serialized cache is compatible |
| 364 | class RefCountCacheHeader |
| 365 | { |
| 366 | public: |
| 367 | unsigned int magic = REFCOUNTCACHE_MAGIC_NUMBER; |
| 368 | ts::VersionNumber version{REFCOUNTCACHE_VERSION}; |
| 369 | ts::VersionNumber object_version; // version passed in of whatever it is we are caching |
| 370 | |
| 371 | RefCountCacheHeader(ts::VersionNumber object_version = ts::VersionNumber()); |
| 372 | bool operator==(RefCountCacheHeader const &that) const; |
| 373 | bool compatible(RefCountCacheHeader *that) const; |
| 374 | }; |
| 375 | |
| 376 | // RefCountCache is a ref-counted key->value map to store classes that inherit from RefCountObj. |
| 377 | // Once an item is `put` into the cache, the cache will maintain a Ptr<> to that object until erase |
no test coverage detected