summaryrefslogtreecommitdiff
path: root/drv/XCAFSchema/XCAFSchema_PTopLoc_ItemLocation.cxx
blob: 220189b2f9e6d9dd1b19bb572cea5268c188147e (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef _XCAFSchema_PTopLoc_ItemLocation_HeaderFile
#include <XCAFSchema_PTopLoc_ItemLocation.hxx>
#endif
#ifndef _PTopLoc_ItemLocation_HeaderFile
#include <PTopLoc_ItemLocation.hxx>
#endif
#include <XCAFSchema_PTopLoc_ItemLocation.ixx>
#ifndef _Storage_Schema_HeaderFile
#include <Storage_Schema.hxx>
#endif
#ifndef _Storage_stCONSTclCOM_HeaderFile
#include <Storage_stCONSTclCOM.hxx>
#endif

IMPLEMENT_STANDARD_HANDLE(XCAFSchema_PTopLoc_ItemLocation,Storage_CallBack)
IMPLEMENT_STANDARD_RTTIEXT(XCAFSchema_PTopLoc_ItemLocation,Storage_CallBack)

Handle(Standard_Persistent) XCAFSchema_PTopLoc_ItemLocation::New() const
{
  return new PTopLoc_ItemLocation(Storage_stCONSTclCOM());
}

void XCAFSchema_PTopLoc_ItemLocation::SAdd(const Handle(PTopLoc_ItemLocation)& p, const Handle(Storage_Schema)& theSchema)
{
  if (!p.IsNull()) {
    if (theSchema->AddPersistent(p,"PTopLoc_ItemLocation")) {
         theSchema->PersistentToAdd(p->_CSFDB_GetPTopLoc_ItemLocationmyDatum());
   XCAFSchema_PTopLoc_Location::SAdd(p->_CSFDB_GetPTopLoc_ItemLocationmyNext(),theSchema);

    }
  }
}

void XCAFSchema_PTopLoc_ItemLocation::Add(const Handle(Standard_Persistent)& p, const Handle(Storage_Schema)& theSchema) const
{
  XCAFSchema_PTopLoc_ItemLocation::SAdd((Handle(PTopLoc_ItemLocation)&)p,theSchema);
}

void XCAFSchema_PTopLoc_ItemLocation::SWrite(const Handle(Standard_Persistent)& p, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema)
{ 
  if (!p.IsNull()) {
    Handle(PTopLoc_ItemLocation) &pp = (Handle(PTopLoc_ItemLocation)&)p;
    theSchema->WritePersistentObjectHeader(p,f);
    
    f.BeginWritePersistentObjectData();
    theSchema->WritePersistentReference(pp->_CSFDB_GetPTopLoc_ItemLocationmyDatum(),f);
  f.PutInteger(pp->_CSFDB_GetPTopLoc_ItemLocationmyPower());
    XCAFSchema_PTopLoc_Location::SWrite(pp->_CSFDB_GetPTopLoc_ItemLocationmyNext(),f,theSchema);

    f.EndWritePersistentObjectData();
  }
}

void XCAFSchema_PTopLoc_ItemLocation::Write(const Handle(Standard_Persistent)& p, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema) const
{ 
  XCAFSchema_PTopLoc_ItemLocation::SWrite(p,f,theSchema);
}


void XCAFSchema_PTopLoc_ItemLocation::SRead(const Handle(Standard_Persistent)& p, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema)
{ 
  if (!p.IsNull()) {
    Handle(PTopLoc_ItemLocation) &pp = (Handle(PTopLoc_ItemLocation)&)p;

    theSchema->ReadPersistentObjectHeader(f);
    f.BeginReadPersistentObjectData();

    Handle(PTopLoc_Datum3D) PTopLoc_ItemLocationmyDatum;

    theSchema->ReadPersistentReference(PTopLoc_ItemLocationmyDatum,f);
    pp->_CSFDB_SetPTopLoc_ItemLocationmyDatum(PTopLoc_ItemLocationmyDatum);

    Standard_Integer PTopLoc_ItemLocationmyPower;
    f.GetInteger(PTopLoc_ItemLocationmyPower);
    pp->_CSFDB_SetPTopLoc_ItemLocationmyPower(PTopLoc_ItemLocationmyPower);

    XCAFSchema_PTopLoc_Location::SRead((PTopLoc_Location&)pp->_CSFDB_GetPTopLoc_ItemLocationmyNext(),f,theSchema);

    f.EndReadPersistentObjectData();
  }
}

void XCAFSchema_PTopLoc_ItemLocation::Read(const Handle(Standard_Persistent)& p, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema) const

{ 
  XCAFSchema_PTopLoc_ItemLocation::SRead(p,f,theSchema);
}