ROSE 0.11.145.192
Public Member Functions | List of all members
Rose::Combinatorics::Hasher::HasherMaker< T > Class Template Reference

Description

template<typename T>
class Rose::Combinatorics::Hasher::HasherMaker< T >

Templated to create any Hasher and register it with HasherFactory.

HasherMaker makes the Hasher named by typename T, and automatically registers itself with HasherFactory. If a user creates a new Hasher, In their implemntation file (.C) they should include a static variable declared and defined like this: static Hasher::HasherMaker<HasherSha256Builtin> makerSHA256("SHA256");

The instantiation of this variable at module load time will call the HasherMaker constructor, which automatically registers it with the HasherFactor (and constructs the HasherFactory if necessary.)

Definition at line 285 of file Combinatorics.h.

#include <roseSupport/Combinatorics.h>

Inheritance diagram for Rose::Combinatorics::Hasher::HasherMaker< T >:
Inheritance graph
[legend]
Collaboration diagram for Rose::Combinatorics::Hasher::HasherMaker< T >:
Collaboration graph
[legend]

Public Member Functions

 HasherMaker (const std::string &hashType)
 Creates a HasherMaker and registers it with HasherFactory.
 
virtual std::shared_ptr< Hashercreate () const
 Creates a Hasher (the type of Hasher is determined by the template T) and returns it as a shared_ptr.
 

Constructor & Destructor Documentation

◆ HasherMaker()

template<typename T >
Rose::Combinatorics::Hasher::HasherMaker< T >::HasherMaker ( const std::string &  hashType)
inline

Creates a HasherMaker and registers it with HasherFactory.

Make HasherMakers static variableso so this is run at module initialization time.

Parameters
[in]hashTypeThe name/key of this hasher in the HasherFactory.

Definition at line 296 of file Combinatorics.h.

Member Function Documentation

◆ create()

template<typename T >
virtual std::shared_ptr< Hasher > Rose::Combinatorics::Hasher::HasherMaker< T >::create ( ) const
inlinevirtual

Creates a Hasher (the type of Hasher is determined by the template T) and returns it as a shared_ptr.

Implements Rose::Combinatorics::Hasher::IHasherMaker.

Definition at line 305 of file Combinatorics.h.


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