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

Interface for editing fields. More...

#include <FieldInterface.h>

Inheritance diagram for FieldInterface:
ParameterizableInterface NameGroupInterface CommonInterface

Public Member Functions

 FieldInterface (QSharedPointer< FieldValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, ResetInterface *subInterface)
 
virtual ~FieldInterface ()=default
 
void addField (int const &row, std::string const &newFieldName=std::string(""))
 
void addField (std::string const &newFieldName=std::string(""))
 
bool addFieldAccessPolicy (std::string const &fieldName)
 
void copyFieldAccessPolicies (std::string const &fieldName, std::vector< int > const &selectedAccessPolicies)
 
void copyRows (std::vector< int > const &selectedRows)
 
int getAccessPolicyCount (std::string const &fieldName) const
 
std::string getAccessString (std::string const &fieldName, int accessPolicyIndex=-1) const
 
AccessTypes::Access getAccessType (std::string const &fieldName, int accessPolicyIndex=-1) const
 
int getAllReferencesToIdInFieldAccessPolicy (std::string const &fieldName, int accessPolicyIndex, std::string const &valueID) const
 
virtual int getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const override final
 
std::vector< std::string > getExpressionsInSelectedFields (std::vector< std::string > const &fieldNames) const
 
std::string getID (std::string const &fieldName)
 
std::string getIndexedItemName (int itemIndex) const final
 
std::string getIsPresentExpression (std::string const &fieldName) const
 
std::string getIsPresentFormattedExpression (std::string const &fieldName) const
 
std::string getIsPresentValue (std::string const &fieldName, int const &baseNumber=0) const
 
virtual int getItemIndex (std::string const &itemName) const override final
 
virtual std::vector< std::string > getItemNames () const override final
 
ModeReferenceInterfacegetModeReferenceInterface () const
 
std::vector< std::pair< unsigned int, std::string > > getModeReferences (std::string const &fieldName, int accessPolicyIndex) const
 
std::vector< std::pair< unsigned int, std::string > > getModeReferencesInUse (std::string const &fieldName, int accessPolicyIndex) const
 
std::vector< std::pair< std::string, unsigned int > > getModeRefs (std::string const &fieldName, int accessPolicyIndex) const
 
std::string getModifiedWriteString (std::string const &fieldName, int accessPolicyIndex=-1) const
 
General::ModifiedWrite getModifiedWriteValue (std::string const &fieldName) const
 
std::string getOffsetExpression (std::string const &fieldName) const
 
std::string getOffsetFormattedExpression (std::string const &fieldName) const
 
std::string getOffsetValue (std::string const &fieldName, int const &baseNumber=0) const
 
int getPasteRowCount () const
 
