tfel
Loading...
Searching...
No Matches
mfront::MFrontBase Struct Referenceabstract

base class for the MFront and MFrontQuery classes More...

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

Inheritance diagram for mfront::MFrontBase:
mfront::DocumentationGeneratorBase mfront::MFront mfront::QueryHandlerBase mfront::BehaviourDocumentationGenerator mfront::MaterialPropertyDocumentationGenerator mfront::BehaviourQuery mfront::MaterialPropertyQuery mfront::ModelQuery

Public Member Functions

 MFrontBase ()
 constructor
void setInterface (const std::string &)
 add a new interaface
virtual ~MFrontBase ()
 desctructor

Static Public Member Functions

static std::shared_ptr< AbstractDSL > getDSL (const std::string &, const tfel::utilities::DataMap &={})
static std::shared_ptr< AbstractDSL > getDSL (tfel::utilities::CxxTokenizer::const_iterator, const tfel::utilities::CxxTokenizer::const_iterator, const tfel::utilities::DataMap &={})
static void addDSLOption (const std::string &)
 add a new DSL option
static void addMaterialPropertyDSLOption (const std::string &)
 add a new material property DSL option
static void addBehaviourDSLOption (const std::string &)
 add a new behaviour DSL option
static void addModelDSLOption (const std::string &)
 add a new model DSL option
static void parseDSLOptionsFile (const std::string &)
 parse a DSL options file
static void parseMaterialPropertyDSLOptionsFile (const std::string &)
 parse a DSL options file
static void parseBehaviourDSLOptionsFile (const std::string &)
 parse a DSL options file
static void parseModelDSLOptionsFile (const std::string &)
 parse a DSL options file

Protected Member Functions

virtual const tfel::utilities::Argument & getCurrentCommandLineArgument () const =0
virtual bool treatUnknownArgumentBase ()
virtual void finalizeArgumentsParsing ()
 method that must be called once all the arguments have been parsed.
virtual void addInputPaths (const std::string &)
 append paths generated from the given argument to the input files
virtual void treatVerbose ()
 treat the --verbose command line option
virtual void treatUnicodeOutput ()
 treat the --unicode-output command line option
virtual void treatSearchPath ()
 treat the --search-path command line option
virtual void treatDefaultCompatibilityMode ()
 treat the --default-compatibility-mode command line option
virtual void treatMadnexSearchPath ()
 treat the --madnex-search-path command line option
virtual void treatInstallPath ()
 treat the --intall-path (or --install-prefix) command line option
virtual void treatConfigurationFile ()
 treat the --configuration-file command line option
virtual void treatDSLOption ()
 treat the --dsl-option command line option
virtual void treatMaterialPropertyDSLOption ()
 treat the --material-property-dsl-option command line option
virtual void treatBehaviourDSLOption ()
 treat the --behaviour-dsl-option command line option
virtual void treatModelDSLOption ()
 treat the --model-dsl-option command line option
virtual void treatDSLOptionsFile ()
 treat the --dsl-options-file command line option
virtual void treatMaterialPropertyDSLOptionsFile ()
 treat the --material-property-dsl-options-file command line option
virtual void treatBehaviourDSLOptionsFile ()
 treat the --behaviour-dsl-options-file command line option
virtual void treatModelDSLOptionsFile ()
 treat the --model-dsl-options-file command line option
virtual void treatReportWarnings ()
 treat the --report-warnings command line option
virtual void treatWarningError ()
 treat the --warning-error command line option
virtual void treatDebug ()
 treat the --debug command line option
virtual void treatPedantic ()
 treat the --pedantic command line option
virtual void treatInterface ()
 treat the --interface command line option
virtual void treatMaterialIdentifier ()
 treat the --material-identifier command line option
virtual void treatMaterialPropertyIdentifier ()
 treat the --material-property command line option
virtual void treatAllMaterialProperties ()
 treat the --all-material-properties command line option
virtual void treatBehaviourIdentifier ()
 treat the --behaviour command line option
virtual void treatAllBehaviours ()
 treat the --all-behaviours command line option
virtual void treatModelIdentifier ()
 treat the --model command line option
virtual void treatAllModels ()
 treat the --all-models command line option

Protected Attributes

std::vector< std::string > ecmds
 external commands specified on the command line through an --@XXX option. Those external commands are applied to all input files.
