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

Interface for editing resets. More...

#include <ResetInterface.h>

Inheritance diagram for ResetInterface:
ParameterizableInterface CommonInterface

Public Member Functions

 ResetInterface (QSharedPointer< FieldValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter)
 
virtual ~ResetInterface ()=default
 
void addReset (int const &row)
 
int getAllReferencesToIdInIndex (int const &itemIndex, std::string const &valueID) const
 
virtual int getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const override final
 
virtual std::vector< std::string > getItemNames () const
 
std::string getResetMaskExpression (int const &resetIndex) const
 
std::string getResetMaskFormattedExpression (int const &resetIndex) const
 
std::string getResetMaskValue (int const &resetIndex, int const &baseNumber=0) const
 
std::string getResetTypeReference (int const &itemIndex) const
 
std::string getResetValue (int const &resetIndex, int const &baseNumber=0) const
 
std::string getResetValueExpression (int const &resetIndex) const
 
std::string getResetValueFormattedExpression (int const &resetIndex) const
 
bool hasValidResetMask (int const &resetIndex) const
 
bool hasValidResetType (int const &resetIndex) const
 
bool hasValidResetValue (int const &resetIndex) const
 
virtual int itemCount () const override final
 
bool removeReset (int const &resetIndex)
 
bool setResetMask (int const &resetIndex, std::string const &newResetMask)
 
void setResets (QSharedPointer< Field > containingField)
 
bool setResetTypeReference (int const &resetIndex, std::string const &newResetType)
 
bool setResetValue (int const &resetIndex, std::string const &newResetValue)
 
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 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 resets.

Definition at line 27 of file ResetInterface.h.

Constructor & Destructor Documentation

◆ ResetInterface()

ResetInterface::ResetInterface ( QSharedPointer< FieldValidator > validator,
QSharedPointer< ExpressionParser > expressionParser,
QSharedPointer< ExpressionFormatter > expressionFormatter )

The constructor.

Parameters
[in]validatorValidator for fields.
[in]expressionParserParser for expressions.
[in]expressionFormatterFormatter for expressions.

◆ ~ResetInterface()

virtual ResetInterface::~ResetInterface ( )
virtualdefault

The destructor.

Member Function Documentation

◆ addReset()

void ResetInterface::addReset ( int const & row)

Add a new reset.

Parameters
[in]rowRow of the new reset.

◆ getAllReferencesToIdInIndex()

int ResetInterface::getAllReferencesToIdInIndex ( int const & itemIndex,
std::string const & valueID ) const

Get all the references made to the selected ID in the selected reset.

Parameters
[in]itemIndexIndex of the selected reset.
[in]valueIDThe selected ID.
Returns
Number of references made to the selected ID in the selected reset.

◆ getAllReferencesToIdInItem()

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

Get all the references made to the selected ID in the selected reset.

Parameters
[in]itemNameThe reset type reference of the selected reset.
[in]valueIDThe selected ID.
Returns
Number of references made to the selected ID in the selected reset.

Implements ParameterizableInterface.

◆ getItemNames()

virtual std::vector< std::string > ResetInterface::getItemNames ( ) const
virtual

Get the names of the available items.

Returns
Names of the available items.

Implements CommonInterface.

◆ getResetMaskExpression()

std::string ResetInterface::getResetMaskExpression ( int const & resetIndex) const

Get the reset mask expression of the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
Returns
Reset mask expression of the selected reset.

◆ getResetMaskFormattedExpression()

std::string ResetInterface::getResetMaskFormattedExpression ( int const & resetIndex) const

Get the formatted reset mask expression of the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
Returns
Formatted reset mask expression of the selected reset.

◆ getResetMaskValue()

std::string ResetInterface::getResetMaskValue ( int const & resetIndex,
int const & baseNumber = 0 ) const

Get the calculated reset mask value of the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
[in]baseNumberBase for displaying the value.
Returns
Calculated reset mask value of the selected port.

◆ getResetTypeReference()

std::string ResetInterface::getResetTypeReference ( int const & itemIndex) const

Get the reset type reference of the selected reset.

Parameters
[in]itemIndexIndex of the selected reset.
Returns
Reset type reference of the selected reset.

◆ getResetValue()

std::string ResetInterface::getResetValue ( int const & resetIndex,
int const & baseNumber = 0 ) const

Get the calculated reset value of the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
[in]baseNumberBase for displaying the value.
Returns
Calculated reset value of the selected port.

◆ getResetValueExpression()

std::string ResetInterface::getResetValueExpression ( int const & resetIndex) const

Get the reset value expression of the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
Returns
Reset value expression of the selected reset.

◆ getResetValueFormattedExpression()

std::string ResetInterface::getResetValueFormattedExpression ( int const & resetIndex) const

Get the formatted reset value expression of the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
Returns
Formatted reset value expression of the selected reset.

◆ hasValidResetMask()

bool ResetInterface::hasValidResetMask ( int const & resetIndex) const

Check if the reset mask of the selected reset is valid.

Parameters
[in]resetIndexIndex of the selected reset.
Returns
True, if the selected reset mask is valid, false otherwise.

◆ hasValidResetType()

bool ResetInterface::hasValidResetType ( int const & resetIndex) const

Check if the reset type reference of the selected reset is valid.

Parameters
[in]resetIndexIndex of the selected reset.
Returns
True, if the selected reset type reference is valid, false otherwise.

◆ hasValidResetValue()

bool ResetInterface::hasValidResetValue ( int const & resetIndex) const

Check if the reset value of the selected reset is valid.

Parameters
[in]resetIndexIndex of the selected reset.
Returns
True, if the selected reset value is valid, false otherwise.

◆ itemCount()

virtual int ResetInterface::itemCount ( ) const
finaloverridevirtual

Get the number of available items.

Returns
Number of available items.

Implements CommonInterface.

◆ removeReset()

bool ResetInterface::removeReset ( int const & resetIndex)

Remove the selected reset.

Parameters
[in]resetNameName of the selected reset.
Returns
True, if successful, false otherwise.

◆ setResetMask()

bool ResetInterface::setResetMask ( int const & resetIndex,
std::string const & newResetMask )

Set a new reset mask for the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
[in]newResetMaskNew reset mask.
Returns
True, if successful, false otherwise.

◆ setResets()

void ResetInterface::setResets ( QSharedPointer< Field > containingField)

Set available resets.

Parameters
[in]containingFieldField containing the resets.

◆ setResetTypeReference()

bool ResetInterface::setResetTypeReference ( int const & resetIndex,
std::string const & newResetType )

Set the reset type reference for the selected reset.

Parameters
[in]resetIndexIndex of the selected reset.
[in]newResetTypeThe new reset type reference.
Returns
True, if successful, false otherwise.

◆ setResetValue()

bool ResetInterface::setResetValue ( int const & resetIndex,
std::string const & newResetValue )

Set a new reset value for the selected reset type.

Parameters
[in]resetIndexIndex of the selected reset.
[in]newResetValueNew reset value.
Returns
True, if successful, false otherwise.

◆ validateItems()

virtual bool ResetInterface::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: