Mod: modernize C++: replace 'typedef' with 'using'
This commit is contained in:
@@ -67,7 +67,7 @@ protected:
|
||||
//@}
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FeatureView> FeatureViewPython;
|
||||
using FeatureViewPython = App::FeaturePythonT<FeatureView>;
|
||||
|
||||
} //namespace Drawing
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FeatureViewAnnotation> FeatureViewAnnotationPython;
|
||||
using FeatureViewAnnotationPython = App::FeaturePythonT<FeatureViewAnnotation>;
|
||||
|
||||
|
||||
} //namespace Drawing
|
||||
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
static App::PropertyFloatConstraint::Constraints floatRange;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FeatureViewPart> FeatureViewPartPython;
|
||||
using FeatureViewPartPython = App::FeaturePythonT<FeatureViewPart>;
|
||||
|
||||
|
||||
} //namespace Drawing
|
||||
|
||||
@@ -66,7 +66,7 @@ protected:
|
||||
void onChanged(const App::Property* prop);
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FeatureViewSymbol> FeatureViewSymbolPython;
|
||||
using FeatureViewSymbolPython = App::FeaturePythonT<FeatureViewSymbol>;
|
||||
|
||||
|
||||
} //namespace Drawing
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
WithHidden = 1,
|
||||
WithSmooth = 2
|
||||
};
|
||||
typedef std::map<std::string,std::string> XmlAttributes;
|
||||
using XmlAttributes = std::map<std::string,std::string>;
|
||||
|
||||
std::string getSVG(ExtractionType type, double tolerance=0.05,
|
||||
XmlAttributes V_style=XmlAttributes(),
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
//@}
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderDrawingView> ViewProviderDrawingViewPython;
|
||||
using ViewProviderDrawingViewPython = Gui::ViewProviderPythonFeatureT<ViewProviderDrawingView>;
|
||||
|
||||
class DrawingGuiExport ViewProviderDrawingClip : public Gui::ViewProviderDocumentObjectGroup
|
||||
{
|
||||
|
||||
@@ -91,8 +91,8 @@ class FemExport DocumentObject : public App::DocumentObject
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(Fem::DocumentObject);
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FemAnalysis> FemAnalysisPython;
|
||||
typedef App::FeaturePythonT<DocumentObject> FeaturePython;
|
||||
using FemAnalysisPython = App::FeaturePythonT<FemAnalysis>;
|
||||
using FeaturePython = App::FeaturePythonT<DocumentObject>;
|
||||
|
||||
|
||||
} //namespace Fem
|
||||
|
||||
@@ -243,7 +243,7 @@ protected:
|
||||
const Base::Vector3d getDirection(const App::PropertyLinkSub &direction);
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<Constraint> ConstraintPython;
|
||||
using ConstraintPython = App::FeaturePythonT<Constraint>;
|
||||
|
||||
|
||||
} //namespace Fem
|
||||
|
||||
@@ -1166,7 +1166,7 @@ protected:
|
||||
std::vector<int> elements;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<NastranElement> NastranElementPtr;
|
||||
using NastranElementPtr = std::shared_ptr<NastranElement>;
|
||||
|
||||
class GRIDElement : public NastranElement {
|
||||
void addToMesh(SMESHDS_Mesh* meshds) override {
|
||||
@@ -2018,9 +2018,9 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group
|
||||
}
|
||||
|
||||
// get all data --> Extract Nodes and Elements of the current SMESH datastructure
|
||||
typedef std::map<int, Base::Vector3d> VertexMap;
|
||||
typedef std::map<int, std::vector<int> > NodesMap;
|
||||
typedef std::map<std::string, NodesMap> ElementsMap;
|
||||
using VertexMap = std::map<int, Base::Vector3d>;
|
||||
using NodesMap = std::map<int, std::vector<int> >;
|
||||
using ElementsMap = std::map<std::string, NodesMap>;
|
||||
|
||||
// get nodes
|
||||
VertexMap vertexMap; // empty nodes map
|
||||
@@ -2660,7 +2660,7 @@ int FemMesh::addGroup(const std::string TypeString, const std::string Name, cons
|
||||
{
|
||||
// define mapping between typestring and ElementType
|
||||
// TODO: remove code doubling by providing mappings for all FemMesh functions
|
||||
typedef std::map<std::string, SMDSAbs_ElementType> string_eltype_map;
|
||||
using string_eltype_map = std::map<std::string, SMDSAbs_ElementType>;
|
||||
string_eltype_map mapping;
|
||||
mapping["All"] = SMDSAbs_All;
|
||||
mapping["Node"] = SMDSAbs_Node;
|
||||
|
||||
@@ -45,7 +45,7 @@ class TopoDS_Solid;
|
||||
namespace Fem
|
||||
{
|
||||
|
||||
typedef std::shared_ptr<SMESH_Hypothesis> SMESH_HypothesisPtr;
|
||||
using SMESH_HypothesisPtr = std::shared_ptr<SMESH_Hypothesis>;
|
||||
|
||||
/** The representation of a FemMesh
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ protected:
|
||||
void onChanged (const App::Property* prop) override;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FemMeshObject> FemMeshObjectPython;
|
||||
using FemMeshObjectPython = App::FeaturePythonT<FemMeshObject>;
|
||||
|
||||
|
||||
} //namespace Fem
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
PyObject *getPyObject() override;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FemResultObject> FemResultObjectPython;
|
||||
using FemResultObjectPython = App::FeaturePythonT<FemResultObject>;
|
||||
|
||||
|
||||
} //namespace Fem
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<FemSolverObject> FemSolverObjectPython;
|
||||
using FemSolverObjectPython = App::FeaturePythonT<FemSolverObject>;
|
||||
|
||||
} //namespace Fem
|
||||
|
||||
|
||||
@@ -318,8 +318,8 @@ Py::Object StdMeshers_AutomaticLengthPy::getFineness(const Py::Tuple& args)
|
||||
}
|
||||
|
||||
namespace Py {
|
||||
typedef ExtensionObject<Fem::FemMeshPy> FemMesh;
|
||||
typedef ExtensionObject<Part::TopoShapePy> TopoShape;
|
||||
using FemMesh = ExtensionObject<Fem::FemMeshPy>;
|
||||
using TopoShape = ExtensionObject<Part::TopoShapePy>;
|
||||
template<> bool FemMesh::accepts (PyObject *pyob) const
|
||||
{
|
||||
return (pyob && PyObject_TypeCheck(pyob, &(Fem::FemMeshPy::Type)));
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Fem {
|
||||
class HypothesisPy : public Py::PythonExtension<HypothesisPy>
|
||||
{
|
||||
public:
|
||||
typedef Py::PythonExtension<HypothesisPy> HypothesisPyBase;
|
||||
using HypothesisPyBase = Py::PythonExtension<HypothesisPy>;
|
||||
explicit HypothesisPy(std::shared_ptr<SMESH_Hypothesis>);
|
||||
~HypothesisPy() override;
|
||||
std::shared_ptr<SMESH_Hypothesis> getHypothesis() const
|
||||
@@ -45,13 +45,13 @@ private:
|
||||
std::shared_ptr<SMESH_Hypothesis> hyp;
|
||||
};
|
||||
|
||||
typedef Py::ExtensionObject<HypothesisPy> Hypothesis;
|
||||
using Hypothesis = Py::ExtensionObject<HypothesisPy>;
|
||||
|
||||
template <class T>
|
||||
class SMESH_HypothesisPy : public Py::PythonExtension<T>
|
||||
{
|
||||
public:
|
||||
typedef SMESH_HypothesisPy<T> SMESH_HypothesisPyBase;
|
||||
using SMESH_HypothesisPyBase = SMESH_HypothesisPy<T>;
|
||||
static void init_type(PyObject*); // announce properties and methods
|
||||
|
||||
explicit SMESH_HypothesisPy(SMESH_Hypothesis*);
|
||||
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
ViewProviderFemHighlighter extension;
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderFemAnalysis> ViewProviderFemAnalysisPython;
|
||||
using ViewProviderFemAnalysisPython = Gui::ViewProviderPythonFeatureT<ViewProviderFemAnalysis>;
|
||||
|
||||
} //namespace FemGui
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ protected:
|
||||
static QObject* findChildByName(const QObject* parent, const QString& name);
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderFemConstraint> ViewProviderFemConstraintPython;
|
||||
using ViewProviderFemConstraintPython = Gui::ViewProviderPythonFeatureT<ViewProviderFemConstraint>;
|
||||
|
||||
|
||||
} //namespace FemGui
|
||||
|
||||
@@ -166,7 +166,7 @@ private:
|
||||
class Private;
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderFemMesh> ViewProviderFemMeshPython;
|
||||
using ViewProviderFemMeshPython = Gui::ViewProviderPythonFeatureT<ViewProviderFemMesh>;
|
||||
|
||||
|
||||
} //namespace FemGui
|
||||
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
|
||||
private:
|
||||
std::set<ViewProviderFemPostObject*> views;
|
||||
typedef boost::signals2::scoped_connection Connection;
|
||||
using Connection = boost::signals2::scoped_connection;
|
||||
Connection connectSelection;
|
||||
};
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
{ return true; }
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderResult> ViewProviderResultPython;
|
||||
using ViewProviderResultPython = Gui::ViewProviderPythonFeatureT<ViewProviderResult>;
|
||||
|
||||
} //namespace FemGui
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
bool canDelete(App::DocumentObject* obj) const override;
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderSolver> ViewProviderSolverPython;
|
||||
using ViewProviderSolverPython = Gui::ViewProviderPythonFeatureT<ViewProviderSolver>;
|
||||
|
||||
} //namespace FemGui
|
||||
|
||||
|
||||
@@ -170,8 +170,8 @@ private:
|
||||
class ImportExport ExportOCAF2
|
||||
{
|
||||
public:
|
||||
typedef std::function<std::map<std::string,App::Color>(
|
||||
App::DocumentObject*, const char*)> GetShapeColorsFunc;
|
||||
using GetShapeColorsFunc = std::function<std::map<std::string,App::Color>(
|
||||
App::DocumentObject*, const char*)>;
|
||||
explicit ExportOCAF2(Handle(TDocStd_Document) h, GetShapeColorsFunc func=GetShapeColorsFunc());
|
||||
|
||||
void setExportHiddenObject(bool enable) {exportHidden=enable;}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace InspectionGui {
|
||||
*/
|
||||
class ViewProviderInspection : public Gui::ViewProviderDocumentObject,
|
||||
public Base::Observer<int>{
|
||||
typedef ViewProviderDocumentObject inherited;
|
||||
using inherited = ViewProviderDocumentObject;
|
||||
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(InspectionGui::ViewProviderInspection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user