#ifndef _StdSchema_PTopoDS_TShape1_HeaderFile
#include <StdSchema_PTopoDS_TShape1.hxx>
#endif
#ifndef _PTopoDS_TShape1_HeaderFile
#include <PTopoDS_TShape1.hxx>
#endif
#include <StdSchema_PTopoDS_TShape1.ixx>
#ifndef _Storage_Schema_HeaderFile
#include <Storage_Schema.hxx>
#endif
#ifndef _Storage_stCONSTclCOM_HeaderFile
#include <Storage_stCONSTclCOM.hxx>
#endif

IMPLEMENT_STANDARD_HANDLE(StdSchema_PTopoDS_TShape1,Storage_CallBack)
IMPLEMENT_STANDARD_RTTIEXT(StdSchema_PTopoDS_TShape1,Storage_CallBack)

Handle(Standard_Persistent) StdSchema_PTopoDS_TShape1::New() const
{
  Handle(Standard_Persistent) NullObject;
  return NullObject;
}

void StdSchema_PTopoDS_TShape1::SAdd(const Handle(PTopoDS_TShape1)& p, const Handle(Storage_Schema)& theSchema)
{
  if (!p.IsNull()) {
    if (theSchema->AddPersistent(p,"PTopoDS_TShape1")) {
         theSchema->PersistentToAdd(p->_CSFDB_GetPTopoDS_TShape1myShapes());

    }
  }
}

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

void StdSchema_PTopoDS_TShape1::SWrite(const Handle(Standard_Persistent)& p, Storage_BaseDriver& f, const Handle(Storage_Schema)& theSchema)
{ 
  if (!p.IsNull()) {
    Handle(PTopoDS_TShape1) &pp = (Handle(PTopoDS_TShape1)&)p;
    theSchema->WritePersistentObjectHeader(p,f);

    (void)pp; // dummy to avoid compiler warning on unused arg
    
    f.BeginWritePersistentObjectData();
    theSchema->WritePersistentReference(pp->_CSFDB_GetPTopoDS_TShape1myShapes(),f);
  f.PutInteger(pp->_CSFDB_GetPTopoDS_TShape1myFlags());

    f.EndWritePersistentObjectData();
  }
}

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


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

    (void)pp; // dummy to avoid compiler warning on unused arg

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

    Handle(PTopoDS_HArray1OfShape1) PTopoDS_TShape1myShapes;

    theSchema->ReadPersistentReference(PTopoDS_TShape1myShapes,f);
    pp->_CSFDB_SetPTopoDS_TShape1myShapes(PTopoDS_TShape1myShapes);

    Standard_Integer PTopoDS_TShape1myFlags;
    f.GetInteger(PTopoDS_TShape1myFlags);
    pp->_CSFDB_SetPTopoDS_TShape1myFlags(PTopoDS_TShape1myFlags);

    f.EndReadPersistentObjectData();
  }
}

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

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