Skip to content

Commit

Permalink
[CLEANUP] Replace BusDefinitionParameterFinder with ListParameterFinder.
Browse files Browse the repository at this point in the history
  • Loading branch information
hagantsa committed Aug 26, 2024
1 parent ccd9534 commit 3ef490f
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 250 deletions.
2 changes: 0 additions & 2 deletions KactusAPI/KactusAPI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<ClInclude Include="include\AddressBlockInterface.h" />
<ClInclude Include="include\AddressSpaceExpressionsGatherer.h" />
<ClInclude Include="include\AdHocConnectionInterface.h" />
<ClInclude Include="include\BusDefinitionParameterFinder.h" />
<ClInclude Include="include\BusInterfaceInterface.h" />
<ClInclude Include="include\BusInterfaceInterfaceFactory.h" />
<ClInclude Include="include\BusInterfaceUtilities.h" />
Expand Down Expand Up @@ -126,7 +125,6 @@
<ClCompile Include="expressions\RegisterExpressionsGatherer.cpp" />
<ClCompile Include="expressions\RegisterFileExpressionsGatherer.cpp" />
<ClCompile Include="expressions\SystemVerilogExpressionParser.cpp" />
<ClCompile Include="include\BusDefinitionParameterFinder.cpp" />
<ClCompile Include="interfaces\bus\AbstractionTypeInterface.cpp" />
<ClCompile Include="interfaces\bus\PortAbstractionInterface.cpp" />
<ClCompile Include="interfaces\common\AbstractParameterInterface.cpp" />
Expand Down
6 changes: 0 additions & 6 deletions KactusAPI/KactusAPI.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,6 @@
<ClInclude Include="include\NullChannel.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="include\BusDefinitionParameterFinder.h">
<Filter>Header Files\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="utilities\ConsoleMediator.cpp">
Expand Down Expand Up @@ -515,9 +512,6 @@
<ClCompile Include="utilities\NullChannel.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="include\BusDefinitionParameterFinder.cpp">
<Filter>Source Files\expressions</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\ComponentInstanceInterface.h">
Expand Down
117 changes: 0 additions & 117 deletions KactusAPI/include/BusDefinitionParameterFinder.cpp

This file was deleted.

108 changes: 0 additions & 108 deletions KactusAPI/include/BusDefinitionParameterFinder.h

This file was deleted.

3 changes: 2 additions & 1 deletion common/widgets/ParameterGroupBox/parametergroupbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ void ParameterGroupBox::refresh()
// Function: parametergroupbox::setNewParameters()
//-----------------------------------------------------------------------------
void ParameterGroupBox::setNewParameters(QSharedPointer<QList<QSharedPointer<Parameter> > > newParameters,
Document::Revision docRevision)
QSharedPointer<QList<QSharedPointer<Choice> > > newChoices, Document::Revision docRevision)
{
parameterInterface_->setParameters(newParameters);
parameterInterface_->setChoices(newChoices);
model_->resetModelItems();
delegate_->setStdRevision(docRevision);
parameterValidator_->setStdRevision(docRevision);
Expand Down
3 changes: 2 additions & 1 deletion common/widgets/ParameterGroupBox/parametergroupbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class ParameterGroupBox : public QGroupBox
*
* @param [in] newParameters New parameter list.
*/
void setNewParameters(QSharedPointer<QList<QSharedPointer<Parameter> > > newParameters, Document::Revision docRevision);
void setNewParameters(QSharedPointer<QList<QSharedPointer<Parameter> > > newParameters,
QSharedPointer<QList<QSharedPointer<Choice> > > newChoices, Document::Revision docRevision);

signals:

Expand Down
7 changes: 5 additions & 2 deletions editors/BusDefinitionEditor/BusDefinitionEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <KactusAPI/include/SystemVerilogExpressionParser.h>
#include <KactusAPI/include/PortAbstractionInterface.h>
#include <KactusAPI/include/ExpressionFormatter.h>
#include <KactusAPI/include/BusDefinitionParameterFinder.h>
#include <KactusAPI/include/ListParameterFinder.h>

#include <QApplication>
#include <QFile>
Expand All @@ -43,7 +43,7 @@ TabDocument(parent, libHandler, DOC_PROTECTION_SUPPORT),
busDef_(busDef),
expressionParser_(new SystemVerilogExpressionParser()),
busDefinitionValidator_(new BusDefinitionValidator(libHandler, expressionParser_)),
busDefParameterFinder_(new BusDefinitionParameterFinder(busDef)),
busDefParameterFinder_(new ListParameterFinder()),
expressionFormatter_(new ExpressionFormatter(busDefParameterFinder_)),
referenceCounter_(new ParameterReferenceCounter(busDefParameterFinder_)),
parameterReferenceTree_(new BusDefinitionParameterReferenceTree(busDef, expressionFormatter_, referenceCounter_, this)),
Expand All @@ -67,6 +67,8 @@ busDefGroup_(libHandler, expressionFormatter_, busDefParameterFinder_, this)
setProtection(true);
}

