CBMC
goto_harness_generator_factoryt Class Reference

helper to select harness type by name. More...

#include <goto_harness_generator_factory.h>

+ Collaboration diagram for goto_harness_generator_factoryt:

Public Types

using build_generatort = std::function< std::unique_ptr< goto_harness_generatort >()>
 the type of a function that produces a goto-harness generator. More...
 
using generator_optionst = std::map< std::string, std::list< std::string > >
 

Public Member Functions

void register_generator (std::string generator_name, build_generatort build_generator)
 register a new goto-harness generator with the given name. More...
 
std::unique_ptr< goto_harness_generatortfactory (const std::string &generator_name, const generator_optionst &generator_options, const goto_modelt &goto_model)
 return a generator matching the generator name. More...
 

Private Attributes

std::map< std::string, build_generatortgenerators
 

Detailed Description

helper to select harness type by name.

Definition at line 33 of file goto_harness_generator_factory.h.

Member Typedef Documentation

◆ build_generatort

the type of a function that produces a goto-harness generator.

Definition at line 37 of file goto_harness_generator_factory.h.

◆ generator_optionst

using goto_harness_generator_factoryt::generator_optionst = std::map<std::string, std::list<std::string> >

Definition at line 40 of file goto_harness_generator_factory.h.

Member Function Documentation

◆ factory()

std::unique_ptr< goto_harness_generatort > goto_harness_generator_factoryt::factory ( const std::string &  generator_name,
const generator_optionst generator_options,
const goto_modelt goto_model 
)

return a generator matching the generator name.

throws if no generator with the supplied name is registered.

Definition at line 27 of file goto_harness_generator_factory.cpp.

◆ register_generator()

void goto_harness_generator_factoryt::register_generator ( std::string  generator_name,
build_generatort  build_generator 
)

register a new goto-harness generator with the given name.

Parameters
generator_namename of newly registered generator
build_generatorthe function that builds the generator

Definition at line 17 of file goto_harness_generator_factory.cpp.

Member Data Documentation

◆ generators

std::map<std::string, build_generatort> goto_harness_generator_factoryt::generators
private

Definition at line 57 of file goto_harness_generator_factory.h.


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