remove deprecated std::binary_function
This commit is contained in:
@@ -34,8 +34,7 @@
|
||||
#include "Tools.h"
|
||||
|
||||
namespace Base {
|
||||
struct string_comp : public std::binary_function<std::string,
|
||||
std::string, bool>
|
||||
struct string_comp
|
||||
{
|
||||
// s1 and s2 must be numbers represented as string
|
||||
bool operator()(const std::string& s1, const std::string& s2)
|
||||
|
||||
@@ -102,8 +102,7 @@ typedef MeshPointArray::_TConstIterator VertexIterator;
|
||||
* '==' operator of MeshPoint) we use the same operator when comparing the
|
||||
* points in the function object.
|
||||
*/
|
||||
struct Vertex_EqualTo : public std::binary_function<const VertexIterator&,
|
||||
const VertexIterator&, bool>
|
||||
struct Vertex_EqualTo
|
||||
{
|
||||
bool operator()(const VertexIterator& x,
|
||||
const VertexIterator& y) const
|
||||
@@ -116,8 +115,7 @@ struct Vertex_EqualTo : public std::binary_function<const VertexIterator&,
|
||||
}
|
||||
};
|
||||
|
||||
struct Vertex_Less : public std::binary_function<const VertexIterator&,
|
||||
const VertexIterator&, bool>
|
||||
struct Vertex_Less
|
||||
{
|
||||
bool operator()(const VertexIterator& x,
|
||||
const VertexIterator& y) const
|
||||
@@ -277,8 +275,7 @@ typedef MeshFacetArray::_TConstIterator FaceIterator;
|
||||
/*
|
||||
* The facet with the lowset index is regarded as 'less'.
|
||||
*/
|
||||
struct MeshFacet_Less : public std::binary_function<const FaceIterator&,
|
||||
const FaceIterator&, bool>
|
||||
struct MeshFacet_Less
|
||||
{
|
||||
bool operator()(const FaceIterator& x,
|
||||
const FaceIterator& y) const
|
||||
@@ -319,8 +316,7 @@ struct MeshFacet_Less : public std::binary_function<const FaceIterator&,
|
||||
* Two facets are equal if all its three point indices refer to the same
|
||||
* location in the point array of the mesh kernel they belong to.
|
||||
*/
|
||||
struct MeshFacet_EqualTo : public std::binary_function<const FaceIterator&,
|
||||
const FaceIterator&, bool>
|
||||
struct MeshFacet_EqualTo
|
||||
{
|
||||
bool operator()(const FaceIterator& x,
|
||||
const FaceIterator& y) const
|
||||
|
||||
@@ -1075,9 +1075,12 @@ inline bool MeshFacet::IsEqual (const MeshFacet& rcFace) const
|
||||
* Binary function to query the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshIsFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshIsFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ return rclElem.IsFlag(tFlag); }
|
||||
};
|
||||
@@ -1086,9 +1089,12 @@ public:
|
||||
* Binary function to query the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshIsNotFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshIsNotFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ return !rclElem.IsFlag(tFlag); }
|
||||
};
|
||||
@@ -1097,9 +1103,12 @@ public:
|
||||
* Binary function to set the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshSetFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshSetFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ rclElem.SetFlag(tFlag); return true; }
|
||||
};
|
||||
@@ -1108,9 +1117,12 @@ public:
|
||||
* Binary function to reset the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshResetFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshResetFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ rclElem.ResetFlag(tFlag); return true; }
|
||||
};
|
||||
|
||||
@@ -312,8 +312,7 @@ struct Edge_Index
|
||||
unsigned long p0, p1, f;
|
||||
};
|
||||
|
||||
struct Edge_Less : public std::binary_function<const Edge_Index&,
|
||||
const Edge_Index&, bool>
|
||||
struct Edge_Less
|
||||
{
|
||||
bool operator()(const Edge_Index& x, const Edge_Index& y) const
|
||||
{
|
||||
|
||||
@@ -119,8 +119,7 @@ struct QUAD {int iV[4];};
|
||||
|
||||
namespace MeshCore {
|
||||
|
||||
struct Color_Less : public std::binary_function<const App::Color&,
|
||||
const App::Color&, bool>
|
||||
struct Color_Less
|
||||
{
|
||||
bool operator()(const App::Color& x,
|
||||
const App::Color& y) const
|
||||
@@ -759,9 +758,12 @@ namespace MeshCore {
|
||||
enum Number {
|
||||
int8, uint8, int16, uint16, int32, uint32, float32, float64
|
||||
};
|
||||
struct Property : public std::binary_function<std::pair<std::string, Number>,
|
||||
std::string, bool>
|
||||
struct Property
|
||||
{
|
||||
typedef std::pair<std::string, int> first_argument_type;
|
||||
typedef std::string second_argument_type;
|
||||
typedef bool result_type;
|
||||
|
||||
bool operator()(const std::pair<std::string, int>& x,
|
||||
const std::string& y) const
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
inline bool TriangleCutsSphere (const MeshFacet &rclF) const;
|
||||
bool ExpandRadius (unsigned long ulMinPoints);
|
||||
|
||||
struct CDistRad : public std::binary_function<const Base::Vector3f&, const Base::Vector3f&, bool>
|
||||
struct CDistRad
|
||||
{
|
||||
CDistRad (const Base::Vector3f clCenter) : _clCenter(clCenter) {}
|
||||
bool operator()(const Base::Vector3f &rclPt1, const Base::Vector3f &rclPt2) { return Base::DistanceP2(_clCenter, rclPt1) < Base::DistanceP2(_clCenter, rclPt2); }
|
||||
|
||||
@@ -303,8 +303,7 @@ private:
|
||||
MeshKernel& _rclMesh;
|
||||
bool _needsCleanup;
|
||||
|
||||
struct Vertex_Less : public std::binary_function<const Base::Vector3f&,
|
||||
const Base::Vector3f&, bool>
|
||||
struct Vertex_Less
|
||||
{
|
||||
bool operator()(const Base::Vector3f& x, const Base::Vector3f& y) const;
|
||||
};
|
||||
@@ -344,8 +343,7 @@ public:
|
||||
|
||||
protected:
|
||||
// for sorting of elements
|
||||
struct CNofFacetsCompare : public std::binary_function<const std::vector<unsigned long>&,
|
||||
const std::vector<unsigned long>&, bool>
|
||||
struct CNofFacetsCompare
|
||||
{
|
||||
bool operator () (const std::vector<unsigned long> &rclC1,
|
||||
const std::vector<unsigned long> &rclC2)
|
||||
|
||||
@@ -598,7 +598,7 @@ bool QuasiDelaunayTriangulator::Triangulate()
|
||||
|
||||
namespace MeshCore {
|
||||
namespace Triangulation {
|
||||
struct Vertex2d_Less : public std::binary_function<const Base::Vector3f&, const Base::Vector3f&, bool>
|
||||
struct Vertex2d_Less
|
||||
{
|
||||
bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const
|
||||
{
|
||||
@@ -608,7 +608,7 @@ struct Vertex2d_Less : public std::binary_function<const Base::Vector3f&, const
|
||||
} else return p.x < q.x;
|
||||
}
|
||||
};
|
||||
struct Vertex2d_EqualTo : public std::binary_function<const Base::Vector3f&, const Base::Vector3f&, bool>
|
||||
struct Vertex2d_EqualTo
|
||||
{
|
||||
bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const
|
||||
{
|
||||
|
||||
@@ -415,8 +415,7 @@ void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n)
|
||||
|
||||
namespace MeshGui {
|
||||
// for sorting of elements
|
||||
struct NofFacetsCompare : public std::binary_function<const std::vector<unsigned long>&,
|
||||
const std::vector<unsigned long>&, bool>
|
||||
struct NofFacetsCompare
|
||||
{
|
||||
bool operator () (const std::vector<unsigned long> &rclC1,
|
||||
const std::vector<unsigned long> &rclC2)
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct TopoDSLess : public std::binary_function<T, T, bool> {
|
||||
struct TopoDSLess {
|
||||
bool operator()(const T& x, const T& y) const {
|
||||
return x.HashCode(INT_MAX-1) < y.HashCode(INT_MAX-1);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,7 @@ public: //in Extrusion, they used to be private. but they are also used by PartD
|
||||
/**
|
||||
* @brief The Wire_Compare class is for sorting wires by bounding box diagonal length
|
||||
*/
|
||||
class Wire_Compare : public std::binary_function<const TopoDS_Wire&,
|
||||
const TopoDS_Wire&, bool>
|
||||
class Wire_Compare
|
||||
{
|
||||
public:
|
||||
bool operator() (const TopoDS_Wire& w1, const TopoDS_Wire& w2);
|
||||
|
||||
@@ -884,8 +884,7 @@ void ProfileBased::remapSupportShape(const TopoDS_Shape& newShape)
|
||||
}
|
||||
|
||||
namespace PartDesign {
|
||||
struct gp_Pnt_Less : public std::binary_function<const gp_Pnt&,
|
||||
const gp_Pnt&, bool>
|
||||
struct gp_Pnt_Less
|
||||
{
|
||||
bool operator()(const gp_Pnt& p1,
|
||||
const gp_Pnt& p2) const
|
||||
|
||||
@@ -68,8 +68,7 @@ struct SketchAnalysis::VertexIds {
|
||||
Sketcher::PointPos PosId;
|
||||
};
|
||||
|
||||
struct SketchAnalysis::Vertex_Less : public std::binary_function<const VertexIds&,
|
||||
const VertexIds&, bool>
|
||||
struct SketchAnalysis::Vertex_Less
|
||||
{
|
||||
Vertex_Less(double tolerance) : tolerance(tolerance){}
|
||||
bool operator()(const VertexIds& x,
|
||||
@@ -87,8 +86,7 @@ private:
|
||||
double tolerance;
|
||||
};
|
||||
|
||||
struct SketchAnalysis::Vertex_EqualTo : public std::binary_function<const VertexIds&,
|
||||
const VertexIds&, bool>
|
||||
struct SketchAnalysis::Vertex_EqualTo
|
||||
{
|
||||
Vertex_EqualTo(double tolerance) : tolerance(tolerance){}
|
||||
bool operator()(const VertexIds& x,
|
||||
@@ -112,8 +110,7 @@ struct SketchAnalysis::EdgeIds {
|
||||
int GeoId;
|
||||
};
|
||||
|
||||
struct SketchAnalysis::Edge_Less : public std::binary_function<const EdgeIds&,
|
||||
const EdgeIds&, bool>
|
||||
struct SketchAnalysis::Edge_Less
|
||||
{
|
||||
Edge_Less(double tolerance) : tolerance(tolerance){}
|
||||
bool operator()(const EdgeIds& x,
|
||||
@@ -127,8 +124,7 @@ private:
|
||||
double tolerance;
|
||||
};
|
||||
|
||||
struct SketchAnalysis::Edge_EqualTo : public std::binary_function<const EdgeIds&,
|
||||
const EdgeIds&, bool>
|
||||
struct SketchAnalysis::Edge_EqualTo
|
||||
{
|
||||
Edge_EqualTo(double tolerance) : tolerance(tolerance){}
|
||||
bool operator()(const EdgeIds& x,
|
||||
|
||||
Reference in New Issue
Block a user