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

Interface for editing filesets. More...

#include <FileSetInterface.h>

Inheritance diagram for FileSetInterface:
ParameterizableInterface NameGroupInterface CommonInterface

Public Member Functions

 FileSetInterface (QSharedPointer< FileSetValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, FileInterface *fileInterface, FileBuilderInterface *fileBuilderInterface)
 
virtual ~FileSetInterface ()=default
 
void addFileSet (int const &row, std::string const &newFileSetName=std::string(""))
 
void addFileSet (std::string const &newFileSetName=std::string(""))
 
bool fileSetExists (std::string const &fileSetName) const
 
virtual int getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const override final
 
std::vector< std::string > getDependencies (std::string const &fileSetName) const
 
std::vector< std::string > getExpressionsInSelectedFileSets (std::vector< std::string > fileSetNames) const
 
FileBuilderInterfacegetFileBuilderInterface () const
 
FileInterfacegetFileInterface () const
 
std::vector< std::string > getGroups (std::string const &fileSetName) const
 
std::string getIndexedItemName (int itemIndex) const final
 
virtual int getItemIndex (std::string const &itemName) const override final
 
virtual std::vector< std::string > getItemNames () const override final
 
virtual int itemCount () const override final
 
virtual bool itemHasValidName (std::string const &itemName) const override final
 
bool removeFileSet (std::string const &fileSetName)
 
bool setDependencies (std::string const &fileSetName, std::vector< std::string > const &newDependencies)
 
void setFileSets (QSharedPointer< QList< QSharedPointer< FileSet > > > newFileSets)
 
bool setGroups (std::string const &fileSetName, std::vector< std::string > const &newGroups)
 
virtual bool setName (std::string const &currentName, std::string const &newName) override final
 
virtual bool validateItems () const override final
 
- Public Member Functions inherited from ParameterizableInterface
 ParameterizableInterface (const ParameterizableInterface &other)=delete
 No copying. No assignment.
 
 ParameterizableInterface (QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter)
 
virtual ~ParameterizableInterface ()=default
 
ParameterizableInterfaceoperator= (const ParameterizableInterface &other)=delete
 
- Public Member Functions inherited from NameGroupInterface
 NameGroupInterface ()
 
 NameGroupInterface (const NameGroupInterface &other)=delete
 No copying. No assignment.
 
virtual ~NameGroupInterface ()=default
 
virtual std::string getDescription (std::string const &itemName) const
 
virtual std::string getDisplayName (std::string const &itemName) const
 
virtual std::string getShortDescription (std::string const &itemName) const
 
NameGroupInterfaceoperator= (const NameGroupInterface &other)=delete
 
virtual bool setDescription (std::string const &itemName, std::string const &newDescription)
 
virtual bool setDisplayName (std::string const &itemName, std::string const &newDisplayName) const
 
bool setShortDescription (std::string const &itemName, std::string const &newShortDescription) const
 
- Public Member Functions inherited from CommonInterface
 CommonInterface ()=default
 
 CommonInterface (const CommonInterface &other)=delete
 No copying. No assignment.
 
virtual ~CommonInterface ()=default
 
CommonInterfaceoperator= (const CommonInterface &other)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from ParameterizableInterface
QString formattedValueFor (QString const &expression) const
 
QString parseExpressionToBaseNumber (QString const &expression, unsigned int const &baseNumber, bool *expressionIsValid=nullptr) const
 
QString parseExpressionToDecimal (QString const &expression, bool *expressionIsValid=nullptr) const
 
- Protected Member Functions inherited from CommonInterface
QString getUniqueName (std::string const &newName, std::string const &itemTypeName) const
 
bool nameHasChanged (std::string const &newName, std::string const &oldName) const
 

Detailed Description

Interface for editing filesets.

Definition at line 32 of file FileSetInterface.h.

Constructor & Destructor Documentation

◆ FileSetInterface()

FileSetInterface::FileSetInterface ( QSharedPointer< FileSetValidator > validator,
QSharedPointer< ExpressionParser > expressionParser,
QSharedPointer< ExpressionFormatter > expressionFormatter,
FileInterface * fileInterface,
FileBuilderInterface * fileBuilderInterface )

The constructor.

Parameters
[in]validatorValidator for files.
[in]expressionParserParser for expressions.
[in]expressionFormatterFormatter for expressions.
[in]fileInterfaceSub interface for files.
[in]fileBuilderInterfaceSub interface for file builders.

◆ ~FileSetInterface()

virtual FileSetInterface::~FileSetInterface ( )
virtualdefault

The destructor.

Member Function Documentation

◆ addFileSet() [1/2]

void FileSetInterface::addFileSet ( int const & row,
std::string const & newFileSetName = std::string("") )

Add a new file set, inserting it to a specified position given by row.

Parameters
[in]rowRow of the new file set.
[in]newFileSetNameName of the new file set.

◆ addFileSet() [2/2]

