carl  24.04
Computer ARithmetic Library
carl::SortValueManager Class Reference

Implements a manager for sort values, containing the actual contents of these sort and allocating their ids. More...

#include <SortValueManager.h>

Inheritance diagram for carl::SortValueManager:
Collaboration diagram for carl::SortValueManager:

Public Member Functions

SortValue newSortValue (const Sort &sort)
 Creates a new value for the given sort. More...
 
SortValue defaultSortValue (const Sort &sort) const
 Returns the default value for the given sort. More...
 

Static Public Member Functions

static SortValueManagergetInstance ()
 Returns the single instance of this class by reference. More...
 

Private Member Functions

 SortValueManager ()=default
 Constructs a sort value manager. More...
 

Private Attributes

friend Singleton< SortValueManager >
 
carl::FastMap< Sort, std::size_t > mSortValueIDMap
 Stores for each sort the latest instantiated sort value. More...
 

Detailed Description

Implements a manager for sort values, containing the actual contents of these sort and allocating their ids.

Definition at line 26 of file SortValueManager.h.

Constructor & Destructor Documentation

◆ SortValueManager()

carl::SortValueManager::SortValueManager ( )
privatedefault

Constructs a sort value manager.

Member Function Documentation

◆ defaultSortValue()

SortValue carl::SortValueManager::defaultSortValue ( const Sort sort) const
inline

Returns the default value for the given sort.

Parameters
sortThe sort to return the default value for.
Returns
The resulting sort value.

Definition at line 58 of file SortValueManager.h.

Here is the caller graph for this function:

◆ getInstance()

static SortValueManager & carl::Singleton< SortValueManager >::getInstance ( )
inlinestaticinherited

Returns the single instance of this class by reference.

If there is no instance yet, a new one is created.

Definition at line 45 of file Singleton.h.

◆ newSortValue()

SortValue carl::SortValueManager::newSortValue ( const Sort sort)
inline

Creates a new value for the given sort.

Parameters
sortThe sort to create a new value for.
Returns
The resulting sort value.

Definition at line 46 of file SortValueManager.h.

Here is the caller graph for this function:

Field Documentation

◆ mSortValueIDMap

carl::FastMap<Sort, std::size_t> carl::SortValueManager::mSortValueIDMap
private

Stores for each sort the latest instantiated sort value.

Definition at line 33 of file SortValueManager.h.

◆ Singleton< SortValueManager >

Definition at line 27 of file SortValueManager.h.


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