busDefParameterFinder_->setParameterList(busDef_->getParameters());

setupLayout();

connect(&busDefGroup_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection);
Expand Down Expand Up @@ -148,6 +150,7 @@ void BusDefinitionEditor::setBusDef(QSharedPointer<BusDefinition> busDef)

busDefGroup_.setBusDef(busDef_);
busDefGroup_.setDisabled(false);
busDefParameterFinder_->setParameterList(busDef->getParameters());

VLNV vlnv = busDef_->getVlnv();
setDocumentName(vlnv.getName() + " (" + vlnv.getVersion() + ")");
Expand Down
4 changes: 2 additions & 2 deletions editors/BusDefinitionEditor/BusDefinitionEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ExpressionParser;
class ExpressionFormatter;
class BusDefinitionParameterReferenceTree;
class ParameterReferenceTreeWindow;
class BusDefinitionParameterFinder;
class ListParameterFinder;

//-----------------------------------------------------------------------------
//! Bus Editor is editor for Bus- and Abstraction definition.
Expand Down Expand Up @@ -156,7 +156,7 @@ public slots:
bool busDefinitionSaved_= false;

//! Parameter finder for bus definitions.
QSharedPointer<BusDefinitionParameterFinder> busDefParameterFinder_;
QSharedPointer<ListParameterFinder> busDefParameterFinder_;

//! Expression formatter to use.
QSharedPointer<ExpressionFormatter> expressionFormatter_;
Expand Down
2 changes: 1 addition & 1 deletion editors/BusDefinitionEditor/busdefgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void BusDefGroup::setBusDef( QSharedPointer<BusDefinition> busDef )

systemGroupEditor_.setItems(busDef_);

parameterEditor_->setNewParameters(busDef->getParameters(), busDef->getRevision());
parameterEditor_->setNewParameters(busDef->getParameters(), busDef->getChoices(), busDef->getRevision());
}

//-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions mainwindow/DockWidgetHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ void DockWidgetHandler::documentChanged(TabDocument* doc)

QSharedPointer<Design> design = designwidget->getDiagram()->getDesign();
designParametersEditor_->setDisabled(designwidget->isProtected());
designParametersEditor_->setNewParameters(design->getParameters(), design->getRevision());
designParametersEditor_->setNewParameters(design->getParameters(), nullptr, design->getRevision());
designParameterTree_->setDesign(design);
designParameterReferenceCounter_->setDesign(design);

Expand Down Expand Up @@ -1136,7 +1136,7 @@ void DockWidgetHandler::refreshDesignDocument(QWidget* currentTabWidget)
instanceEditor_->setContext(topComponent, designWidget->getDiagram()->getEditProvider());

QSharedPointer<Design> design = designWidget->getDiagram()->getDesign();
designParametersEditor_->setNewParameters(design->getParameters(), design->getRevision());
designParametersEditor_->setNewParameters(design->getParameters(), nullptr, design->getRevision());
designParameterTree_->setDesign(design);
designParameterReferenceCounter_->setDesign(design);

Expand Down
16 changes: 8 additions & 8 deletions version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
#ifndef VERSIONNO__H
#define VERSIONNO__H

#define VERSION_FULL 3.13.587.0
#define VERSION_FULL 3.13.589.0

#define VERSION_BASEYEAR 0
#define VERSION_DATE "2024-08-23"
#define VERSION_TIME "14:09:58"
#define VERSION_DATE "2024-08-26"
#define VERSION_TIME "13:44:51"

#define VERSION_MAJOR 3
#define VERSION_MINOR 13
#define VERSION_BUILDNO 587
#define VERSION_BUILDNO 589
#define VERSION_EXTEND 0

#define VERSION_FILE 3,13,587,0
#define VERSION_PRODUCT 3,13,587,0
#define VERSION_FILESTR "3,13,587,0"
#define VERSION_PRODUCTSTR "3,13,587,0"
#define VERSION_FILE 3,13,589,0
#define VERSION_PRODUCT 3,13,589,0
#define VERSION_FILESTR "3,13,589,0"
#define VERSION_PRODUCTSTR "3,13,589,0"

#endif

0 comments on commit 3ef490f

Please sign in to comment.