retdec
Static Public Member Functions | Private Member Functions | List of all members
retdec::llvmir2hll::CompoundSemanticsBuilder Class Reference

A class providing an easy construction of compound semantics from several different semantics. More...

#include <compound_semantics_builder.h>

Inheritance diagram for retdec::llvmir2hll::CompoundSemanticsBuilder:
Inheritance graph
[legend]
Collaboration diagram for retdec::llvmir2hll::CompoundSemanticsBuilder:
Collaboration graph
[legend]

Static Public Member Functions

static ShPtr< CompoundSemanticsbuild (const StringVector &semanticsIds)
 Builds compound semantics from the given list of IDs. More...
 

Private Member Functions

 CompoundSemanticsBuilder ()
 
- Private Member Functions inherited from retdec::utils::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 

Detailed Description

A class providing an easy construction of compound semantics from several different semantics.

To build compound semantics, use build().

This class implements the "static helper" (or "library") design pattern (it has just static functions and no instances can be created).

Constructor & Destructor Documentation

◆ CompoundSemanticsBuilder()

retdec::llvmir2hll::CompoundSemanticsBuilder::CompoundSemanticsBuilder ( )
private

Member Function Documentation

◆ build()

ShPtr< CompoundSemantics > retdec::llvmir2hll::CompoundSemanticsBuilder::build ( const StringVector semanticsIds)
static

Builds compound semantics from the given list of IDs.

If semanticsIds is of the form ("sem1", "sem2", "sem3"), then the resulting compound semantics will be of the form (sem1, sem2, sem3). This means that when the functions from the Semantics' interface are called, sem1 is asked first, then sem2 (if sem1 doesn't know the answer) and so on.

For every ID in semanticsIds, the builder calls SemanticsFactory to obtain an instance of the requested semantics. If there is no semantics with a given ID, a warning message is emitted and the semantics is not added.


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