DDD  1.9.0.20240826145154
Public Types | Public Member Functions | Public Attributes | List of all members
UniqueTable< T > Class Template Reference

This class implements a unicity table mechanism, based on an STL hash_set. More...

#include <UniqueTable.h>

Collaboration diagram for UniqueTable< T >:
Collaboration graph

Public Types

typedef d3::hash_set< const T * >::type Table
 Typedef helps hide implementation type (currently gnu gcc's hash_set). More...
 

Public Member Functions

 UniqueTable ()
 Constructor, builds a default table. More...
 
 UniqueTable (size_t s)
 
const T * operator() (const T &_g)
 The application operator, returns the address of the value already in the table if it exists, or inserts and returns the address of the value inserted. More...
 
size_t size () const
 Returns the current number of filled entries in the table. More...
 

Public Attributes

Table table
 The actual table, operations on the UniqueTable are delegated on this. More...
 

Detailed Description

template<typename T>
class UniqueTable< T >

This class implements a unicity table mechanism, based on an STL hash_set.

Requirements on the contained type are thus those of hash_set.

Member Typedef Documentation

◆ Table

template<typename T >
typedef d3::hash_set<const T*>::type UniqueTable< T >::Table

Typedef helps hide implementation type (currently gnu gcc's hash_set).

Constructor & Destructor Documentation

◆ UniqueTable() [1/2]

template<typename T >
UniqueTable< T >::UniqueTable ( )
inline

Constructor, builds a default table.

References UniqueTable< T >::table.

◆ UniqueTable() [2/2]

template<typename T >
UniqueTable< T >::UniqueTable ( size_t  s)
inline

Member Function Documentation

◆ operator()()

template<typename T >
const T* UniqueTable< T >::operator() ( const T &  _g)
inline

The application operator, returns the address of the value already in the table if it exists, or inserts and returns the address of the value inserted.

Parameters
_gthe pointer to the value we want to find in the table.
Returns
the address of an object stored in the UniqueTable such that (*_g == *return_value)

References UniqueTable< T >::table.

◆ size()

template<typename T >
size_t UniqueTable< T >::size ( ) const
inline

Returns the current number of filled entries in the table.

References UniqueTable< T >::table.

Referenced by DED::garbage(), SDED::garbage(), SDED::peak(), DED::pstats(), and SDED::statistics().

Member Data Documentation

◆ table

template<typename T >
Table UniqueTable< T >::table

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

Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Aug 26 2024 14:54:00 for DDD by doxygen 1.9.1