summaryrefslogtreecommitdiff
path: root/drv/StdSchema/StdSchema_PPrsStd_AISPresentation.cxx
blob: 9d12c5ed76f566bc8010744cb6c456e6fd81f4c3 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef _StdSchema_PPrsStd_AISPresentation_HeaderFile
#include <StdSchema_PPrsStd_AISPresentation.hxx>
#endif
#ifndef _PPrsStd_AISPresentation_HeaderFile
#include <PPrsStd_AISPresentation.hxx>
#endif
#include <StdSchema_PPrsStd_AISPresentation.ixx>
#ifndef _Storage_Schema_HeaderFile
#include <Storage_Schema.hxx>
#endif
#ifndef _Storage_stCONSTclCOM_HeaderFile
#include <Storage_stCONSTclCOM.hxx>
#endif

IMPLEMENT_STANDARD_HANDLE(StdSchema_PPrsStd_AISPresentation,Storage_CallBack)
IMPLEMENT_STANDARD_RTTIEXT(StdSchema_PPrsStd_AISPresentation,Storage_CallBack)

Handle(Standard_Persistent) StdSchema_PPrsStd_AISPresentation::New() const
{
  return new PPrsStd_AISPresentation(Storage_stCONSTclCOM());
}

void StdSchema_PPrsStd_AISPresentation::SAdd(const Handle(PPrsStd_AISPresentation)& p, const Handle(Storage_Schema)& theSchema)
{
  if (!p.IsNull()) {
    if (theSchema->AddPersistent(p,"PPrsStd_AISPresentation")) {
         theSchema->PersistentToAdd(p->_CSFDB_GetPPrsStd_AISPresentationmyDriverGUID());

    }
  }
}

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

void StdSchema_PPrsStd_AISPresentation::SWrite(const Handle(Standard_Persistent)& p, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema)
{ 
  if (!p.IsNull()) {
    Handle(PPrsStd_AISPresentation) &pp = (Handle(PPrsStd_AISPresentation)&)p;
    theSchema->WritePersistentObjectHeader(p,f);
    
    f.BeginWritePersistentObjectData();
  f.PutBoolean(pp->_CSFDB_GetPPrsStd_AISPresentationmyIsDisplayed());
    theSchema->WritePersistentReference(pp->_CSFDB_GetPPrsStd_AISPresentationmyDriverGUID(),f);
  f.PutReal(pp->_CSFDB_GetPPrsStd_AISPresentationmyTransparency());
  f.PutInteger(pp->_CSFDB_GetPPrsStd_AISPresentationmyColor());
  f.PutInteger(pp->_CSFDB_GetPPrsStd_AISPresentationmyMaterial());
  f.PutReal(pp->_CSFDB_GetPPrsStd_AISPresentationmyWidth());

    f.EndWritePersistentObjectData();
  }
}

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


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

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

    Standard_Boolean PPrsStd_AISPresentationmyIsDisplayed;
    f.GetBoolean(PPrsStd_AISPresentationmyIsDisplayed);
    pp->_CSFDB_SetPPrsStd_AISPresentationmyIsDisplayed(PPrsStd_AISPresentationmyIsDisplayed);

    Handle(PCollection_HExtendedString) PPrsStd_AISPresentationmyDriverGUID;

    theSchema->ReadPersistentReference(PPrsStd_AISPresentationmyDriverGUID,f);
    pp->_CSFDB_SetPPrsStd_AISPresentationmyDriverGUID(PPrsStd_AISPresentationmyDriverGUID);

    Standard_Real PPrsStd_AISPresentationmyTransparency;
    f.GetReal(PPrsStd_AISPresentationmyTransparency);
    pp->_CSFDB_SetPPrsStd_AISPresentationmyTransparency(PPrsStd_AISPresentationmyTransparency);

    Standard_Integer PPrsStd_AISPresentationmyColor;
    f.GetInteger(PPrsStd_AISPresentationmyColor);
    pp->_CSFDB_SetPPrsStd_AISPresentationmyColor(PPrsStd_AISPresentationmyColor);

    Standard_Integer PPrsStd_AISPresentationmyMaterial;
    f.GetInteger(PPrsStd_AISPresentationmyMaterial);
    pp->_CSFDB_SetPPrsStd_AISPresentationmyMaterial(PPrsStd_AISPresentationmyMaterial);

    Standard_Real PPrsStd_AISPresentationmyWidth;
    f.GetReal(PPrsStd_AISPresentationmyWidth);
    pp->_CSFDB_SetPPrsStd_AISPresentationmyWidth(PPrsStd_AISPresentationmyWidth);

    f.EndReadPersistentObjectData();
  }
}

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

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