|
Kactus2
Kactus2 reference guide
|
Interface for editing address blocks. More...
#include <AddressBlockInterface.h>
Public Member Functions | |
| AddressBlockInterface (QSharedPointer< AddressBlockValidator > blockValidator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, BusInterfaceInterface *busInterface, RegisterInterface *subInterface, ParametersInterface *parameterInterface) | |
| virtual | ~AddressBlockInterface ()=default |
| virtual bool | acceptBlock (std::string const &blockName) const final |
| bool | addAccessPolicy (std::string const &blockName) const |
| virtual void | addBlock (int const &row, std::string const &newBlockName=std::string("")) final |
| AccessTypes::Access | getAccess (std::string const &blockName) const |
| int | getAccessPolicyCount (std::string const &blockName) const |
| std::string | getAccessString (std::string const &blockName, bool getAccessPolicyAccess=false) const |
| virtual int | getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const final |
| virtual std::vector< std::string > | getExpressionsInSelectedItems (std::vector< std::string > const &itemNames) const final |
| std::string | getRangeExpression (std::string const &blockName) const |
| std::string | getRangeFormattedExpression (std::string const &blockName) const |
| RegisterInterface * | getSubInterface () const |
| General::Usage | getUsage (std::string const &blockName) const |
| std::string | getUsageString (std::string const &blockName) const |
| std::string | getVolatile (std::string const &blockName) const |
| std::string | getWidthExpression (std::string const &blockName) const |
| std::string | getWidthFormattedExpression (std::string const &blockName) const |
| std::string | getWidthValue (std::string const &blockName, int const &baseNumber=0) const |
| bool | hasRegisters (std::string const &blockName) const |
| bool | hasValidRange (std::string const &itemName) const |
| bool | hasValidUsage (std::string const &itemName) const |
| bool | hasValidWidth (std::string const &itemName) const |
| bool | setAccess (std::string const &blockName, std::string const &newAccess, bool setAccessPolicyAccess=false) const |
| bool | setRange (std::string const &blockName, std::string const &newRange) const |
| bool | setUsage (std::string const &blockName, std::string const &newUsage) const |
| bool | setVolatile (std::string const &blockName, bool newVolatile) const |
| bool | setVolatile (std::string const &blockName, std::string const &newVolatileValue) |
| bool | setWidth (std::string const &blockName, std::string const &newWidth) const |
| virtual bool | validateItems () const override final |
Public Member Functions inherited from MemoryBlockInterface | |
| MemoryBlockInterface (QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, BusInterfaceInterface *busInterface, ParametersInterface *parameterInterface) | |
| virtual | ~MemoryBlockInterface ()=default |
| virtual void | addBlock (std::string const &newBlockName=std::string("")) |
| void | copyRows (std::vector< int > selectedRows) |
| std::string | getBaseAddressExpression (std::string const &blockName) const |
| std::string | getBaseAddressFormattedExpression (std::string const &blockName) const |
| std::string | getBaseAddressValue (std::string const &blockName, int const &baseNumber=0) const |
| BusInterfaceInterface * | getBusInterface () const |
| std::string | getIndexedItemName (int itemIndex) const final |
| std::string | getIsPresentExpression (std::string const &blockName) const |
| std::string | getIsPresentFormattedExpression (std::string const &blockName) const |
| std::string | getIsPresentValue (std::string const &blockName, int const &baseNumber=0) const |
| virtual int | getItemIndex (std::string const &itemName) const override final |
| virtual std::vector< std::string > | getItemNames () const override final |
| int | getPasteRowCount () const |
| std::string | getRangeValue (std::string const &blockName, int const &baseNumber=0) const |
| bool | hasValidBaseAddress (std::string const &itemName) const |
| bool | hasValidIsPresent (std::string const &itemName) const |
| virtual int | itemCount () const override final |
| bool | itemHasValidName (std::string const &itemName) const |
| std::vector< std::string > | pasteRows () |
| bool | removeBlock (std::string const &blockName) |
| void | setAddressUnitBits (std::string const &newAddressUnitbits) |
| bool | setBaseAddress (std::string const &blockName, std::string const &newBaseAdress) const |
| bool | setIsPresent (std::string const &blockName, std::string const &newIsPresent) const |
| void | setMemoryBlocks (QSharedPointer< QList< QSharedPointer< MemoryBlockBase > > > newMemoryBlocks) |
| virtual bool | setName (std::string const ¤tName, std::string const &newName) override final |
| void | setupSubInterfaces (QSharedPointer< Component > newComponent) |
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 |
| ParameterizableInterface & | operator= (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 |
| NameGroupInterface & | operator= (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 |
| CommonInterface & | operator= (const CommonInterface &other)=delete |
Additional Inherited Members | |
Protected Member Functions inherited from MemoryBlockInterface | |
| QString | getAddressUnitBits () const |
| QSharedPointer< MemoryBlockBase > | getBlock (std::string const &itemName) const |
| QSharedPointer< QList< QSharedPointer< MemoryBlockBase > > > | getBlocksData () |
| QString | getNewBlockBaseAddress () const |
| QSharedPointer< AddressSpace > | getReferencedAddressSpace (QString const &masterBusReference) const |
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 |
Interface for editing address blocks.
Definition at line 34 of file AddressBlockInterface.h.
| AddressBlockInterface::AddressBlockInterface | ( | QSharedPointer< AddressBlockValidator > | blockValidator, |
| QSharedPointer< ExpressionParser > | expressionParser, | ||
| QSharedPointer< ExpressionFormatter > | expressionFormatter, | ||
| BusInterfaceInterface * | busInterface, | ||
| RegisterInterface * | subInterface, | ||
| ParametersInterface * | parameterInterface ) |
The constructor.
| [in] | blockValidator | Validator for address blocks. |
| [in] | expressionParser | Parser for expressions. |
| [in] | expressionFormatter | Formatter for expressions. |
| [in] | busInterface | Interface for accessing bus interfaces. |
| [in] | subInterface | Interface for accessing registers. |
| [in] | parameterInterface | Interface for accessing parameters. |
|
virtualdefault |
The destructor.
|
finalvirtual |
Check if the selected memory block is an address block.
| [in] | blockName | Name of the selected memory block. |
Implements MemoryBlockInterface.
| bool AddressBlockInterface::addAccessPolicy | ( | std::string const & | blockName | ) | const |
Add a new access policy to an address block.
| [in] | blockName | Name of the selected address block. |
|
finalvirtual |
Add a new address block.
| [in] | row | Row of the new address block. |
| [in] | newBlockName | Name of the new address block. |
Implements MemoryBlockInterface.
| AccessTypes::Access AddressBlockInterface::getAccess | ( | std::string const & | blockName | ) | const |
Get the access of the selected address block. Used in std14 access editor.
| [in] | blockName | Name of the selected address block. |
| int AddressBlockInterface::getAccessPolicyCount | ( | std::string const & | blockName | ) | const |
Get the number of access policies an address block has.
| [in] | blockName | Name of the selected address block. |
| std::string AddressBlockInterface::getAccessString | ( | std::string const & | blockName, |
| bool | getAccessPolicyAccess = false ) const |
Get the access string of the selected address block or one of its access policies specified by the accessPolicyIndex parameter. The default value of -1 returns the address block's access value. 0 and above returns an indexed access policy's access value.
| [in] | blockName | Name of the selected address block. |
| [in] | getAccessPolicyAccess | Flag indicating if access is fetched from access policy or directly from address block. |
|
finalvirtual |
Calculate all the references to the selected ID in the selected item.
| [in] | itemName | Name of the selected item. |
| [in] | valueID | The selected ID. |
Reimplemented from MemoryBlockInterface.
|
finalvirtual |
Get the expressions in the selected items.
| [in] | itemNames | Names of the selected items. |
Implements MemoryBlockInterface.
| std::string AddressBlockInterface::getRangeExpression | ( | std::string const & | blockName | ) | const |
Get the range expression of the selected address block.
| [in] | blockName | Name of the selected address block. |
| std::string AddressBlockInterface::getRangeFormattedExpression | ( | std::string const & | blockName | ) | const |
Get the formatted range expression of the selected address block.
| [in] | blockName | Name of the selected address block. |
| RegisterInterface * AddressBlockInterface::getSubInterface | ( | ) | const |
Get the sub interface.
| General::Usage AddressBlockInterface::getUsage | ( | std::string const & | blockName | ) | const |
Get the usage of the selected address block.
| [in] | blockName | Name of the selected address block. |
| std::string AddressBlockInterface::getUsageString | ( | std::string const & | blockName | ) | const |
Get the usage string of the selected address block.
| [in] | blockName | Name of the selected address block. |
| std::string AddressBlockInterface::getVolatile | ( | std::string const & | blockName | ) | const |
Get the volatile value of the selected address block.
| [in] | blockName | Name of the selected address block. |
| std::string AddressBlockInterface::getWidthExpression | ( | std::string const & | blockName | ) | const |
Get the width expression of the selected address block.
| [in] | blockName | Name of the selected address block. |
| std::string AddressBlockInterface::getWidthFormattedExpression | ( | std::string const & | blockName | ) | const |
Get the formatted width expression of the selected address block.
| [in] | blockName | Name of the selected address block. |
| std::string AddressBlockInterface::getWidthValue | ( | std::string const & | blockName, |
| int const & | baseNumber = 0 ) const |
Get the calculated width value of the selected address block.
| [in] | blockName | Name of the selected address block. |
| [in] | baseNumber | Base for displaying the value. |
| bool AddressBlockInterface::hasRegisters | ( | std::string const & | blockName | ) | const |
Check if the selected address block contains registers.
| [in] | blockName | Name of the selected address block. |
| bool AddressBlockInterface::hasValidRange | ( | std::string const & | itemName | ) | const |
Check if the selected address block has a valid range.
| [in] | itemName | Name of the selected address block. |
| bool AddressBlockInterface::hasValidUsage | ( | std::string const & | itemName | ) | const |
Check if the selected address block has a valid usage.
| [in] | itemName | Name of the selected address block. |
| bool AddressBlockInterface::hasValidWidth | ( | std::string const & | itemName | ) | const |
Check if the selected address block has a valid width.
| [in] | itemName | Name of the selected address block. |
| bool AddressBlockInterface::setAccess | ( | std::string const & | blockName, |
| std::string const & | newAccess, | ||
| bool | setAccessPolicyAccess = false ) const |
Set a new access for the selected address block.
| [in] | blockName | Name of the selected address block. |
| [in] | newAccess | New access value. |
| [in] | getAccessPolicyAccess | Flag indicating if access is set to access policy or directly to address block. |
| bool AddressBlockInterface::setRange | ( | std::string const & | blockName, |
| std::string const & | newRange ) const |
Set a new range value for the selected address block.
| [in] | blockName | Name of the selected address block. |
| [in] | newRange | New range value. |
| bool AddressBlockInterface::setUsage | ( | std::string const & | blockName, |
| std::string const & | newUsage ) const |
Set a new usage value for the selected address block.
| [in] | blockName | Name of the selected address block. |
| [in] | newUsage | New usage value. |
| bool AddressBlockInterface::setVolatile | ( | std::string const & | blockName, |
| bool | newVolatile ) const |
Set a new volatile value for the selected address block.
| [in] | blockName | Name of the selected address block. |
| [in] | newVolatile | New volatile value. |
| bool AddressBlockInterface::setVolatile | ( | std::string const & | blockName, |
| std::string const & | newVolatileValue ) |
Set a new volatile value for the selected address block.
| [in] | blockName | Name of the selected address block. |
| [in] | newVolatileValue | The new volatile value. |
| bool AddressBlockInterface::setWidth | ( | std::string const & | blockName, |
| std::string const & | newWidth ) const |
Set a new width value for the selected address block.
| [in] | blockName | Name of the selected address block. |
| [in] | newWidth | New width value. |
|
finaloverridevirtual |
Validates the contained items.
Implements MemoryBlockInterface.