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

base class for queries handler More...

#include </home/runner/work/tfel/tfel/mfront-query/include/MFront/QueryHandlerBase.hxx>

Inheritance diagram for mfront::QueryHandlerBase:
tfel::utilities::ArgumentParserBase< QueryHandlerBase > mfront::MFrontBase tfel::utilities::ArgumentParser mfront::BehaviourQuery mfront::MaterialPropertyQuery mfront::ModelQuery

Public Member Functions

 QueryHandlerBase (const int, const char *const *const)
 default constructor
 ~QueryHandlerBase () override
 destructor
Public Member Functions inherited from tfel::utilities::ArgumentParserBase< QueryHandlerBase >
 ArgumentParserBase ()
 default constructor
ArgumentParserBase & operator= (const ArgumentParserBase &)=delete
void registerNewCallBack (const std::string &, const MemberFuncPtr &, const std::string &="", const bool=false)
 register a new callback
 ~ArgumentParserBase () override
 destructor
Public Member Functions inherited from tfel::utilities::ArgumentParser
 ArgumentParser ()
 default constructor
 ArgumentParser (const int, const char *const *const)
 constructor
 ArgumentParser (const ArgumentParser &)=delete
 copy constructor
 ArgumentParser (ArgumentParser &&)=delete
 move constructor
ArgumentParser & operator= (const ArgumentParser &)=delete
 standard assignement
ArgumentParser & operator= (ArgumentParser &&)=delete
 move assignement
virtual void setArguments (const int, const char *const *const)
 set the arguments to be parsed
virtual void registerCallBack (const std::string &, const CallBack &)
 register a new callback
virtual void registerCallBack (const std::string &, const std::string &, const CallBack &)
 register a new callback
virtual void parseArguments ()
 parse arguments using registred methods.
const CallBacksContainer & getRegistredCallBacks () const
virtual ~ArgumentParser ()
 destructor
Public Member Functions inherited from mfront::MFrontBase
 MFrontBase ()
 constructor
void setInterface (const std::string &)
 add a new interaface
virtual ~MFrontBase ()
 desctructor

Protected Member Functions

const tfel::utilities::Argument & getCurrentCommandLineArgument () const final
void treatUnknownArgument () final
 method called while parsing unregistred command line arguments.
std::string getVersionDescription () const final
std::string getUsageDescription () const final
virtual void registerCommandLineCallBacks ()
 register call-backs associated with command line arguments
virtual std::shared_ptr< const AbstractDSL > getDSL () const =0
virtual std::function< void()> generateGeneratedSourcesQuery (const std::string &) const
virtual std::function< void()> generateSpecificTargetGeneratedSourcesQuery (const std::string &) const
virtual std::function< void()> generateAllSpecificTargetsGeneratedSourcesQuery () const
virtual std::function< void()> generateGeneratedHeadersQuery () const
virtual std::function< void()> generateSpecificTargetsQuery () const
virtual std::function< void()> generateLibrariesDependenciesQuery () const
virtual std::function< void()> generateCppFlagsQuery () const
virtual void treatGeneratedSources ()=0
 treat the "--generated-sources" query
virtual void treatSpecificTargetGeneratedSources ()=0
 treat the "--specific-target-generated-sources" query
virtual void treatAllSpecificTargetsGeneratedSources ()=0
 treat the "--all-specific-targets-generated-sources" query
virtual void treatCppFlags ()=0
 treat the "--cppflags" query
virtual void treatGeneratedHeaders ()=0
 treat the "--generated-headers" query
virtual void treatLibrariesDependencies ()=0
 treat the "--libraries-dependencies" query
virtual void treatSpecificTargets ()=0
 treat the "--specific-targets" query
virtual void treatDSLTarget ()=0
 treat the "--dsl-target" query
Protected Member Functions inherited from tfel::utilities::ArgumentParser
virtual void treatHelp ()
 method associated with the '–help' command line argument.
virtual void treatVersion ()
 method associated with the '–version' command line argument
Protected Member Functions inherited from mfront::MFrontBase
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

Static Protected Member Functions

static void displayVariable (const mfront::VariableDescription &, const std::string &=std::string{})
 print the description of a variable

Protected Attributes

bool melt_sources = true
 optional flags stating if sources of library dependencies must be concateneted with the sources of the library
Protected Attributes inherited from tfel::utilities::ArgumentParser
CallBacksContainer callBacksContainer
 container of all the call-backs
AliasContainer alias
 container of all the alias
ArgsContainer args
 container of all the command line arguments
ArgsContainer::iterator currentArgument
 an iterator to the argument being treated
std::string programName
 program name
Protected Attributes inherited from mfront::MFrontBase
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.

Friends

