The Vish Visualization Shell 0.3
Vish
Public Member Functions | Public Attributes | List of all members
MemCore::CacheBase Class Referenceabstract

Abstract base class for Cache objects. More...

#include <elementary/memcore/CacheBase.hpp>

Inheritance diagram for MemCore::CacheBase:
MemCore::ReferenceBase< CacheBase > MemCore::Cache Wizt::GLCache

Public Member Functions

 CacheBase (const std::string &name)
 Default constructor.
 
virtual memsize_t maxCost () const =0
 Tell the maximally allowed cost of all object that could be stored in the cache.
 
virtual memsize_t totalCost (bool FreeableOnly=false) const =0
 Tell the total cost of all object that are currently stored in the cache.
 
virtual ~CacheBase ()=0
 Destructor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< CacheBase >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< CacheBase, CacheBase > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (CacheBase *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 

Public Attributes

std::string ElementDescription
 Just some informative text.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< CacheBase >
using reference_domain_t = CacheBase
 The type of the base class.
 
using SelfPtr_t = WeakPtr< CacheBase, CacheBase >
 Type for a pointer to this object itself.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< CacheBase >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

Abstract base class for Cache objects.