void FileSetInterface::addFileSet ( std::string const & newFileSetName = std::string(""))

Add a new file set. This overload should be preferred when using Python.

Parameters
[in]newFileSetNameName of the new file set.

◆ fileSetExists()

bool FileSetInterface::fileSetExists ( std::string const & fileSetName) const

Check if the selected file set exists.

Parameters
[in]fileSetNameName of the selected file set.
Returns
True, if the file set exists, false otherwise.

◆ getAllReferencesToIdInItem()

virtual int FileSetInterface::getAllReferencesToIdInItem ( const std::string & itemName,
std::string const & valueID ) const
finaloverridevirtual

Calculate all the references to the selected ID in the selected item.

Parameters
[in]itemNameName of the selected item.
[in]valueIDThe selected ID.
Returns
Number of references to the selected ID in the selected item.

Implements ParameterizableInterface.

◆ getDependencies()

std::vector< std::string > FileSetInterface::getDependencies ( std::string const & fileSetName) const

Get the dependencies of the selected file set.

Parameters
[in]fileSetNameName of the selected file set.
Returns
Dependencies of the selected file set.

◆ getExpressionsInSelectedFileSets()

std::vector< std::string > FileSetInterface::getExpressionsInSelectedFileSets ( std::vector< std::string > fileSetNames) const

Get the expressions in the selected file sets.

Parameters
[in]fileSetNamesNames of the selected file sets.
Returns
The expressions of the selected file sets.

◆ getFileBuilderInterface()

FileBuilderInterface * FileSetInterface::getFileBuilderInterface ( ) const

Get the interface for accessing file builders.

Returns
Interface for accessing file builders.

◆ getFileInterface()

FileInterface * FileSetInterface::getFileInterface ( ) const

Get the interface for accessing files.

Returns
Interface for accessing files.

◆ getGroups()

std::vector< std::string > FileSetInterface::getGroups ( std::string const & fileSetName) const

Get the groups of the selected file set.

Parameters
[in]fileSetNameName of the selected file set.
Returns
Groups of the selected file set.

◆ getIndexedItemName()

std::string FileSetInterface::getIndexedItemName ( int itemIndex) const
finalvirtual

Get name of the indexed item.

Parameters
[in]itemIndexIndex of the selected item.
Returns
Name of the selected item.

Implements NameGroupInterface.

◆ getItemIndex()

virtual int FileSetInterface::getItemIndex ( std::string const & itemName) const
finaloverridevirtual

Get index of the selected item.

Parameters
[in]itemNameName of the selected item.
Returns
Index of the selected item.

Implements NameGroupInterface.

◆ getItemNames()

virtual std::vector< std::string > FileSetInterface::getItemNames ( ) const
finaloverridevirtual

Get the names of the available items.

Returns
Names of the available items.

Implements CommonInterface.

◆ itemCount()

virtual int FileSetInterface::itemCount ( ) const
finaloverridevirtual

Get the number of available items.

Returns
Number of available items.

Implements CommonInterface.

◆ itemHasValidName()

virtual bool FileSetInterface::itemHasValidName ( std::string const & itemName) const
finaloverridevirtual

Check if the selected item has a valid name.

Parameters
[in]itemNameName of the selected item.
Returns
True, if the name is valid, false otherwise.

Implements NameGroupInterface.

◆ removeFileSet()

bool FileSetInterface::removeFileSet ( std::string const & fileSetName)

Remove the selected file set.

Parameters
[in]fileSetNameName of the selected file set.
Returns
True, if successful, false otherwise.

◆ setDependencies()

bool FileSetInterface::setDependencies ( std::string const & fileSetName,
std::vector< std::string > const & newDependencies )

Set new dependencies for the selected item.

Parameters
[in]fileSetNameName of the selected file set.
[in]newDependenciesThe new dependencies.
Returns
True, if successful, false otherwise.

◆ setFileSets()

void FileSetInterface::setFileSets ( QSharedPointer< QList< QSharedPointer< FileSet > > > newFileSets)

Set available file sets.

Parameters
[in]newFileSetsThe new file sets.

◆ setGroups()

bool FileSetInterface::setGroups ( std::string const & fileSetName,
std::vector< std::string > const & newGroups )

Set new groups for the selected item.

Parameters
[in]fileSetNameName of the selected file set.
[in]newGroupsThe new groups.
Returns
True, if successful, false otherwise.

◆ setName()

virtual bool FileSetInterface::setName ( std::string const & currentName,
std::string const & newName )
finaloverridevirtual

Set a new name for the selected item.

Parameters
[in]currentNameName of the selected item.
[in]newNameNew name for the item.
Returns
True, if successful, false otherwise.

Implements NameGroupInterface.

◆ validateItems()

virtual bool FileSetInterface::validateItems ( ) const
finaloverridevirtual

Validates the contained items.

Returns
True, if all the ports are valid, false otherwise.

Implements CommonInterface.


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