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:
myn
2016-03-11 22:08:01 +03:00
committed by abv
parent 944d808cd0
commit 45d8465ea2
82 changed files with 1524 additions and 1333 deletions

View File

@@ -16,6 +16,8 @@
#define _ShapePersistent_HArray1_HeaderFile
#include <StdLPersistent_HArray1.hxx>
#include <StdObject_gp_Vectors.hxx>
#include <StdObject_gp_Curves.hxx>
#include <TColgp_HArray1OfXYZ.hxx>
#include <TColgp_HArray1OfPnt.hxx>
@@ -32,13 +34,6 @@
class ShapePersistent_HArray1 : private StdLPersistent_HArray1
{
template <class ArrayClass>
class instance : public StdLPersistent_HArray1::base<ArrayClass>
{
virtual void readValue (StdObjMgt_ReadData& theReadData,
const Standard_Integer theIndex);
};
public:
typedef instance<TColgp_HArray1OfXYZ> XYZ;
typedef instance<TColgp_HArray1OfPnt> Pnt;
@@ -53,4 +48,13 @@ public:
typedef instance<Poly_HArray1OfTriangle> Triangle;
};
inline StdObjMgt_ReadData& operator >>
(StdObjMgt_ReadData& theReadData, Poly_Triangle& theTriangle)
{
Standard_Integer N1, N2, N3;
theReadData >> N1 >> N2 >> N3;
theTriangle.Set (N1, N2, N3);
return theReadData;
}
#endif