Rosetta
Public Member Functions | Private Types | List of all members
basic::datacache::BasicDataCache Class Reference

A DataCache storing objects derived from basic::datacache::CacheableData. More...

#include <BasicDataCache.hh>

Inheritance diagram for basic::datacache::BasicDataCache:
Inheritance graph
[legend]

Public Member Functions

 BasicDataCache ()
 default constructor More...
 
 BasicDataCache (std::size_t const n_slots)
 size constructor More...
 
 BasicDataCache (BasicDataCache const &rval)
 copy constructor More...
 
 ~BasicDataCache () override
 default destructor More...
 
BasicDataCacheoperator= (BasicDataCache const &rval)
 copy assignment More...
 
- Public Member Functions inherited from basic::datacache::DataCache< CacheableData >
 DataCache ()
 default constructor More...
 
 DataCache (std::size_t n_slots)
 size constructor More...
 
 DataCache (DataCache const &src)
 copy constructor More...
 
 ~DataCache () override=default
 destructor More...
 
DataCacheoperator= (DataCache const &src)
 copy assignment More...
 
size_t size () const
 the number of slots in this cache More...
 
void resize (std::size_t n_slots)
 resize the cache for the given number of slots More...
 
void clear ()
 clear all stored data More...
 
void clear (std::size_t slot)
 clear the object in a selected slot More...
 
bool has (std::size_t slot) const
 is there an object in the slot? More...
 
CacheableData const & get (std::size_t slot) const
 get base class reference to the object stored in the slot More...
 
D const & get (std::size_t slot) const
 get derived class reference to the object stored in the slot More...
 
CacheableDataget (std::size_t slot)
 get base class reference to object stored in the slot More...
 
D & get (std::size_t slot)
 get derived class reference to object stored in the slot More...
 
DataCOP get_const_ptr (std::size_t slot) const
 get base class owning ptr to object stored in the slot More...
 
utility::pointer::shared_ptr< D const > get_const_ptr (std::size_t slot) const
 get derived class owning ptr to object stored in the slot More...
 
DataOP get_ptr (std::size_t slot)
 get base class owning ptr to object stored in the slot More...
 
utility::pointer::shared_ptr< D > get_ptr (std::size_t slot)
 get derived class owning ptr to object stored in the slot More...
 
CacheableData const * get_raw_const_ptr (std::size_t slot) const
 get base class raw ptr to object stored in the slot More...
 
D const * get_raw_const_ptr (std::size_t slot) const
 get derived class raw ptr to object stored in the slot More...
 
CacheableDataget_raw_ptr (std::size_t slot)
 get base class raw ptr to object stored in the slot More...
 
D * get_raw_ptr (std::size_t slot)
 get derived class raw ptr to object stored in the slot More...
 
void set (std::size_t slot, DataOP new_data)
 store data in the given slot More...
 
- Public Member Functions inherited from utility::VirtualBase
 VirtualBase ()=default
 Default constructor. More...
 
virtual ~VirtualBase ()=default
 The virtual destructor is one of the main reasons for the VirtualBase class. More...
 
 VirtualBase (VirtualBase const &)=default
 
 VirtualBase (VirtualBase &&)=default
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Private Types

typedef DataCache< CacheableDataSuper
 

Additional Inherited Members

- Public Types inherited from basic::datacache::DataCache< CacheableData >
typedef utility::pointer::shared_ptr< CacheableDataDataOP
 
typedef utility::pointer::shared_ptr< CacheableData const > DataCOP
 
typedef utility::pointer::weak_ptr< CacheableDataDataAP
 
typedef utility::pointer::weak_ptr< CacheableData const > DataCAP
 
- Protected Types inherited from basic::datacache::DataCache< CacheableData >
typedef utility::vector1< DataOPDataOPs
 
- Protected Member Functions inherited from basic::datacache::DataCache< CacheableData >
DataOPs const & data () const
 get the storage vector More...
 
DataOPsdata ()
 get the storage vector More...
 

Detailed Description

A DataCache storing objects derived from basic::datacache::CacheableData.

See DataCache base class for usage details.

Member Typedef Documentation

◆ Super

Constructor & Destructor Documentation

◆ BasicDataCache() [1/3]

basic::datacache::BasicDataCache::BasicDataCache ( )

default constructor

◆ BasicDataCache() [2/3]

basic::datacache::BasicDataCache::BasicDataCache ( std::size_t const  n_slots)

size constructor

Parameters
[in]n_typesThe number of slots for this DataCache.

◆ BasicDataCache() [3/3]

basic::datacache::BasicDataCache::BasicDataCache ( BasicDataCache const &  rval)
default

copy constructor

◆ ~BasicDataCache()

basic::datacache::BasicDataCache::~BasicDataCache ( )
overridedefault

default destructor

Member Function Documentation

◆ operator=()

BasicDataCache & basic::datacache::BasicDataCache::operator= ( BasicDataCache const &  rval)

The documentation for this class was generated from the following files: