TD: modernize C++: replace 'typedef' with 'using'
This commit is contained in:
@@ -95,7 +95,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::ExtensionPythonT<CosmeticExtension> CosmeticExtensionPython;
|
||||
using CosmeticExtensionPython = App::ExtensionPythonT<CosmeticExtension>;
|
||||
|
||||
} //end namespace TechDraw
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawGeomHatch> DrawGeomHatchPython;
|
||||
using DrawGeomHatchPython = App::FeaturePythonT<DrawGeomHatch>;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawHatch> DrawHatchPython;
|
||||
using DrawHatchPython = App::FeaturePythonT<DrawHatch>;
|
||||
|
||||
} //namespace TechDraw
|
||||
#endif
|
||||
|
||||
@@ -87,7 +87,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawLeaderLine> DrawLeaderLinePython;
|
||||
using DrawLeaderLinePython = App::FeaturePythonT<DrawLeaderLine>;
|
||||
|
||||
} //namespace TechDraw
|
||||
#endif
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
|
||||
#ifndef _DrawPage_h_
|
||||
#define _DrawPage_h_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <boost_signals2.hpp>
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
@@ -122,7 +122,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawPage> DrawPagePython;
|
||||
using DrawPagePython = App::FeaturePythonT<DrawPage>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#ifndef _TECHDRAW_DrawParametricTemplate_h_
|
||||
#define _TECHDRAW_DrawParametricTemplate_h_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/PropertyFile.h>
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
static const char* OrientationEnums[];
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawParametricTemplate> DrawParametricTemplatePython;
|
||||
using DrawParametricTemplatePython = App::FeaturePythonT<DrawParametricTemplate>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawProjectSplit> DrawProjectSplitPython;
|
||||
using DrawProjectSplitPython = App::FeaturePythonT<DrawProjectSplit>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ protected:
|
||||
private:
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawRichAnno> DrawRichAnnoPython;
|
||||
using DrawRichAnnoPython = App::FeaturePythonT<DrawRichAnno>;
|
||||
|
||||
} //namespace TechDraw
|
||||
#endif
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#ifndef _TECHDRAW_DrawSVGTemplate_h_
|
||||
#define _TECHDRAW_DrawSVGTemplate_h_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/PropertyFile.h>
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawSVGTemplate> DrawSVGTemplatePython;
|
||||
using DrawSVGTemplatePython = App::FeaturePythonT<DrawSVGTemplate>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#ifndef _TECHDRAW_DrawTemplate_h_
|
||||
#define _TECHDRAW_DrawTemplate_h_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/FeaturePython.h>
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawTemplate> DrawTemplatePython;
|
||||
using DrawTemplatePython = App::FeaturePythonT<DrawTemplate>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#ifndef _TechDraw_DrawTile_h_
|
||||
#define _TechDraw_DrawTile_h_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
# include <App/DocumentObject.h>
|
||||
# include <App/FeaturePython.h>
|
||||
@@ -62,7 +62,7 @@ protected:
|
||||
private:
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawTile> DrawTilePython;
|
||||
using DrawTilePython = App::FeaturePythonT<DrawTile>;
|
||||
|
||||
} //namespace TechDraw
|
||||
#endif
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#ifndef _TechDraw_DrawTileWeld_h_
|
||||
#define _TechDraw_DrawTileWeld_h_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/FeaturePython.h>
|
||||
@@ -73,7 +73,7 @@ protected:
|
||||
private:
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawTileWeld> DrawTileWeldPython;
|
||||
using DrawTileWeldPython = App::FeaturePythonT<DrawTileWeld>;
|
||||
|
||||
} //namespace TechDraw
|
||||
#endif
|
||||
|
||||
@@ -132,7 +132,7 @@ private:
|
||||
bool m_overrideKeepUpdated;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawView> DrawViewPython;
|
||||
using DrawViewPython = App::FeaturePythonT<DrawView>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ private:
|
||||
static const char* TextStyleEnums[];
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewAnnotation> DrawViewAnnotationPython;
|
||||
using DrawViewAnnotationPython = App::FeaturePythonT<DrawViewAnnotation>;
|
||||
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
void onChanged(const App::Property* prop) override;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewClip> DrawViewClipPython;
|
||||
using DrawViewClipPython = App::FeaturePythonT<DrawViewClip>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ protected:
|
||||
DrawViewSection* m_saveDvs;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewDetail> DrawViewDetailPython;
|
||||
using DrawViewDetailPython = App::FeaturePythonT<DrawViewDetail>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ struct DimRef {
|
||||
std::string sub;
|
||||
};
|
||||
|
||||
typedef std::pair<Base::Vector3d,Base::Vector3d> pointPair;
|
||||
using pointPair = std::pair<Base::Vector3d,Base::Vector3d>;
|
||||
|
||||
struct anglePoints
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
std::string getSVGTail();
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewDraft> DrawViewDraftPython;
|
||||
using DrawViewDraftPython = App::FeaturePythonT<DrawViewDraft>;
|
||||
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
@@ -72,7 +72,7 @@ protected:
|
||||
Base::BoundBox3d bbox;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewImage> DrawViewImagePython;
|
||||
using DrawViewImagePython = App::FeaturePythonT<DrawViewImage>;
|
||||
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
// void getParameters(void);
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewMulti> DrawViewMultiPython;
|
||||
using DrawViewMultiPython = App::FeaturePythonT<DrawViewMulti>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewPart> DrawViewPartPython;
|
||||
using DrawViewPartPython = App::FeaturePythonT<DrawViewPart>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewSection> DrawViewSectionPython;
|
||||
using DrawViewSectionPython = App::FeaturePythonT<DrawViewSection>;
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ protected:
|
||||
private:
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewSpreadsheet> DrawViewSpreadsheetPython;
|
||||
using DrawViewSpreadsheetPython = App::FeaturePythonT<DrawViewSpreadsheet>;
|
||||
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
bool loadQDomDocument(QDomDocument& symbolDocument);
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewSymbol> DrawViewSymbolPython;
|
||||
using DrawViewSymbolPython = App::FeaturePythonT<DrawViewSymbol>;
|
||||
|
||||
|
||||
} //namespace TechDraw
|
||||
|
||||
@@ -69,7 +69,7 @@ protected:
|
||||
private:
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawWeldSymbol> DrawWeldSymbolPython;
|
||||
using DrawWeldSymbolPython = App::FeaturePythonT<DrawWeldSymbol>;
|
||||
|
||||
} //namespace TechDraw
|
||||
#endif
|
||||
|
||||
@@ -177,9 +177,9 @@ bool EdgeWalker::perform()
|
||||
}
|
||||
|
||||
// Test for planarity
|
||||
typedef std::vector< graph_traits<TechDraw::graph>::edge_descriptor > vec_t;
|
||||
using vec_t = std::vector< graph_traits<TechDraw::graph>::edge_descriptor >;
|
||||
std::vector<vec_t> embedding(num_vertices(m_g));
|
||||
typedef std::vector< graph_traits<TechDraw::graph>::edge_descriptor > kura_edges_t;
|
||||
using kura_edges_t = std::vector< graph_traits<TechDraw::graph>::edge_descriptor >;
|
||||
kura_edges_t kEdges;
|
||||
kura_edges_t::iterator ki, ki_end;
|
||||
graph_traits<TechDraw::graph>::edge_descriptor e1;
|
||||
|
||||
@@ -45,32 +45,28 @@
|
||||
namespace TechDraw {
|
||||
//using namespace boost;
|
||||
|
||||
typedef
|
||||
using graph =
|
||||
boost::adjacency_list
|
||||
< boost::vecS,
|
||||
boost::vecS,
|
||||
boost::undirectedS,
|
||||
boost::property<boost::vertex_index_t, int>,
|
||||
boost::property<boost::edge_index_t, int>
|
||||
>
|
||||
graph;
|
||||
>;
|
||||
|
||||
typedef
|
||||
boost::graph_traits < graph >::vertex_descriptor
|
||||
vertex_t;
|
||||
typedef
|
||||
boost::graph_traits < graph >::edge_descriptor
|
||||
edge_t;
|
||||
using vertex_t =
|
||||
boost::graph_traits < graph >::vertex_descriptor;
|
||||
|
||||
typedef
|
||||
std::vector< std::vector<edge_t> >
|
||||
planar_embedding_storage_t;
|
||||
using edge_t =
|
||||
boost::graph_traits < graph >::edge_descriptor;
|
||||
|
||||
typedef
|
||||
using planar_embedding_storage_t =
|
||||
std::vector< std::vector<edge_t> >;
|
||||
|
||||
using planar_embedding_t =
|
||||
boost::iterator_property_map< planar_embedding_storage_t::iterator,
|
||||
boost::property_map<graph, boost::vertex_index_t>::type
|
||||
>
|
||||
planar_embedding_t;
|
||||
>;
|
||||
|
||||
class TechDrawExport WalkerEdge
|
||||
{
|
||||
|
||||
@@ -53,7 +53,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(),
|
||||
|
||||
@@ -121,7 +121,7 @@ protected:
|
||||
|
||||
void onDeleteObject(const App::DocumentObject& obj);
|
||||
|
||||
typedef boost::signals2::connection Connection;
|
||||
using Connection = boost::signals2::connection;
|
||||
Connection connectDeletedObject;
|
||||
|
||||
bool compareSelections(std::vector<Gui::SelectionObject> treeSel,QList<QGraphicsItem*> sceneSel);
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
virtual QIcon extensionMergeGreyableOverlayIcons(const QIcon & orig) const override;
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderExtensionPythonT<TechDrawGui::ViewProviderCosmeticExtension> ViewProviderCosmeticExtensionPython;
|
||||
using ViewProviderCosmeticExtensionPython = Gui::ViewProviderExtensionPythonT<TechDrawGui::ViewProviderCosmeticExtension>;
|
||||
|
||||
} //namespace TechDrawGui
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
void onProgressMessage(const TechDraw::DrawView* dv,
|
||||
const std::string featureName,
|
||||
const std::string text);
|
||||
typedef boost::signals2::scoped_connection Connection;
|
||||
using Connection = boost::signals2::scoped_connection;
|
||||
Connection connectGuiRepaint;
|
||||
Connection connectProgressMessage;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
|
||||
//slots & connections
|
||||
void onGuiRepaint(const TechDraw::DrawPage* dp);
|
||||
typedef boost::signals2::scoped_connection Connection;
|
||||
using Connection = boost::signals2::scoped_connection;
|
||||
Connection connectGuiRepaint;
|
||||
|
||||
void unsetEdit(int ModNum) override;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
Py::Object clearUnitTests (const Py::Tuple&);
|
||||
|
||||
private:
|
||||
typedef PyObject* (*method_varargs_handler)(PyObject *_self, PyObject *_args);
|
||||
using method_varargs_handler = PyObject* (*)(PyObject *_self, PyObject *_args);
|
||||
static method_varargs_handler pycxx_handler;
|
||||
static PyObject *method_varargs_ext_handler(PyObject *_self, PyObject *_args);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user