std::map< std::string, std::string > substitutions
 substitutions specified on the command line through an --@XXX@=YYY option: every occurrence of XXX in the input files will be replaced by YYY
std::string material_identifier
 material identifier for the next input file
std::string material_property_identifier
 material property identifier for the next input file
std::string behaviour_identifier
 behaviour identifier for the next input file
std::string model_identifier
 model identifier for the next input file
std::set< std::string > inputs
 list of all input files
std::set< std::string > interfaces
 list of interfaces declared on the command line or explicitely added through the set interface method.

Detailed Description

base class for the MFront and MFrontQuery classes

Member Function Documentation

◆ addBehaviourDSLOption()

void mfront::MFrontBase::addBehaviourDSLOption ( const std::string & )
static

add a new behaviour DSL option

Parameters
[in]ooption. Must of a string of the form <option_name>:<option_value>.

◆ addDSLOption()

void mfront::MFrontBase::addDSLOption ( const std::string & )
static

add a new DSL option

Parameters
[in]ooption. Must of a string of the form <option_name>:<option_value>.

◆ addInputPaths()

virtual void mfront::MFrontBase::addInputPaths ( const std::string & )
protectedvirtual

append paths generated from the given argument to the input files

Parameters
[in]ppath generator
Note
for madnex files, the path are generated using the information provided by the material_identifier, material_property_identifier, behaviour_identifier and model_identifier members. Those members are cleared after the treatment.

◆ addMaterialPropertyDSLOption()

void mfront::MFrontBase::addMaterialPropertyDSLOption ( const std::string & )
static

add a new material property DSL option

Parameters
[in]ooption. Must of a string of the form <option_name>:<option_value>.

◆ addModelDSLOption()

void mfront::MFrontBase::addModelDSLOption ( const std::string & )
static

add a new model DSL option

Parameters
[in]ooption. Must of a string of the form <option_name>:<option_value>.

◆ finalizeArgumentsParsing()

virtual void mfront::MFrontBase::finalizeArgumentsParsing ( )
protectedvirtual

method that must be called once all the arguments have been parsed.

Note
This methods checks that the material_identifier, material_property_identifier, behaviour_identifier and model_identifier members are empty. If not, it means that those identifiers have been defined after the last input files.
See also
the addInputPaths method for details

◆ getCurrentCommandLineArgument()

virtual const tfel::utilities::Argument & mfront::MFrontBase::getCurrentCommandLineArgument ( ) const
nodiscardprotectedpure virtual
Returns
the current Argument

Implemented in mfront::MFront, and mfront::QueryHandlerBase.

◆ getDSL() [1/2]

std::shared_ptr< AbstractDSL > mfront::MFrontBase::getDSL ( const std::string & ,
const tfel::utilities::DataMap & = {} )
static
Parameters
[in]f: file name
[in]dsl_optionsoptions passed to the DSL
Returns
an abstract dsl that will handle the file

◆ getDSL() [2/2]

std::shared_ptr< AbstractDSL > mfront::MFrontBase::getDSL ( tfel::utilities::CxxTokenizer::const_iterator ,
const tfel::utilities::CxxTokenizer::const_iterator ,
const tfel::utilities::DataMap & = {} )
static
Returns
an abstract dsl that will handle the source described by the given iterators
Parameters
[in]ptiterator to the first token of the source
[in]pteiterator to the last token of the source
[in]dsl_optionsoptions passed to the DSL

◆ parseBehaviourDSLOptionsFile()

void mfront::MFrontBase::parseBehaviourDSLOptionsFile ( const std::string & )
static

parse a DSL options file

Parameters
[in]foption file in JSON-like format.

◆ parseDSLOptionsFile()

void mfront::MFrontBase::parseDSLOptionsFile ( const std::string & )
static

parse a DSL options file

Parameters
[in]foption file in JSON-like format.

◆ parseMaterialPropertyDSLOptionsFile()

void mfront::MFrontBase::parseMaterialPropertyDSLOptionsFile ( const std::string & )
static

parse a DSL options file

Parameters
[in]foption file in JSON-like format.

◆ parseModelDSLOptionsFile()

void mfront::MFrontBase::parseModelDSLOptionsFile ( const std::string & )
static

parse a DSL options file

Parameters
[in]foption file in JSON-like format.

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