![]() |
Kactus2
Kactus2 reference guide
|
Parent interface for editing memory blocks. More...
#include <MemoryBlockInterface.h>
Public Member Functions | |
MemoryBlockInterface (QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, BusInterfaceInterface *busInterface, ParametersInterface *parameterInterface) | |
virtual | ~MemoryBlockInterface ()=default |
virtual bool | acceptBlock (std::string const &blockName) const =0 |
virtual void | addBlock (int const &row, std::string const &newBlockName=std::string(""))=0 |
virtual void | addBlock (std::string const &newBlockName=std::string("")) |
void | copyRows (std::vector< int > selectedRows) |
virtual int | getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const override |
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 |
virtual std::vector< std::string > | getExpressionsInSelectedItems (std::vector< std::string > const &itemNames) const =0 |
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) |
virtual bool | validateItems () const override=0 |
![]() | |
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 |
![]() | |
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 |
![]() | |
CommonInterface ()=default | |
CommonInterface (const CommonInterface &other)=delete | |
No copying. No assignment. | |
virtual | ~CommonInterface ()=default |
CommonInterface & | operator= (const CommonInterface &other)=delete |
Protected Member Functions | |
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 |
![]() | |
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 |
![]() | |
QString | getUniqueName (std::string const &newName, std::string const &itemTypeName) const |
bool | nameHasChanged (std::string const &newName, std::string const &oldName) const |
Parent interface for editing memory blocks.
Definition at line 34 of file MemoryBlockInterface.h.
MemoryBlockInterface::MemoryBlockInterface | ( | QSharedPointer< ExpressionParser > | expressionParser, |
QSharedPointer< ExpressionFormatter > | expressionFormatter, | ||
BusInterfaceInterface * | busInterface, | ||
ParametersInterface * | parameterInterface ) |
The constructor.
[in] | expressionParser | Parser for expressions. |
[in] | expressionFormatter | Formatter for expressions. |
[in] | busInterface | Interface for accessing bus interfaces. |
[in] | parameterInterface | Interface for accessing parameters. |
|
virtualdefault |
The destructor.
|
pure virtual |
Check if the selected memory block is accepted.
[in] | blockName | Name of the selected memory block. |
Implemented in AddressBlockInterface, and SubspaceMapInterface.
|
pure virtual |
Add a new memory block, inserting it to specified position given by row.
[in] | row | Row of the new memory block. |
[in] | newBlockName | Name of the new memory block. |
Implemented in AddressBlockInterface, and SubspaceMapInterface.
|
virtual |
Add a new memory block. This overload should be preferred when using Python.
[in] | newBlockName | Name of the new memory block. |
void MemoryBlockInterface::copyRows | ( | std::vector< int > | selectedRows | ) |
Copy the selected items.
[in] | selectedRows | Indexes of the selected items. |
|
protected |
Get the address unit bits.
|
overridevirtual |
Calculate all the references to the selected ID in the selected item.
[in] | itemName | Name of the selected item. |
[in] | valueID | The selected ID. |
Implements ParameterizableInterface.
Reimplemented in AddressBlockInterface.
std::string MemoryBlockInterface::getBaseAddressExpression | ( | std::string const & | blockName | ) | const |
Get the base address expression of the selected memory block.
[in] | blockName | Name of the selected memory block. |
std::string MemoryBlockInterface::getBaseAddressFormattedExpression | ( | std::string const & | blockName | ) | const |
Get the formatted base address expression of the selected memory block.
[in] | blockName | Name of the selected memory block. |
std::string MemoryBlockInterface::getBaseAddressValue | ( | std::string const & | blockName, |
int const & | baseNumber = 0 ) const |
Get the calculated base address value of the selected memory block.
[in] | blockName | Name of the selected memory block. |
[in] | baseNumber | Base for displaying the value. |
|
protected |
Get the selected memory block.
[in] | blockName | Name of the selected memory block. |
|
protected |
Get the available memory blocks.
BusInterfaceInterface * MemoryBlockInterface::getBusInterface | ( | ) | const |
Get the interface for accessing bus interfaces.
|
pure virtual |
Get the expressions in the selected items.
[in] | itemNames | Names of the selected items. |
Implemented in AddressBlockInterface, and SubspaceMapInterface.
|
finalvirtual |
Get name of the indexed item.
[in] | itemIndex | Index of the selected item. |
Implements NameGroupInterface.
std::string MemoryBlockInterface::getIsPresentExpression | ( | std::string const & | blockName | ) | const |
Get the is present expression of the selected memory block.
[in] | blockName | Name of the selected memory block. |
std::string MemoryBlockInterface::getIsPresentFormattedExpression | ( | std::string const & | blockName | ) | const |
Get the formatted is present expression of the selected memory block.
[in] | blockName | Name of the selected memory block. |
std::string MemoryBlockInterface::getIsPresentValue | ( | std::string const & | blockName, |
int const & | baseNumber = 0 ) const |
Get the calculated is present value of the selected memory block.
[in] | blockName | Name of the selected memory block. |
[in] | baseNumber | Base for displaying the value. |
|
finaloverridevirtual |
Get index of the selected item.
[in] | itemName | Name of the selected item. |
Implements NameGroupInterface.
|
finaloverridevirtual |
Get the names of the available items.
Implements CommonInterface.
|
protected |
Get the base address for a new memory block.
int MemoryBlockInterface::getPasteRowCount | ( | ) | const |
Get the number of pasted items.
std::string MemoryBlockInterface::getRangeValue | ( | std::string const & | blockName, |
int const & | baseNumber = 0 ) const |
Get the calculated range value of the selected memory block.
[in] | blockName | Name of the selected memory block. |
[in] | baseNumber | Base for displaying the value. |
|
protected |
Get the address space within the selected bus interface.
[in] | masterBusReference | Name of the selected bus interface. |
bool MemoryBlockInterface::hasValidBaseAddress | ( | std::string const & | itemName | ) | const |
Check if the selected memory block has a valid base address.
[in] | itemName | Name of the selected memory block. |
bool MemoryBlockInterface::hasValidIsPresent | ( | std::string const & | itemName | ) | const |
Check if the selected memory block has a valid is present value.
[in] | itemName | Name of the selected memory block. |
|
finaloverridevirtual |
|
virtual |
Check if the selected item has a valid name.
[in] | itemName | Name of the selected item. |
Implements NameGroupInterface.
std::vector< std::string > MemoryBlockInterface::pasteRows | ( | ) |
Paste the selected items.
bool MemoryBlockInterface::removeBlock | ( | std::string const & | blockName | ) |
Remove the selected memory block.
[in] | blockName | Name of the selected memory block. |
void MemoryBlockInterface::setAddressUnitBits | ( | std::string const & | newAddressUnitbits | ) |
Change the value for address unit bits.
[in] | newAddressUnitbits | The new value for address unit bits. |
bool MemoryBlockInterface::setBaseAddress | ( | std::string const & | blockName, |
std::string const & | newBaseAdress ) const |
Set a new base address value for the selected memory block.
[in] | blockName | Name of the selected memory block. |
[in] | newBaseAddress | New base memory value. |
bool MemoryBlockInterface::setIsPresent | ( | std::string const & | blockName, |
std::string const & | newIsPresent ) const |
Set a new is present value for the selected memory block.
[in] | blockName | Name of the selected memory block. |
[in] | newIsPresent | New is present value. |
void MemoryBlockInterface::setMemoryBlocks | ( | QSharedPointer< QList< QSharedPointer< MemoryBlockBase > > > | newMemoryBlocks | ) |
Set available memory blocks.
[in] | newMemoryBlocks | The new memory block data. |
|
finaloverridevirtual |
Set a new name for the selected item.
[in] | currentName | Name of the selected item. |
[in] | newName | New name for the item. |
Implements NameGroupInterface.
void MemoryBlockInterface::setupSubInterfaces | ( | QSharedPointer< Component > | newComponent | ) |
Setup the sub interfaces.
[in] | newComponent | Component containing the available items. |
|
overridepure virtual |
Validates the contained items.
Implements CommonInterface.
Implemented in AddressBlockInterface, and SubspaceMapInterface.