Implementation of virtual functions is made more consistent in places where warning was issued:
- Missing implementation of virtual method Closed() added in classes inheriting Intf_Polygon2d
- Empty implementation of virtual method Read() accepting stream is moved from PCDM_RetrievalDriver to StdLDrivers_DocumentRetrievalDriver
- Method BRepFill::Delete() is renamed to DeleteProfile() to avoid confusion with method Delete() inherited from MMgt_TShared
- Virtual method AIS_Dimenaion::ComputePlane() is removed from base class; each dimension defines and uses its own method with the same name (but different arguments)
- Inherited virtual method Dump() with single argument in class XCAFDoc_ShapeTool is now defined as short-cut to own method Dump(), also calling parent's one
- Inherited virtual method BoundingBox(void) is made visible in AIS_Shape
- Inherited virtual method Box(void) is made visible in classes inheriting BVH_PrimitiveSet
protected:
- Standard_EXPORT virtual void ComputePlane() Standard_OVERRIDE;
+ Standard_EXPORT virtual void ComputePlane();
//! Checks if the plane includes three angle points to build dimension.
Standard_EXPORT virtual Standard_Boolean CheckPlane (const gp_Pln& thePlane) const Standard_OVERRIDE;
//! 2) The plane should inclide th ecircle center to be valid.
Standard_EXPORT virtual void ComputeAnchorPoint();
- Standard_EXPORT virtual void ComputePlane() Standard_OVERRIDE;
+ Standard_EXPORT virtual void ComputePlane();
//! Checks if the center of the circle is on the plane.
Standard_EXPORT virtual Standard_Boolean CheckPlane (const gp_Pln& thePlane) const Standard_OVERRIDE;
protected: //! @name Behavior to implement
- //! Override this method to compute automatically dimension plane
- //! in which the dimension presentation is built.
- virtual void ComputePlane() { }
-
//! Override this method to check if user-defined plane
//! is valid for the dimension geometry.
//! @param thePlane [in] the working plane for positioning every
protected:
- Standard_EXPORT virtual void ComputePlane() Standard_OVERRIDE;
+ Standard_EXPORT virtual void ComputePlane();
//! Checks if anchor point and the center of the circle are on the plane.
Standard_EXPORT virtual Standard_Boolean CheckPlane (const gp_Pln& thePlane) const Standard_OVERRIDE;
//! compound topological shapes for presentation.
Standard_EXPORT virtual const Bnd_Box& BoundingBox();
+ //! AIS_InteractiveObject defines another virtual method BoundingBox,
+ //! which is not the same as above; keep it visible.
+ using AIS_InteractiveObject::BoundingBox;
+
//! Returns the NameOfColor attributes of the shape accordingly to
//! the current facing model;
Standard_EXPORT virtual Quantity_NameOfColor Color() const Standard_OVERRIDE;
//! Returns AABB of the given triangle.
BVH_Box<Standard_Real, 3> Box (const Standard_Integer theIndex) const Standard_OVERRIDE;
+ //! Make inherited method Box() visible to avoid CLang warning
+ using BVH_PrimitiveSet<Standard_Real, 3>::Box;
+
//! Returns centroid position along specified axis.
Standard_Real Center (const Standard_Integer theIndex, const Standard_Integer theAxis) const Standard_OVERRIDE;
const Standard_Boolean WithContact,
const Standard_Boolean WithCorrection)
{
- Delete(Profile); // No duplication
+ DeleteProfile(Profile); // No duplication
if (myIsAutomaticLaw)
{
mySeq.Clear();
//function : Delete
//purpose : Delete a section
//=======================================================================
- void BRepFill_PipeShell::Delete(const TopoDS_Shape& Profile)
+ void BRepFill_PipeShell::DeleteProfile(const TopoDS_Shape& Profile)
{
Standard_Boolean isVertex = (Profile.ShapeType() == TopAbs_VERTEX);
Standard_EXPORT void SetLaw (const TopoDS_Shape& Profile, const Handle(Law_Function)& L, const TopoDS_Vertex& Location, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False);
//! Delete an section.
- Standard_EXPORT void Delete (const TopoDS_Shape& Profile);
+ Standard_EXPORT void DeleteProfile (const TopoDS_Shape& Profile);
//! Say if <me> is ready to build the shape
//! return False if <me> do not have section definition
void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
{
- myPipe->Delete(Profile);
+ myPipe->DeleteProfile(Profile);
}
void Closed (const Standard_Boolean clos);
+ //! Returns True if the polyline is closed.
+ virtual Standard_Boolean Closed () const Standard_OVERRIDE { return ClosedPolygon; }
+
//! Give the number of Segments in the polyline.
virtual Standard_Integer NbSegments() const Standard_OVERRIDE;
void Closed (const Standard_Boolean clos);
+ //! Returns True if the polyline is closed.
+ virtual Standard_Boolean Closed () const Standard_OVERRIDE { return ClosedPolygon; }
+
//! Give the number of Segments in the polyline.
virtual Standard_Integer NbSegments() const Standard_OVERRIDE;
IMPLEMENT_STANDARD_RTTIEXT(PCDM_RetrievalDriver,PCDM_Reader)
-//=======================================================================
-//function : Read
-//purpose :
-//=======================================================================
-void PCDM_RetrievalDriver::Read(Standard_IStream& /*theIStream*/,
- const Handle(Storage_Data)& /*theStorageData*/,
- const Handle(CDM_Document)& /*theDoc*/,
- const Handle(CDM_Application)& /*theApplication*/)
-{
-
-}
-
void PCDM_RetrievalDriver::References(const TCollection_ExtendedString& aFileName, PCDM_SequenceOfReference& theReferences, const Handle(CDM_MessageDriver)& theMsgDriver)
{ PCDM_ReadWriter::Reader(aFileName)->ReadReferences(aFileName, theReferences, theMsgDriver);}
const TCollection_ExtendedString& theFileName,
const Handle(CDM_MessageDriver)& theMsgDriver);
- Standard_EXPORT virtual void Read (Standard_IStream& theIStream,
- const Handle(Storage_Data)& theStorageData,
- const Handle(CDM_Document)& theDoc,
- const Handle(CDM_Application)& theApplication) Standard_OVERRIDE;
-
Standard_EXPORT void SetFormat (const TCollection_ExtendedString& aformat);
Standard_EXPORT TCollection_ExtendedString GetFormat() const;
//! Returns bounding box of sensitive with index theIdx
Standard_EXPORT virtual Select3D_BndBox3d Box (const Standard_Integer theIdx) const Standard_OVERRIDE;
+ //! Make inherited method Box() visible to avoid CLang warning
+ using BVH_PrimitiveSet<Standard_Real, 3>::Box;
+
//! Returns center of sensitive with index theIdx in the set along the
//! given axis theAxis
Standard_EXPORT virtual Standard_Real Center (const Standard_Integer theIdx,
//! Returns bounding box of object with index theIndex
Standard_EXPORT virtual Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE;
+ //! Make inherited method Box() visible to avoid CLang warning
+ using BVH_PrimitiveSet<Standard_Real, 3>::Box;
+
//! Returns center of object with index theIndex in the set
//! along the given axis theAxis
Standard_EXPORT virtual Standard_Real Center (const Standard_Integer theIndex,
//! Returns bounding box of entity with index theIdx
Standard_EXPORT virtual Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE;
+ //! Make inherited method Box() visible to avoid CLang warning
+ using BVH_PrimitiveSet<Standard_Real, 3>::Box;
+
//! Returns geometry center of sensitive entity index theIdx
//! along the given axis theAxis
Standard_EXPORT virtual Standard_Real Center (const Standard_Integer theIndex,
#include <PCDM_ReadWriter.hxx>
#include <Standard_ErrorHandler.hxx>
+#include <Standard_NotImplemented.hxx>
#include <NCollection_Array1.hxx>
#include <TDocStd_Document.hxx>
theNewDocument->SetComments (hData.Comments());
}
+//=======================================================================
+//function : Read
+//purpose : not implemented
+//=======================================================================
+
+void StdLDrivers_DocumentRetrievalDriver::Read (Standard_IStream& /*theIStream*/,
+ const Handle(Storage_Data)& /*theStorageData*/,
+ const Handle(CDM_Document)& /*theDoc*/,
+ const Handle(CDM_Application)& /*theApplication*/)
+{
+ Standard_NotImplemented::Raise ("Reading from stream is not supported by StdLDrivers_DocumentRetrievalDriver");
+}
+
//=======================================================================
//function : RaiseOnStorageError
//purpose : Update the reader status and raise an exception
const Handle(CDM_Document)& theNewDocument,
const Handle(CDM_Application)& theApplication) Standard_OVERRIDE;
+ //! Override pure virtual method (raises exception Standard_NotImplemented)
+ Standard_EXPORT virtual void Read (Standard_IStream& theIStream,
+ const Handle(Storage_Data)& theStorageData,
+ const Handle(CDM_Document)& theDoc,
+ const Handle(CDM_Application)& theApplication) Standard_OVERRIDE;
+
DEFINE_STANDARD_RTTIEXT (StdLDrivers_DocumentRetrievalDriver, PCDM_RetrievalDriver)
private:
//purpose :
//=======================================================================
-void XCAFDoc_ShapeTool::Dump(Standard_OStream& theDumpLog, const Standard_Boolean deep) const
+Standard_OStream& XCAFDoc_ShapeTool::Dump(Standard_OStream& theDumpLog, const Standard_Boolean deep) const
{
Standard_Integer level = 0;
// TopTools_SequenceOfShape SeqShapes;
DumpShape(theDumpLog, SeqLabels.Value(i), level, deep);
theDumpLog<<endl;
}
+ return theDumpLog;
+}
+
+//=======================================================================
+//function : Dump
+//purpose : override
+//=======================================================================
+
+Standard_OStream& XCAFDoc_ShapeTool::Dump(Standard_OStream& theDumpLog) const
+{
+ TDF_Attribute::Dump (theDumpLog);
+ Dump (theDumpLog, Standard_False);
+ return theDumpLog;
}
//=======================================================================
//! returns the label under which shapes are stored
Standard_EXPORT TDF_Label BaseLabel() const;
- Standard_EXPORT void Dump (Standard_OStream& theDumpLog, const Standard_Boolean deep = Standard_False) const;
-
+ Standard_EXPORT Standard_OStream& Dump (Standard_OStream& theDumpLog, const Standard_Boolean deep) const;
+
+ Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& theDumpLog) const Standard_OVERRIDE;
+
//! Print to ostream <theDumpLog> type of shape found on <L> label
//! and the entry of <L>, with <level> tabs before.
//! If <deep>, print also TShape and Location addresses