tfel
Loading...
Searching...
No Matches
mfront::DSLFactory Struct Reference

an abstract factory for the domain specific languages supported by MFront implemented using the singleton pattern. More...

#include </home/runner/work/tfel/tfel/mfront/include/MFront/DSLFactory.hxx>

Public Types

using DSLGenerator
 a simple alias
using DescriptionGenerator = std::function<std::string()>
 a simple alias

Public Member Functions

std::vector< std::string > getRegistredDSLs (const bool=true) const
void registerDSLAlias (const std::string &, const std::string &)
std::string getDSLDescription (const std::string &) const
std::shared_ptr< AbstractDSL > createNewDSL (const std::string &, const AbstractDSL::DSLOptions &={}) const
std::shared_ptr< AbstractDSL > createNewParser (const std::string &, const AbstractDSL::DSLOptions &={}) const
std::vector< std::string > getRegistredParsers (const bool=true) const
void registerDSLCreator (const std::string &, DSLGenerator, DescriptionGenerator)
 register a new DSL generator
void registerParserCreator (const std::string &, DSLGenerator, DescriptionGenerator)
std::string getParserDescription (const std::string &) const
 ~DSLFactory ()
 destructor

Static Public Member Functions

static DSLFactory & getDSLFactory ()
 return the unique instance of the DSLFactory class.

Detailed Description

an abstract factory for the domain specific languages supported by MFront implemented using the singleton pattern.

Member Typedef Documentation

◆ DSLGenerator

Initial value:
std::function<std::shared_ptr<AbstractDSL>(
tfel::utilities::DataMap DSLOptions
a simple alias
Definition AbstractDSL.hxx:39

a simple alias

Member Function Documentation

◆ createNewDSL()

std::shared_ptr< AbstractDSL > mfront::DSLFactory::createNewDSL ( const std::string & ,
const AbstractDSL::DSLOptions & = {} ) const
nodiscard
Returns
an instance of the DSL with the given name
Parameters
[in]nname of the DSL to be generated

◆ createNewParser()

std::shared_ptr< AbstractDSL > mfront::DSLFactory::createNewParser ( const std::string & ,
const AbstractDSL::DSLOptions & = {} ) const
nodiscard
Returns
an instance of the DSL with the given name
Parameters
[in]nname of the DSL to be generated

◆ getRegistredDSLs()

std::vector< std::string > mfront::DSLFactory::getRegistredDSLs ( const bool = true) const
nodiscard
Returns
the list of all registred DSLs.
Parameters
[in]badd the alias

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