summaryrefslogtreecommitdiff
path: root/drv/StdSchema/StdSchema_PTopoDS_Shape1.cxx
blob: b5b0f0fef9e4e6f7f88852733d39449baf6d7240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _StdSchema_PTopoDS_Shape1_HeaderFile
#include <StdSchema_PTopoDS_Shape1.hxx>
#endif
#ifndef _PTopoDS_Shape1_HeaderFile
#include <PTopoDS_Shape1.hxx>
#endif
#include <StdSchema_PTopoDS_Shape1.ixx>
#ifndef _Storage_Schema_HeaderFile
#include <Storage_Schema.hxx>
#endif
#ifndef _Storage_stCONSTclCOM_HeaderFile
#include <Storage_stCONSTclCOM.hxx>
#endif

void StdSchema_PTopoDS_Shape1::SAdd(const PTopoDS_Shape1& p, const Handle(Storage_Schema)& theSchema)
{
     theSchema->PersistentToAdd(p._CSFDB_GetPTopoDS_Shape1myTShape());
   StdSchema_PTopLoc_Location::SAdd(p._CSFDB_GetPTopoDS_Shape1myLocation(),theSchema);

}

void StdSchema_PTopoDS_Shape1::SWrite(const PTopoDS_Shape1& pp, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema)
{
  f.BeginWriteObjectData();
    theSchema->WritePersistentReference(pp._CSFDB_GetPTopoDS_Shape1myTShape(),f);
    StdSchema_PTopLoc_Location::SWrite(pp._CSFDB_GetPTopoDS_Shape1myLocation(),f,theSchema);
  f.PutInteger(pp._CSFDB_GetPTopoDS_Shape1myOrient());

  f.EndWriteObjectData();
}

void StdSchema_PTopoDS_Shape1::SRead(PTopoDS_Shape1& pp, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema)
{
  f.BeginReadObjectData();

    Handle(PTopoDS_TShape1) PTopoDS_Shape1myTShape;

    theSchema->ReadPersistentReference(PTopoDS_Shape1myTShape,f);
    pp._CSFDB_SetPTopoDS_Shape1myTShape(PTopoDS_Shape1myTShape);

    StdSchema_PTopLoc_Location::SRead((PTopLoc_Location&)pp._CSFDB_GetPTopoDS_Shape1myLocation(),f,theSchema);

    TopAbs_Orientation PTopoDS_Shape1myOrient;
    Standard_Integer i_CSFDB_PTopoDS_Shape1myOrient;
    f.GetInteger(i_CSFDB_PTopoDS_Shape1myOrient);
    PTopoDS_Shape1myOrient = (TopAbs_Orientation)i_CSFDB_PTopoDS_Shape1myOrient;
    pp._CSFDB_SetPTopoDS_Shape1myOrient(PTopoDS_Shape1myOrient);

  f.EndReadObjectData();
}