struct tfel::utilities::ArgumentParserBase< QueryHandlerBase >
 ArgumentParserBase must be a friend.

Additional Inherited Members

Public Types inherited from tfel::utilities::ArgumentParserBase< QueryHandlerBase >
using MemberFuncPtr
 a simple alias
Public Types inherited from tfel::utilities::ArgumentParser
using CallBacksContainer = std::map<std::string, CallBack>
 a simple alias
Static Public Member Functions inherited from mfront::MFrontBase
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 Types inherited from tfel::utilities::ArgumentParser
using AliasContainer = std::map<std::string, std::string>
 a simple alias
using ArgsContainer = std::vector<Argument>
 a simple alias

Detailed Description

base class for queries handler

Constructor & Destructor Documentation

◆ QueryHandlerBase()

mfront::QueryHandlerBase::QueryHandlerBase ( const int ,
const char *const * const  )

default constructor

Parameters
[in]argcnumber of command line arguments
[in]argvcommand line arguments

Member Function Documentation

◆ displayVariable()

void mfront::QueryHandlerBase::displayVariable ( const mfront::VariableDescription & ,
const std::string & = std::string{} )
staticprotected

print the description of a variable

Parameters
[in]vvariable
[in]spacesstring placed in front of the description (generally spaces, hence the name)

◆ generateAllSpecificTargetsGeneratedSourcesQuery()

virtual std::function< void()> mfront::QueryHandlerBase::generateAllSpecificTargetsGeneratedSourcesQuery ( ) const
nodiscardprotectedvirtual
Returns
an object handling the --all-specific-targets-generated-sources query.

◆ generateCppFlagsQuery()

virtual std::function< void()> mfront::QueryHandlerBase::generateCppFlagsQuery ( ) const
nodiscardprotectedvirtual
Returns
an object handling the --cppflags query

◆ generateGeneratedHeadersQuery()

virtual std::function< void()> mfront::QueryHandlerBase::generateGeneratedHeadersQuery ( ) const
nodiscardprotectedvirtual
Returns
an object handling the --generated-headers query

◆ generateGeneratedSourcesQuery()

virtual std::function< void()> mfront::QueryHandlerBase::generateGeneratedSourcesQuery ( const std::string & ) const
nodiscardprotectedvirtual
Returns
an object handling the --generated-sources query
Parameters
[in]ooption passed the query

◆ generateLibrariesDependenciesQuery()

virtual std::function< void()> mfront::QueryHandlerBase::generateLibrariesDependenciesQuery ( ) const
nodiscardprotectedvirtual
Returns
an object handling the --libraries-dependencies query

◆ generateSpecificTargetGeneratedSourcesQuery()

virtual std::function< void()> mfront::QueryHandlerBase::generateSpecificTargetGeneratedSourcesQuery ( const std::string & ) const
nodiscardprotectedvirtual
Returns
an object handling the --specific-target-generated-sources query.
Parameters
[in]nname of the specific target

◆ generateSpecificTargetsQuery()

virtual std::function< void()> mfront::QueryHandlerBase::generateSpecificTargetsQuery ( ) const
nodiscardprotectedvirtual
Returns
an object handling the --specific-targets query

◆ getCurrentCommandLineArgument()

const tfel::utilities::Argument & mfront::QueryHandlerBase::getCurrentCommandLineArgument ( ) const
nodiscardfinalprotectedvirtual
Returns
the current Argument

Implements mfront::MFrontBase.

◆ getDSL()

virtual std::shared_ptr< const AbstractDSL > mfront::QueryHandlerBase::getDSL ( ) const
nodiscardprotectedpure virtual
Returns
the abstract domain specific language

Implemented in mfront::BehaviourQuery, mfront::MaterialPropertyQuery, and mfront::ModelQuery.

◆ getUsageDescription()

std::string mfront::QueryHandlerBase::getUsageDescription ( ) const
nodiscardfinalprotectedvirtual
Returns
the usage of the program being used

Implements tfel::utilities::ArgumentParser.

◆ getVersionDescription()

std::string mfront::QueryHandlerBase::getVersionDescription ( ) const
nodiscardfinalprotectedvirtual
Returns
the version of the program being used

Implements tfel::utilities::ArgumentParser.

◆ registerCommandLineCallBacks()

virtual void mfront::QueryHandlerBase::registerCommandLineCallBacks ( )
protectedvirtual

register call-backs associated with command line arguments

Reimplemented in mfront::BehaviourQuery, mfront::MaterialPropertyQuery, and mfront::ModelQuery.

◆ treatUnknownArgument()

void mfront::QueryHandlerBase::treatUnknownArgument ( )
finalprotectedvirtual

method called while parsing unregistred command line arguments.

Exceptions
runtime_error

Reimplemented from tfel::utilities::ArgumentParser.


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