General::ReadAction getReadAction (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getReadActionString (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getReadResponseExpression (std::string const &fieldName, int accessPolicyIndex) const
 
std::string getReadResponseFormattedExpression (std::string const &fieldName, int accessPolicyIndex) const
 
std::string getReadResponseValue (std::string const &fieldName, int accessPolicyIndex, int baseNumber=0) const
 
std::string getReservedExpression (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getReservedFormattedExpression (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getReservedValue (std::string const &fieldName, int accessPolicyIndex=-1, int const &baseNumber=0) const
 
std::string getResets (std::string const &fieldName) const
 
std::string getResetsToolTip (std::string const &fieldName) const
 
ResetInterfacegetSubInterface () const
 
bool getTestableBool (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getTestableValue (std::string const &fieldName, int accessPolicyIndex=-1) const
 
General::TestConstraint getTestConstraint (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getTestConstraintString (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getVolatile (std::string const &fieldName) const
 
std::string getWidthExpression (std::string const &fieldName) const
 
std::string getWidthFormattedExpression (std::string const &fieldName) const
 
std::string getWidthValue (std::string const &fieldName, int const &baseNumber=0) const
 
std::string getWriteConstraint (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getWriteConstraintMaximumExpression (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getWriteConstraintMaximumFormattedExpression (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getWriteConstraintMaximumValue (std::string const &fieldName, int accessPolicyIndex=-1, int const &baseNumber=0) const
 
std::string getWriteConstraintMinimumExpression (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getWriteConstraintMinimumFormattedExpression (std::string const &fieldName, int accessPolicyIndex=-1) const
 
std::string getWriteConstraintMinimumValue (std::string const &fieldName, int accessPolicyIndex=-1, int const &baseNumber=0) const
 
bool hasValidAccess (std::string const &fieldName, int accessPolicyIndex=-1) const
 
bool hasValidAccessPolicyModeRefs (std::string const &fieldName, int accessPolicyIndex) const
 
bool hasValidIsPresent (std::string const &fieldName) const
 
bool hasValidOffset (std::string const &fieldName) const
 
bool hasValidReadResponse (std::string const &fieldName, int accessPolicyIndex) const
 
bool hasValidReserved (std::string const &fieldName, int accessPolicyIndex) const
 
bool hasValidResets (std::string const &fieldName) const
 
bool hasValidWidth (std::string const &fieldName) const
 
bool hasValidWriteValueConstraint (std::string const &fieldName, int accessPolicyIndex) const
 
bool hasWriteConstraint (std::string const &fieldName) const
 
virtual int itemCount () const override final
 
virtual bool itemHasValidName (std::string const &itemName) const override final
 
int pasteFieldaccessPolicies (std::string const &fieldName)
 
std::vector< std::string > pasteRows ()
 
bool removeField (std::string const &fieldName)
 
bool removeFieldAccessPolicy (std::string const &fieldName, int accessPolicyIndex)
 
bool setAccess (std::string const &fieldName, std::string const &accessType, int accessPolicyIndex=-1) const
 
void setFields (QSharedPointer< QList< QSharedPointer< Field > > > newFields)
 
bool setID (std::string const &fieldName, std::string const &newID)
 
bool setIsPresent (std::string const &fieldName, std::string const &newIsPresent)
 
void setModeReferenceInterface (ModeReferenceInterface *modeRefInterface)
 
bool setModeReferences (std::string const &fieldName, int accessPolicyIndex, std::vector< std::pair< unsigned int, std::string > > const &newModeRefs)
 
bool setModifiedWrite (std::string const &fieldName, std::string const &newModifiedWrite, int accessPolicyIndex=-1)
 
virtual bool setName (std::string const &currentName, std::string const &newName) override final
 
bool setOffset (std::string const &fieldName, std::string const &newOffset)
 
bool setReadAction (std::string const &fieldName, std::string const &newReadAction, int accessPolicyIndex=-1)
 
bool setReadResponse (std::string const &fieldName, int accessPolicyIndex, std::string const &newReadResponse) const
 
bool setReserved (std::string const &fieldName, std::string const &newReserved, int accessPolicyIndex=-1)
 
bool setTestable (std::string const &fieldName, std::string const &newTestable, int accessPolicyIndex=-1) const
 
bool setTestConstraint (std::string const &fieldName, std::string const &newTestConstraint, int accessPolicyIndex=-1) const
 
bool setVolatile (std::string const &fieldName, std::string const &newVolatile)
 
bool setWidth (std::string const &fieldName, std::string const &newWidth)
 
bool setWriteConstraint (std::string const &fieldName, std::string const &newConstraintText, int accessPolicyIndex=-1)
 
bool setWriteConstraintMaximum (std::string const &fieldName, std::string const &newWriteConstraintMaximum, int accessPolicyIndex=-1)
 
bool setWriteConstraintMinimum (std::string const &fieldName, std::string const &newWriteConstraintMinimum, int accessPolicyIndex=-1)
 
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 fields.

Definition at line 38 of file FieldInterface.h.

Constructor & Destructor Documentation

◆ FieldInterface()

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

The constructor.

Parameters
[in]validatorValidator for fields.
[in]expressionParserParser for expressions.
[in]expressionFormatterFormatter for expressions.
[in]subInterfaceInterface for accessing resets.

◆ ~FieldInterface()

virtual FieldInterface::~FieldInterface ( )
virtualdefault

The destructor.

Member Function Documentation

◆ addField() [1/2]

void FieldInterface::addField ( int const & row,
std::string const & newFieldName = std::string("") )

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

Parameters
[in]rowRow of the new field.
[in]newFieldNameName of the new field.

◆ addField() [2/2]

void FieldInterface::addField ( std::string const & newFieldName = std::string(""))

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

Parameters
[in]newFieldNameName of the new field.

◆ addFieldAccessPolicy()

bool FieldInterface::addFieldAccessPolicy ( std::string const & fieldName)

Add a new field access policy to a selected field.

Parameters
[in]fieldNameThe field to add a new access policy to.
Returns
True, if successful, otherwise false.

◆ copyFieldAccessPolicies()

void FieldInterface::copyFieldAccessPolicies ( std::string const & fieldName,
std::vector< int > const & selectedAccessPolicies )

Copy selected field access policies to clipboard.

Parameters
[in]fieldNameThe field containing the access policies.
[in]selectedAccessPoliciesList containing the indices of the selected access policies.

◆ copyRows()

void FieldInterface::copyRows ( std::vector< int > const & selectedRows)

Copy the selected fields.

Parameters
[in]selectedRowsIndexes of the selected fields.

◆ getAccessPolicyCount()

int FieldInterface::getAccessPolicyCount ( std::string const & fieldName) const

Get the access policy count of the given field.

Parameters
[in]fieldNameDescription
Returns
The number of field access policies in the given field.

◆ getAccessString()

std::string FieldInterface::getAccessString ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the access string of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
Access string of the selected field or field access policy.

◆ getAccessType()

AccessTypes::Access FieldInterface::getAccessType ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the access of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
Access of the selected field or field access policy.

◆ getAllReferencesToIdInFieldAccessPolicy()

int FieldInterface::getAllReferencesToIdInFieldAccessPolicy ( std::string const & fieldName,
int accessPolicyIndex,
std::string const & valueID ) const

Get the number of references to a parameter used in the different sub-elements of the field access policy.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexIndex of the field access policy.
[in]valueIDThe parameter (ID) to check.
Returns
The number of references to a parameter used within the field access policy.

◆ getAllReferencesToIdInItem()

virtual int FieldInterface::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.

◆ getExpressionsInSelectedFields()

std::vector< std::string > FieldInterface::getExpressionsInSelectedFields ( std::vector< std::string > const & fieldNames) const

Get the expressions in the selected fields.

Parameters
[in]fieldNamesNames of the selected fields.
Returns
The expressions of the selected fields.

◆ getID()

std::string FieldInterface::getID ( std::string const & fieldName)

Get the ID of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
ID of the selected field.

◆ getIndexedItemName()

std::string FieldInterface::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.

◆ getIsPresentExpression()

std::string FieldInterface::getIsPresentExpression ( std::string const & fieldName) const

Get the is present expression of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Is present expression of the selected parameter.

◆ getIsPresentFormattedExpression()

std::string FieldInterface::getIsPresentFormattedExpression ( std::string const & fieldName) const

Get the formatted is present expression of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Formatted is present expression of the selected field.

◆ getIsPresentValue()

std::string FieldInterface::getIsPresentValue ( std::string const & fieldName,
int const & baseNumber = 0 ) const

Get the calculated is present value of the selected field.

Parameters
[in]fieldNameName of the selected field.
[in]baseNumberBase for displaying the value.
Returns
Calculated is present value of the selected field.

◆ getItemIndex()

virtual int FieldInterface::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 > FieldInterface::getItemNames ( ) const
finaloverridevirtual

Get the names of the available items.

Returns
Names of the available items.

Implements CommonInterface.

◆ getModeReferenceInterface()

ModeReferenceInterface * FieldInterface::getModeReferenceInterface ( ) const

Get the mode reference interface in use.

@return The mode reference interface.

◆ getModeReferences()

std::vector< std::pair< unsigned int, std::string > > FieldInterface::getModeReferences ( std::string const & fieldName,
int accessPolicyIndex ) const

Get mode references of given field access policy.

Parameters
[in]fieldNameThe name of the field, which contains the field access policy.
[in]accessPolicyIndexIndex of the field access policy whose mode references to get.
Returns
The mode references of the field access policy.

◆ getModeReferencesInUse()

std::vector< std::pair< unsigned int, std::string > > FieldInterface::getModeReferencesInUse ( std::string const & fieldName,
int accessPolicyIndex ) const

Get all mode references of field access policies except for the one given by index.

Parameters
[in]fieldNameThe field containing the field access policies.
[in]accessPolicyIndexThe index of the access policy whose mode references are not to get.
Returns
All mode references, except for mode references of field access policy given by index.

◆ getModeRefs()

std::vector< std::pair< std::string, unsigned int > > FieldInterface::getModeRefs ( std::string const & fieldName,
int accessPolicyIndex ) const

Get the mode references of a given field access policy.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexIndex of the field access policy.
Returns
A vector containing the mode references as a string-int pair.

◆ getModifiedWriteString()

std::string FieldInterface::getModifiedWriteString ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the modified write value string of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
Modified write value string of the selected field or field access policy.

◆ getModifiedWriteValue()

General::ModifiedWrite FieldInterface::getModifiedWriteValue ( std::string const & fieldName) const

Get the modified write value of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Modified write value of the selected field.

◆ getOffsetExpression()

std::string FieldInterface::getOffsetExpression ( std::string const & fieldName) const

Get the offset expression of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Offset expression of the selected field.

◆ getOffsetFormattedExpression()

std::string FieldInterface::getOffsetFormattedExpression ( std::string const & fieldName) const

Get the formatted offset expression of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Formatted offset expression of the selected field.

◆ getOffsetValue()

std::string FieldInterface::getOffsetValue ( std::string const & fieldName,
int const & baseNumber = 0 ) const

Get the calculated offset value of the selected field.

Parameters
[in]fieldNameName of the selected field.
[in]baseNumberBase for displaying the value.
Returns
Calculated offset value of the selected field.

◆ getPasteRowCount()

int FieldInterface::getPasteRowCount ( ) const

Get the number of pasted fields.

Returns
Number of the pasted fields.

◆ getReadAction()

General::ReadAction FieldInterface::getReadAction ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the read action of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field.
Returns
Read action of the selected field or field access policy.

◆ getReadActionString()

std::string FieldInterface::getReadActionString ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the read action string of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
Read action string of the selected field access policy of selected field.

◆ getReadResponseExpression()

std::string FieldInterface::getReadResponseExpression ( std::string const & fieldName,
int accessPolicyIndex ) const

Get the read response of a field access policy as an expression.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexIndex of the field access policy.
Returns
The read response as an expression.

◆ getReadResponseFormattedExpression()

std::string FieldInterface::getReadResponseFormattedExpression ( std::string const & fieldName,
int accessPolicyIndex ) const

Get the read response of a field access policy as a formatted expression.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexIndex of the field access policy.
Returns
The read response as a formatted expression.

◆ getReadResponseValue()

std::string FieldInterface::getReadResponseValue ( std::string const & fieldName,
int accessPolicyIndex,
int baseNumber = 0 ) const

Get the evaluated read response value of a field access policy.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexIndex of the field access policy.
[in]baseNumberBase for displaying the value.
Returns
The evaluated read response.

◆ getReservedExpression()

std::string FieldInterface::getReservedExpression ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the reserved expression of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Reserved expression of the selected parameter.

◆ getReservedFormattedExpression()

std::string FieldInterface::getReservedFormattedExpression ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the formatted reserved expression of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Formatted reserved expression of the selected field or field access policy.

◆ getReservedValue()

std::string FieldInterface::getReservedValue ( std::string const & fieldName,
int accessPolicyIndex = -1,
int const & baseNumber = 0 ) const

Get the calculated reserved value of the selected field or field access policy, which can be specified by index, for getting the reserved value from a field access policy of a 2022 standard compliant field.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe selected access policy index.
[in]baseNumberBase for displaying the value.
Returns
Calculated reserved value of the selected field.

◆ getResets()

std::string FieldInterface::getResets ( std::string const & fieldName) const

Get the reset values of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Reset values of the selected field.

◆ getResetsToolTip()

std::string FieldInterface::getResetsToolTip ( std::string const & fieldName) const

Get the tooltip of the reset values of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Tooltip constructed from the reset values of the selected field.

◆ getSubInterface()

ResetInterface * FieldInterface::getSubInterface ( ) const

Get the sub interface.

Returns
Interface for accessing resets.

◆ getTestableBool()

bool FieldInterface::getTestableBool ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the testable bool of the selected field or field access policy. Access policy index is provided only when getting the testable value of a field access policy within a 2022 std revision field.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Testable bool of the selected field.

◆ getTestableValue()

std::string FieldInterface::getTestableValue ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the testable string of the selected field access policy of a selected field.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
Testable string of the selected field access policy.

◆ getTestConstraint()

General::TestConstraint FieldInterface::getTestConstraint ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the test constraint of the selected field or field access policy. Access policy index is provided only when getting the test constraint of a field access policy within a 2022 std revision field.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Test constraint of the selected field.

◆ getTestConstraintString()

std::string FieldInterface::getTestConstraintString ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the test constraint string of the selected field. Access policy index is provided only when getting the test constraint of a field access policy within a 2022 std revision field.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Test constraint string of the selected field.

◆ getVolatile()

std::string FieldInterface::getVolatile ( std::string const & fieldName) const

Get the volatile status of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Volatile status of the selected field.

◆ getWidthExpression()

std::string FieldInterface::getWidthExpression ( std::string const & fieldName) const

Get the bit width expression of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Bit width expression of the selected field.

◆ getWidthFormattedExpression()

std::string FieldInterface::getWidthFormattedExpression ( std::string const & fieldName) const

Get the formatted bit width expression of the selected field.

Parameters
[in]fieldNameName of the selected field.
Returns
Formatted bit width expression of the selected field.

◆ getWidthValue()

std::string FieldInterface::getWidthValue ( std::string const & fieldName,
int const & baseNumber = 0 ) const

Get the calculated bit width value of the selected field.

Parameters
[in]fieldNameName of the selected field.
[in]baseNumberBase for displaying the value.
Returns
Calculated bit width value of the selected parameter.

◆ getWriteConstraint()

std::string FieldInterface::getWriteConstraint ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the write value constraint type of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
The write value constraint type of the selected field or field access policy.

◆ getWriteConstraintMaximumExpression()

std::string FieldInterface::getWriteConstraintMaximumExpression ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the write value constraint maximum expression of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Write value constraint maximum expression of the selected parameter.

◆ getWriteConstraintMaximumFormattedExpression()

std::string FieldInterface::getWriteConstraintMaximumFormattedExpression ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the formatted write value constraint maximum expression of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Formatted write value constraint maximum expression of the selected field or field access policy.

◆ getWriteConstraintMaximumValue()

std::string FieldInterface::getWriteConstraintMaximumValue ( std::string const & fieldName,
int accessPolicyIndex = -1,
int const & baseNumber = 0 ) const

Get the calculated write value constraint maximum value of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
[in]baseNumberBase for displaying the value.
Returns
Calculated write value constraint maximum value of the selected field or field access policy.

◆ getWriteConstraintMinimumExpression()

std::string FieldInterface::getWriteConstraintMinimumExpression ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the write value constraint minimum expression of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Write value constraint minimum expression of the selected parameter.

◆ getWriteConstraintMinimumFormattedExpression()

std::string FieldInterface::getWriteConstraintMinimumFormattedExpression ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Get the formatted write value constraint minimum expression of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
Formatted write value constraint minimum expression of the selected field or field access policy.

◆ getWriteConstraintMinimumValue()

std::string FieldInterface::getWriteConstraintMinimumValue ( std::string const & fieldName,
int accessPolicyIndex = -1,
int const & baseNumber = 0 ) const

Get the calculated write value constraint minimum value of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
[in]baseNumberBase for displaying the value.
Returns
Calculated write value constraint minimum value of the selected field or field access policy.

◆ hasValidAccess()

bool FieldInterface::hasValidAccess ( std::string const & fieldName,
int accessPolicyIndex = -1 ) const

Check if the selected field or field access policy has a valid access.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the field access policy to validate.
Returns
True, if the access is valid, false otherwise.

◆ hasValidAccessPolicyModeRefs()

bool FieldInterface::hasValidAccessPolicyModeRefs ( std::string const & fieldName,
int accessPolicyIndex ) const

Checks if the field access policy given by index has valid mode references.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexThe index of the field access policy to check.
Returns
True, if the field access policy's mode references are valid, otherwise false.

◆ hasValidIsPresent()

bool FieldInterface::hasValidIsPresent ( std::string const & fieldName) const

Check if the selected field has a valid is present.

Parameters
[in]fieldNameName of the selected field.
Returns
True, if the is present is valid, false otherwise.

◆ hasValidOffset()

bool FieldInterface::hasValidOffset ( std::string const & fieldName) const

Check if the selected field has a valid offset.

Parameters
[in]fieldNameName of the selected field.
Returns
True, if the offset is valid, false otherwise.

◆ hasValidReadResponse()

bool FieldInterface::hasValidReadResponse ( std::string const & fieldName,
int accessPolicyIndex ) const

Check if the selected field access policy has a valid read response.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the field access policy to validate.
Returns
True, if the read response is valid, false otherwise.

◆ hasValidReserved()

bool FieldInterface::hasValidReserved ( std::string const & fieldName,
int accessPolicyIndex ) const

Check if the selected field access policy has a valid reserved value.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the field access policy to validate.
Returns
True, if the reserved is valid, false otherwise.

◆ hasValidResets()

bool FieldInterface::hasValidResets ( std::string const & fieldName) const

Check if the selected field has valid reset values.

Parameters
[in]fieldNameName of the selected field.
Returns
True, if the reset values are valid, false otherwise.

◆ hasValidWidth()

bool FieldInterface::hasValidWidth ( std::string const & fieldName) const

Check if the selected field has a valid bit width.

Parameters
[in]fieldNameName of the selected field.
Returns
True, if the bit width is valid, false otherwise.

◆ hasValidWriteValueConstraint()

bool FieldInterface::hasValidWriteValueConstraint ( std::string const & fieldName,
int accessPolicyIndex ) const

Check if the selected field access policy has a valid write value constraint.

Parameters
[in]fieldNameName of the selected field.
[in]accessPolicyIndexIndex of the field access policy to validate.
Returns
True, if the write value constraint is valid, false otherwise.

◆ hasWriteConstraint()

bool FieldInterface::hasWriteConstraint ( std::string const & fieldName) const

Check if the selected field or field access policy has a write value constraint. Access policy index is provided only when checking the existence of a write constraint of a field access policy within a 2022 std revision field.

Parameters
[in]fieldNameName of the selected field.
Returns
True, if the selected field or field access policy has write value constraint, false otherwise.

◆ itemCount()

virtual int FieldInterface::itemCount ( ) const
finaloverridevirtual

Get the number of available items.

Returns
Number of available items.

Implements CommonInterface.

◆ itemHasValidName()

virtual bool FieldInterface::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.

◆ pasteFieldaccessPolicies()

int FieldInterface::pasteFieldaccessPolicies ( std::string const & fieldName)

Paste the selected field access policies.

Parameters
[in]fieldNameThe name of the field to paste into.
Returns
The number of pasted field access policies.

◆ pasteRows()

std::vector< std::string > FieldInterface::pasteRows ( )

Paste the selected fields.

Returns
Names of the pasted fields.

◆ removeField()

bool FieldInterface::removeField ( std::string const & fieldName)

Remove the selected field.

Parameters
[in]FieldNameName of the selected field.
Returns
True, if successful, false otherwise.

◆ removeFieldAccessPolicy()

bool FieldInterface::removeFieldAccessPolicy ( std::string const & fieldName,
int accessPolicyIndex )

Remove the given field access policy from a specific field.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexThe index of the field access policy to be removed.
Returns
True, if successful, otherwise false.

◆ setAccess()

bool FieldInterface::setAccess ( std::string const & fieldName,
std::string const & accessType,
int accessPolicyIndex = -1 ) const

Set the access of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]newAccessThe new access of the selected field.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setFields()

void FieldInterface::setFields ( QSharedPointer< QList< QSharedPointer< Field > > > newFields)

Set available fields.

Parameters
[in]newFieldsThe new fields.

◆ setID()

bool FieldInterface::setID ( std::string const & fieldName,
std::string const & newID )

Set a ID for the selected field.

Parameters
[in]parameterNameName of the selected parameter.
[in]newIDNew ID.
Returns
True, if successful, false otherwise.

◆ setIsPresent()

bool FieldInterface::setIsPresent ( std::string const & fieldName,
std::string const & newIsPresent )

Set a new is present value for the selected field.

Parameters
[in]parameterNameName of the selected parameter.
[in]newIsPresentNew is present value.
Returns
True, if successful, false otherwise.

◆ setModeReferenceInterface()

void FieldInterface::setModeReferenceInterface ( ModeReferenceInterface * modeRefInterface)

Set the mode reference interface to be used.

Parameters
[in]modeRefInterfaceThe mode reference interface to be used.

◆ setModeReferences()

bool FieldInterface::setModeReferences ( std::string const & fieldName,
int accessPolicyIndex,
std::vector< std::pair< unsigned int, std::string > > const & newModeRefs )

Set the mode references of a field access policy.

Parameters
[in]fieldNameThe name of the field, which contains the field access policy.
[in]accessPolicyIndexIndex of the field access policy whose mode references to set.
[in]newModeRefsThe mode references to set.
Returns
True, if the operation was successful, otherwise false.

◆ setModifiedWrite()

bool FieldInterface::setModifiedWrite ( std::string const & fieldName,
std::string const & newModifiedWrite,
int accessPolicyIndex = -1 )

Set the modified write value of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]newModifiedWriteThe new modified write value of the selected field.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setName()

virtual bool FieldInterface::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.

◆ setOffset()

bool FieldInterface::setOffset ( std::string const & fieldName,
std::string const & newOffset )

Set a new offset value for the selected field.

Parameters
[in]fieldNameName of the selected field.
[in]newOffsetNew offset value.
Returns
True, if successful, false otherwise.

◆ setReadAction()

bool FieldInterface::setReadAction ( std::string const & fieldName,
std::string const & newReadAction,
int accessPolicyIndex = -1 )

Set the read action of the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]newReadActionThe new read action.
[in]accessPolicyIndexIndex of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setReadResponse()

bool FieldInterface::setReadResponse ( std::string const & fieldName,
int accessPolicyIndex,
std::string const & newReadResponse ) const

Set the read response of a selected field access policy.

Parameters
[in]fieldNameThe name of the field.
[in]accessPolicyIndexIndex of the field access policy.
[in]newReadResponseThe read response to set.
Returns
True, if successful, otherwise false.

◆ setReserved()

bool FieldInterface::setReserved ( std::string const & fieldName,
std::string const & newReserved,
int accessPolicyIndex = -1 )

Set a new reserved value for the selected field or field access policy.

Parameters
[in]parameterNameName of the selected parameter.
[in]newReservedNew reserved value.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setTestable()

bool FieldInterface::setTestable ( std::string const & fieldName,
std::string const & newTestable,
int accessPolicyIndex = -1 ) const

Set the testable value of either a selected field or a selected field access policy within a field. Access policy index is provided only when setting a testable value of a field access policy within a std revision 2022 field.

Parameters
[in]fieldNameName of the selected field.
[in]newTestableThe new testable value of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setTestConstraint()

bool FieldInterface::setTestConstraint ( std::string const & fieldName,
std::string const & newTestConstraint,
int accessPolicyIndex = -1 ) const

Set the test constraint of the selected field or field access policy. Access policy index is provided only when setting the test constraint of a field access policy within a 2022 std revision field.

Parameters
[in]fieldNameName of the selected field.
[in]newTestConstraintThe new test constraint of the selected field.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setVolatile()

bool FieldInterface::setVolatile ( std::string const & fieldName,
std::string const & newVolatile )

Set the volatile status of the selected field.

Parameters
[in]fieldNameName of the selected field.
[in]newVolatileThe new volatile status of the selected field.
Returns
True, if successful, false otherwise.

◆ setWidth()

bool FieldInterface::setWidth ( std::string const & fieldName,
std::string const & newWidth )

Set a new bit width value for the selected field.

Parameters
[in]fieldNameName of the selected field.
[in]newWidthNew bit width value.
Returns
True, if successful, false otherwise.

◆ setWriteConstraint()

bool FieldInterface::setWriteConstraint ( std::string const & fieldName,
std::string const & newConstraintText,
int accessPolicyIndex = -1 )

Set a new write value constraint type for the selected field or field access policy.

Parameters
[in]fieldNameName of the selected field.
[in]newConstraintTextThe new write value constraint type.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setWriteConstraintMaximum()

bool FieldInterface::setWriteConstraintMaximum ( std::string const & fieldName,
std::string const & newWriteConstraintMaximum,
int accessPolicyIndex = -1 )

Set a new write value constraint maximum value for the selected field or field access policy.

Parameters
[in]parameterNameName of the selected parameter.
[in]newWriteConstraintMaximumNew write value constraint maximum value.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ setWriteConstraintMinimum()

bool FieldInterface::setWriteConstraintMinimum ( std::string const & fieldName,
std::string const & newWriteConstraintMinimum,
int accessPolicyIndex = -1 )

Set a new write value constraint minimum value for the selected field or field access policy.

Parameters
[in]parameterNameName of the selected parameter.
[in]newWriteConstraintMinimumNew write value constraint minimum value.
[in]accessPolicyIndexThe index of the selected field access policy.
Returns
True, if successful, false otherwise.

◆ validateItems()

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