Interface for editing resets.
More...
#include <ResetInterface.h>
|
| 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 |
|
| ParameterizableInterface (const ParameterizableInterface &other)=delete |
| No copying. No assignment.
|
|
| ParameterizableInterface (QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter) |
|
virtual | ~ParameterizableInterface ()=default |
|
ParameterizableInterface & | operator= (const ParameterizableInterface &other)=delete |
|
| CommonInterface ()=default |
|
| CommonInterface (const CommonInterface &other)=delete |
| No copying. No assignment.
|
|
virtual | ~CommonInterface ()=default |
|
CommonInterface & | operator= (const CommonInterface &other)=delete |
|
Interface for editing resets.
Definition at line 27 of file ResetInterface.h.
◆ ResetInterface()
ResetInterface::ResetInterface |
( |
QSharedPointer< FieldValidator > | validator, |
|
|
QSharedPointer< ExpressionParser > | expressionParser, |
|
|
QSharedPointer< ExpressionFormatter > | expressionFormatter ) |
The constructor.
- Parameters
-
[in] | validator | Validator for fields. |
[in] | expressionParser | Parser for expressions. |
[in] | expressionFormatter | Formatter for expressions. |
◆ ~ResetInterface()
virtual ResetInterface::~ResetInterface |
( |
| ) |
|
|
virtualdefault |
◆ addReset()
void ResetInterface::addReset |
( |
int const & | row | ) |
|
Add a new reset.
- Parameters
-
[in] | row | Row 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] | itemIndex | Index of the selected reset. |
[in] | valueID | The 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] | itemName | The reset type reference of the selected reset. |
[in] | valueID | The 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] | resetIndex | Index 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] | resetIndex | Index 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] | resetIndex | Index of the selected reset. |
[in] | baseNumber | Base 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] | itemIndex | Index 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] | resetIndex | Index of the selected reset. |
[in] | baseNumber | Base 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] | resetIndex | Index 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] | resetIndex | Index 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] | resetIndex | Index 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] | resetIndex | Index 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] | resetIndex | Index 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] | resetName | Name 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] | resetIndex | Index of the selected reset. |
[in] | newResetMask | New reset mask. |
- Returns
- True, if successful, false otherwise.
◆ setResets()
void ResetInterface::setResets |
( |
QSharedPointer< Field > | containingField | ) |
|
Set available resets.
- Parameters
-
[in] | containingField | Field 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] | resetIndex | Index of the selected reset. |
[in] | newResetType | The 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] | resetIndex | Index of the selected reset. |
[in] | newResetValue | New 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: