CGRA-ME
MRRGProcedureCache.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * The software programs comprising "CGRA-ME" and the documentation provided
3  * with them are copyright by its authors and the University of Toronto. Only
4  * non-commercial, not-for-profit use of this software is permitted without ex-
5  * plicit permission. This software is provided "as is" with no warranties or
6  * guarantees of support. See the LICENCE for more details. You should have re-
7  * ceived a copy of the full licence along with this software. If not, see
8  * <http://cgra-me.ece.utoronto.ca/license/>.
9  ******************************************************************************/
10 
11 #ifndef MRRG_PROCEDURE_CACHE__H_
12 #define MRRG_PROCEDURE_CACHE__H_
13 
14 #include <memory>
15 
19 class MRRGProcedureCache;
21 public:
26 
29 
30  explicit operator bool() const { return (bool)impl_ptr; }
31  MRRGProcedureCache& operator*() const { return *impl_ptr; }
32  MRRGProcedureCache* operator->() const { return get(); }
33 
34  MRRGProcedureCache* get() const { return impl_ptr.get(); }
36  void reset() { impl_ptr.reset(); }
37 private:
38  std::shared_ptr<MRRGProcedureCache> impl_ptr;
39 };
40 
41 #endif /* MRRG_PROCEDURE_CACHE__H_ */
MRRGProcedureCacheHandle::~MRRGProcedureCacheHandle
~MRRGProcedureCacheHandle()
MRRGProcedureCacheHandle::reset
void reset()
Definition: MRRGProcedureCache.h:36
MRRGProcedureCacheHandle::MRRGProcedureCacheHandle
MRRGProcedureCacheHandle()
Definition: MRRGProcedures.cpp:123
MRRGProcedureCacheHandle::get
MRRGProcedureCache * get() const
Definition: MRRGProcedureCache.h:34
MRRGProcedureCache
Definition: MRRGProcedures.cpp:110
MRRGProcedureCacheHandle::impl_ptr
std::shared_ptr< MRRGProcedureCache > impl_ptr
Definition: MRRGProcedureCache.h:38
MRRGProcedureCacheHandle::operator->
MRRGProcedureCache * operator->() const
Definition: MRRGProcedureCache.h:32
MRRGProcedureCacheHandle
Definition: MRRGProcedureCache.h:20
MRRGProcedureCacheHandle::getOrCreate
MRRGProcedureCache & getOrCreate()
Definition: MRRGProcedures.cpp:131
MRRGProcedureCacheHandle::operator*
MRRGProcedureCache & operator*() const
Definition: MRRGProcedureCache.h:31
MRRGProcedureCacheHandle::operator=
MRRGProcedureCacheHandle & operator=(const MRRGProcedureCacheHandle &)