Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ImportRunner Class Reference

Runs import plugins for a given file and component. More...

#include <ImportRunner.h>

Inheritance diagram for ImportRunner:

Signals

void noticeMessage (QString const &message)
 Emitted to notice user.
 

Public Member Functions

 ImportRunner (QSharedPointer< ComponentParameterFinder > parameterFinder, QTabWidget *displayTabs, QObject *parent)
 
virtual ~ImportRunner ()=default
 The destructor.
 
QStringList constructComponentDataFromFile (QString const &filePath, QString const &componentXMLPath, QSharedPointer< const Component > targetComponent)
 
QStringList importFileTypes () const
 
void loadPlugins (PluginManager const &pluginManager)
 
QSharedPointer< Component > run (QString const &componentName, QString const &filePath, QString const &componentXmlPath, QSharedPointer< const Component > targetComponent)
 
void setExpressionParser (QSharedPointer< ExpressionParser > parser)
 

Detailed Description

Runs import plugins for a given file and component.

Definition at line 37 of file ImportRunner.h.

Constructor & Destructor Documentation

◆ ImportRunner()

ImportRunner::ImportRunner ( QSharedPointer< ComponentParameterFinder > parameterFinder,
QTabWidget * displayTabs,
QObject * parent )

The constructor.

Parameters
[in]parameterFinderPointer to the parameter finder.
[in]displayTabsThe container widget for read and displayed source files.
[in]parentPointer to the owner of this runner.

◆ ~ImportRunner()

virtual ImportRunner::~ImportRunner ( )
virtualdefault

The destructor.

Member Function Documentation

◆ constructComponentDataFromFile()

QStringList ImportRunner::constructComponentDataFromFile ( QString const & filePath,
QString const & componentXMLPath,
QSharedPointer< const Component > targetComponent )

Locates component declarations from the selected file.

Parameters
[in]filePathPath to the selected file.
[in]componentXMLPathPath to the target component XML file.
[in]targetComponentTarget component to which import all parsed elements.
Returns
List of component declarations found in the selected file.

◆ importFileTypes()

QStringList ImportRunner::importFileTypes ( ) const

Gets all file types for which a import parser(s) can be run.

Returns
List of possible file types.

◆ loadPlugins()

void ImportRunner::loadPlugins ( PluginManager const & pluginManager)

Loads all available import plugins.

Parameters
[in]pluginManagerThe plugin manager owning all the plugins.

◆ noticeMessage

void ImportRunner::noticeMessage ( QString const & message)
signal

Emitted to notice user.

◆ run()

QSharedPointer< Component > ImportRunner::run ( QString const & componentName,
QString const & filePath,
QString const & componentXmlPath,
QSharedPointer< const Component > targetComponent )

Runs all import plugins with matching file types for a given file and component.

Parameters
[in]componentNameName of thes selected component.
[in]filePathThe relative path to the input file.
[in]componentXmlPathThe path to the target component XML file.
[in]targetComponentThe target component to which import all parsed elements.
Returns
The component with all the imported elements.

◆ setExpressionParser()

void ImportRunner::setExpressionParser ( QSharedPointer< ExpressionParser > parser)

Sets the expression parser to be used by all importers.

Parameters
[in]parserThe parser to use.

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