retdec
|
A class providing an easy construction of compound semantics from several different semantics. More...
#include <compound_semantics_builder.h>
Static Public Member Functions | |
static ShPtr< CompoundSemantics > | build (const StringVector &semanticsIds) |
Builds compound semantics from the given list of IDs. More... | |
Private Member Functions | |
CompoundSemanticsBuilder () | |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable ()=default | |
~NonCopyable ()=default | |
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).
|
private |
|
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.