My Project
Classes | Public Member Functions | List of all members
mlir::StorageUniquer Class Reference

#include <StorageUniquer.h>

Classes

class  BaseStorage
 
class  StorageAllocator
 

Public Member Functions

 StorageUniquer ()
 
 ~StorageUniquer ()
 
template<typename Storage , typename Arg , typename... Args>
Storage * get (std::function< void(Storage *)> initFn, unsigned kind, Arg &&arg, Args &&... args)
 
template<typename Storage >
Storage * get (std::function< void(Storage *)> initFn, unsigned kind)
 
template<typename Storage , typename Arg , typename... Args>
void erase (unsigned kind, Arg &&arg, Args &&... args)
 

Detailed Description

A utility class to get, or create instances of storage classes. These storage classes must respect the following constraints:

For non-parametric storage classes, i.e. those that are solely uniqued by their kind, nothing else is needed. Instances of these classes can be created by calling get without trailing arguments.

Otherwise, the parametric storage classes may be created with get, and must respect the following:

Constructor & Destructor Documentation

◆ StorageUniquer()

StorageUniquer::StorageUniquer ( )

◆ ~StorageUniquer()

StorageUniquer::~StorageUniquer ( )

Member Function Documentation

◆ erase()

template<typename Storage , typename Arg , typename... Args>
void mlir::StorageUniquer::erase ( unsigned  kind,
Arg &&  arg,
Args &&...  args 
)
inline

Erases a uniqued instance of 'Storage'. This function is used for derived types that have complex storage or uniquing constraints.

◆ get() [1/2]

template<typename Storage , typename Arg , typename... Args>
Storage* mlir::StorageUniquer::get ( std::function< void(Storage *)>  initFn,
unsigned  kind,
Arg &&  arg,
Args &&...  args 
)
inline

Gets a uniqued instance of 'Storage'. 'initFn' is an optional parameter that can be used to initialize a newly inserted storage instance. This function is used for derived types that have complex storage or uniquing constraints.

◆ get() [2/2]

template<typename Storage >
Storage* mlir::StorageUniquer::get ( std::function< void(Storage *)>  initFn,
unsigned  kind 
)
inline

Gets a uniqued instance of 'Storage'. 'initFn' is an optional parameter that can be used to initialize a newly inserted storage instance. This function is used for derived types that use no additional storage or uniquing outside of the kind.


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