Skip to content

Commit

Permalink
[PERFECTIVE] Combine all instantiation tests, remove redundant functi…
Browse files Browse the repository at this point in the history
…ons from component validator.
  • Loading branch information
hagantsa committed Sep 24, 2024
1 parent 30bd852 commit 1df7be8
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 245 deletions.
27 changes: 0 additions & 27 deletions IPXACTmodels/Component/validators/ComponentValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,33 +360,6 @@ bool ComponentValidator::hasValidInstantiations(QSharedPointer<Component> compon
return allInstantiationsValidator_->validate(component);
}

//-----------------------------------------------------------------------------
// Function: ComponentValidator::hasValidComponentInstantiations()
//-----------------------------------------------------------------------------
bool ComponentValidator::hasValidComponentInstantiations(QSharedPointer<Component> component)
{
changeComponent(component);
return allInstantiationsValidator_->hasValidComponentInstantiations(component);
}

//-----------------------------------------------------------------------------
// Function: ComponentValidator::hasValidDesignInstantiations()
//-----------------------------------------------------------------------------
bool ComponentValidator::hasValidDesignInstantiations(QSharedPointer<Component> component)
{
changeComponent(component);
return allInstantiationsValidator_->hasValidDesignInstantiations(component);
}

//-----------------------------------------------------------------------------
// Function: ComponentValidator::hasValidDesignConfigurationInstantiations()
//-----------------------------------------------------------------------------
bool ComponentValidator::hasValidDesignConfigurationInstantiations(QSharedPointer<Component> component)
{
changeComponent(component);
return allInstantiationsValidator_->hasValidDesignConfigurationInstantiations(component);
}

//-----------------------------------------------------------------------------
// Function: ComponentValidator::hasValidPorts()
//-----------------------------------------------------------------------------
Expand Down
26 changes: 3 additions & 23 deletions IPXACTmodels/Component/validators/ComponentValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,34 +159,14 @@ class IPXACTMODELS_EXPORT ComponentValidator
*/
bool hasValidViews(QSharedPointer<Component> component);

bool hasValidInstantiations(QSharedPointer<Component> component);

/*!
* Check if the contained component instantiations are valid.
*
* @param [in] component The selected component.
*
* @return True, if the component instantiations are valid, otherwise false.
*/
bool hasValidComponentInstantiations(QSharedPointer<Component> component);

/*!
* Check if the contained design instantiations are valid.
* Check if the contained instantiations are valid.
*
* @param [in] component The selected component.
*
* @return True, if the design instantiations are valid, otherwise false.
* @return True, if the instantiations of the selected component are valid, otherwise false.
*/
bool hasValidDesignInstantiations(QSharedPointer<Component> component);

/*!
* Check if the contained design configuration instantiations are valid.
*
* @param [in] component The selected component.
*
* @return True, if the design configuration instantiations are valid, otherwise false.
*/
bool hasValidDesignConfigurationInstantiations(QSharedPointer<Component> component);
bool hasValidInstantiations(QSharedPointer<Component> component);

/*!
* Check if the contained ports are valid.
Expand Down
Loading

0 comments on commit 1df7be8

Please sign in to comment.