theFeature->data()->referencesToObjects(aRefs);
for (auto &aRef : aRefs) {
- for (auto anObjIt = aRef.second.begin(); anObjIt != aRef.second.end();
- ++anObjIt) {
- FeaturePtr aFeature = ModelAPI_Feature::feature(*anObjIt);
+ for (auto &anObjIt : aRef.second) {
+ FeaturePtr aFeature = ModelAPI_Feature::feature(anObjIt);
if (aFeature && !isCoordinate(aFeature) &&
theReferencedFeatures.find(aFeature) == theReferencedFeatures.end())
aReferences.insert(aFeature);
#include <iomanip>
#include <sstream>
-FeaturesPlugin_Measurement::FeaturesPlugin_Measurement() {}
+FeaturesPlugin_Measurement::FeaturesPlugin_Measurement() = default;
void FeaturesPlugin_Measurement::initAttributes() {
data()->addAttribute(FeaturesPlugin_Measurement::MEASURE_KIND(),
#include <ModelAPI_Tools.h>
#include <ModelAPI_Validator.h>
-FeaturesPlugin_Recover::FeaturesPlugin_Recover() {}
+FeaturesPlugin_Recover::FeaturesPlugin_Recover() = default;
void FeaturesPlugin_Recover::initAttributes() {
data()->addAttribute(BASE_FEATURE(), ModelAPI_AttributeReference::typeId());
bool myBool; //< type 2
public:
- GeomAlgoAPI_InfoValue() {} // invalid case
+ GeomAlgoAPI_InfoValue() = default; // invalid case
GeomAlgoAPI_InfoValue(const char *theVal) : myType(0), myStr(theVal) {}
GeomAlgoAPI_InfoValue(const std::string theVal) : myType(0), myStr(theVal) {}
GeomAlgoAPI_InfoValue(const double theVal) : myType(1), myDouble(theVal) {}
//=======================================================================
GEOMAlgo_Algo::GEOMAlgo_Algo()
-{}
+ = default;
//=======================================================================
// function: ~
ConnectedTopologyFlag myConnect;
ModelAPI_BodyBuilder *myBuilder{
- 0}; ///< provides the body processing in naming shape
+ nullptr}; ///< provides the body processing in naming shape
public:
MODELAPI_EXPORT ~ModelAPI_ResultBody() override;
#include <ModelAPI_Feature.h>
#include <ModelAPI_Result.h>
//--------------------------------------------------------------------------------------
-ModelHighAPI_RefAttr::ModelHighAPI_RefAttr() {}
+ModelHighAPI_RefAttr::ModelHighAPI_RefAttr() = default;
ModelHighAPI_RefAttr::ModelHighAPI_RefAttr(
const std::shared_ptr<ModelAPI_Attribute> &theValue)
ModelHighAPI_RefAttr::ModelHighAPI_RefAttr(
const std::shared_ptr<ModelAPI_Object> &theValue)
- : myVariantType(VT_OBJECT), myObject(theValue) {}
+ : myObject(theValue) {}
ModelHighAPI_RefAttr::ModelHighAPI_RefAttr(
const std::shared_ptr<ModelHighAPI_Interface> &theValue)
- : myVariantType(VT_OBJECT),
- myObject(std::shared_ptr<ModelAPI_Object>(theValue->defaultResult())) {}
+ : myObject(std::shared_ptr<ModelAPI_Object>(theValue->defaultResult())) {}
ModelHighAPI_RefAttr::~ModelHighAPI_RefAttr() = default;
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------
-ModelHighAPI_Selection::ModelHighAPI_Selection() {}
+ModelHighAPI_Selection::ModelHighAPI_Selection() = default;
ModelHighAPI_Selection::ModelHighAPI_Selection(
const std::shared_ptr<ModelAPI_Result> &theContext,
#include "ModuleBase_ModelWidget.h"
ModuleBase_IErrorMgr::ModuleBase_IErrorMgr(QObject *theParent /*= 0*/)
- : QObject(theParent), myPropertyPanel(nullptr) {}
+ : QObject(theParent) {}
ModuleBase_IErrorMgr::~ModuleBase_IErrorMgr() = default;
protected:
/// Access to property panel
- ModuleBase_IPropertyPanel *myPropertyPanel;
+ ModuleBase_IPropertyPanel *myPropertyPanel{nullptr};
};
#endif // ModuleBase_IErrorMgr_H
ModuleBase_Operation::ModuleBase_Operation(const QString &theId,
QObject *theParent)
- : QObject(theParent), myPropertyPanel(nullptr) {
+ : QObject(theParent) {
myDescription = new ModuleBase_OperationDescription(theId);
}
QStringList myGrantedIds;
/// Access to property panel
- ModuleBase_IPropertyPanel *myPropertyPanel;
+ ModuleBase_IPropertyPanel *myPropertyPanel{nullptr};
QString myHelpFileName;
QMap<std::string, WidgetCreatorPtr> myCreators;
};
-typedef std::shared_ptr<ModuleBase_WidgetCreatorFactory>
- WidgetCreatorFactoryPtr;
+using WidgetCreatorFactoryPtr =
+ std::shared_ptr<ModuleBase_WidgetCreatorFactory>;
#endif /* MODULEBASE_WIDGETCREATORFACTORY_H_ */
#include <SketchPlugin_Sketch.h>
-PartSet_PreviewPlanes::PartSet_PreviewPlanes() {}
+PartSet_PreviewPlanes::PartSet_PreviewPlanes() = default;
bool PartSet_PreviewPlanes::hasVisualizedBodies(
ModuleBase_IWorkshop *theWorkshop) {
#include <BRepBndLib.hxx>
-PartSet_PreviewSketchPlane::PartSet_PreviewSketchPlane() {}
+PartSet_PreviewSketchPlane::PartSet_PreviewSketchPlane() = default;
void PartSet_PreviewSketchPlane::eraseSketchPlane(
ModuleBase_IWorkshop *theWorkshop, const bool isClearPlane) {
PartSet_FolderNode *myConstrFolder;
PartSet_FolderNode *myPartsFolder;
- ModuleBase_IWorkshop *myWorkshop{0};
+ ModuleBase_IWorkshop *myWorkshop{nullptr};
};
/////////////////////////////////////////////////////////////////////
XGUI_Workshop *myWorkshop;
/// OCC viewer selector instance
- SHAPERGUI_OCCSelector *mySelector{0};
+ SHAPERGUI_OCCSelector *mySelector{nullptr};
/// Proxy viewer for connection to OCC Viewer in SALOME
SHAPERGUI_SalomeViewer *myProxyViewer;
QMap<QString, std::shared_ptr<Config_FeatureMessage>> myFeaturesInfo;
/// Flag of opened document state
- bool myIsOpened{0};
+ bool myIsOpened{false};
// the next parameter should be restored after this module deactivation
/// The application value
bool myIsEditEnabled;
/// Popup manager
- QtxPopupMgr *myPopupMgr{0};
+ QtxPopupMgr *myPopupMgr{nullptr};
QAction *myWhatIsAction;
bool myIsInspectionVisible{false};
- QDockWidget *myInspectionPanel{0};
+ QDockWidget *myInspectionPanel{nullptr};
bool myIsFacesPanelVisible{false};
/// List of registered actions
: SketchPlugin_SketchEntity() {}
SketchPlugin_MacroBSpline::SketchPlugin_MacroBSpline(bool isPeriodic)
- : SketchPlugin_SketchEntity(), myDegree(3), myIsPeriodic(isPeriodic) {}
+ : SketchPlugin_SketchEntity(), myIsPeriodic(isPeriodic) {}
void SketchPlugin_MacroBSpline::initAttributes() {
data()->addAttribute(POLES_ID(), GeomDataAPI_Point2DArray::typeId());
static const double PERIOD = 360.0;
static const double ANGLETOL = 1.e-7;
-SketchPlugin_MultiRotation::SketchPlugin_MultiRotation() {}
+SketchPlugin_MultiRotation::SketchPlugin_MultiRotation() = default;
void SketchPlugin_MultiRotation::initAttributes() {
data()->addAttribute(CENTER_ID(), ModelAPI_AttributeRefAttr::typeId());
*/
class PlaneGCSSolver_EntityWrapper {
public:
- PlaneGCSSolver_EntityWrapper() {}
+ PlaneGCSSolver_EntityWrapper() = default;
virtual ~PlaneGCSSolver_EntityWrapper() = default;
/// \brief Return type of current entity
std::vector<PointWrapperPtr> myPoints;
};
-typedef std::shared_ptr<PlaneGCSSolver_PointArrayWrapper> PointArrayWrapperPtr;
+using PointArrayWrapperPtr = std::shared_ptr<PlaneGCSSolver_PointArrayWrapper>;
#endif
} anEqualParams;
for (auto &myConstraint : myConstraints)
- for (auto aCIt = myConstraint.second.begin();
- aCIt != myConstraint.second.end(); ++aCIt) {
- if ((*aCIt)->getTypeId() == GCS::Equal)
- anEqualParams.add((*aCIt)->params()[0], (*aCIt)->params()[1]);
+ for (auto &aCIt : myConstraint.second) {
+ if (aCIt->getTypeId() == GCS::Equal)
+ anEqualParams.add(aCIt->params()[0], aCIt->params()[1]);
}
GCS::SET_pD aFreeParamsCopy = theFreeParams;
int myDOF{0}; ///< degrees of freedom
- GCS::Constraint *myFictiveConstraint{0};
+ GCS::Constraint *myFictiveConstraint{nullptr};
};
using SolverPtr = std::shared_ptr<PlaneGCSSolver_Solver>;
}
ConstraintWrapperPtr PlaneGCSSolver_Tools::createConstraint(
- ConstraintPtr theConstraint, const SketchSolver_ConstraintType &theType,
+ ConstraintPtr /*theConstraint*/, const SketchSolver_ConstraintType &theType,
const EntityWrapperPtr &theValue, const EntityWrapperPtr &thePoint1,
const EntityWrapperPtr &thePoint2, const EntityWrapperPtr &theEntity1,
const EntityWrapperPtr &theEntity2) {
#include <math.h>
SketchSolver_Constraint::SketchSolver_Constraint(ConstraintPtr theConstraint)
- : myBaseConstraint(theConstraint), myType(CONSTRAINT_UNKNOWN) {}
+ : myBaseConstraint(theConstraint) {}
void SketchSolver_Constraint::process(StoragePtr theStorage,
bool theEvensBlocked) {
class SketchSolver_Constraint {
protected:
/// Default constructor
- SketchSolver_Constraint() {}
+ SketchSolver_Constraint() = default;
public:
/// Constructor based on SketchPlugin constraint
class SketchSolver_ConstraintDistance;
class SketchSolver_ConstraintFixedArcRadius;
-typedef std::map<EntityWrapperPtr, std::set<EntityWrapperPtr>>
- CoincidentPointsMap;
+using CoincidentPointsMap =
+ std::map<EntityWrapperPtr, std::set<EntityWrapperPtr>>;
/** \class SketchSolver_Storage
* \ingroup Plugins
//******************************************************
XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector *theConnector)
- : QObject(), myModule(nullptr), mySalomeConnector(theConnector) {
+ : QObject(), mySalomeConnector(theConnector) {
mySelector = new XGUI_SelectionMgr(this);
myModuleConnector = new XGUI_ModuleConnector(this);
myOperationMgr = new XGUI_OperationMgr(this, myModuleConnector);
AppElements_MainWindow *myMainWindow; ///< desktop window
#endif
- ModuleBase_IModule *myModule; ///< current module
- XGUI_ErrorMgr *myErrorMgr; ///< updator of error message
- XGUI_ObjectsBrowser *myObjectBrowser{0}; ///< data tree widget
+ ModuleBase_IModule *myModule{nullptr}; ///< current module
+ XGUI_ErrorMgr *myErrorMgr; ///< updator of error message
+ XGUI_ObjectsBrowser *myObjectBrowser{nullptr}; ///< data tree widget
XGUI_PropertyPanel *myPropertyPanel{
- 0}; ///< container of feature attributes widgets
- XGUI_FacesPanel *myFacesPanel{0}; ///< panel for hide object faces
- XGUI_SelectionMgr *mySelector; ///< handler of selection processing
+ nullptr}; ///< container of feature attributes widgets
+ XGUI_FacesPanel *myFacesPanel{nullptr}; ///< panel for hide object faces
+ XGUI_SelectionMgr *mySelector; ///< handler of selection processing
XGUI_SelectionActivate
- *mySelectionActivate; /// manager of selection activating
- XGUI_Displayer *myDisplayer{0}; ///< handler of objects display
+ *mySelectionActivate; /// manager of selection activating
+ XGUI_Displayer *myDisplayer{nullptr}; ///< handler of objects display
XGUI_OperationMgr
*myOperationMgr; ///< manager to manipulate through the operations
XGUI_ActionsMgr *myActionsMgr; ///< manager of workshop actions
QIntList myViewerSelMode; ///< selection modes set in the viewer
Config_DataModelReader *myDataModelXMLReader; ///< XML reader of data model
XGUI_InspectionPanel *myInspectionPanel{
- 0}; ///< container of feature attributes widgets
+ nullptr}; ///< container of feature attributes widgets
QTemporaryDir myTmpDir; ///< a direcory for uncompressed files
};