mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0027241: Create a complete test case to verify reading of all attribute types from MDTV-Standard document
Added test case that works in one of two modes: 1) create synthetic document (in old version of OCCT) containing all possible attributes. 2) open the document and compare all attributes with expected values. Fixed reading of TDataStd_NamedData, TDataXtd_PatternStd, and PColStd_HArray2OfReal. Point and curve representations are created even from NULL geometry handles. The code is simplified by abandoning usage of templates from StdObjMgt_ContentTypes class for persistent data elements. Fixed SetAsciiString Draw command failed when the target label contained NamedData attribute.
This commit is contained in:
@@ -16,7 +16,12 @@
|
||||
#define _ShapePersistent_Geom_HeaderFile
|
||||
|
||||
#include <StdObjMgt_SharedObject.hxx>
|
||||
#include <StdObject_gp.hxx>
|
||||
|
||||
#include <StdObject_gp_Vectors.hxx>
|
||||
#include <StdObject_gp_Axes.hxx>
|
||||
#include <StdObject_gp_Curves.hxx>
|
||||
#include <StdObject_gp_Surfaces.hxx>
|
||||
#include <StdObject_gp_Trsfs.hxx>
|
||||
|
||||
#include <Geom_CartesianPoint.hxx>
|
||||
#include <Geom_Direction.hxx>
|
||||
@@ -52,7 +57,16 @@ protected:
|
||||
};
|
||||
|
||||
template <class Base, class GpData>
|
||||
struct subBase_gp : subBase <Base, StdObject_gp::Object<GpData> > {};
|
||||
struct subBase_gp : public Base
|
||||
{
|
||||
public:
|
||||
//! Read persistent data from a file.
|
||||
Standard_EXPORT virtual void Read (StdObjMgt_ReadData& theReadData)
|
||||
{
|
||||
GpData aData;
|
||||
theReadData >> aData;
|
||||
}
|
||||
};
|
||||
|
||||
template <class Base>
|
||||
struct subBase_empty : Base {};
|
||||
@@ -64,7 +78,7 @@ protected:
|
||||
//! Read persistent data from a file.
|
||||
Standard_EXPORT virtual void Read (StdObjMgt_ReadData& theReadData)
|
||||
{
|
||||
StdObject_gp::Object<Data> aData;
|
||||
Data aData;
|
||||
theReadData >> aData;
|
||||
this->myTransient = new Target (aData);
|
||||
}
|
||||
|
Reference in New Issue
Block a user