1 // Copyright (c) 2015 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <StdObjMgt_ReadData.hxx>
15 #include <ShapePersistent_HSequence.hxx>
18 template <class SequenceClass>
19 void ShapePersistent_HSequence::node<SequenceClass>::Read
20 (StdObjMgt_ReadData& theReadData)
22 theReadData >> myPreviuos >> myItem >> myNext;
25 template <class SequenceClass>
26 void ShapePersistent_HSequence::node<SequenceClass>::Write
27 (StdObjMgt_WriteData& theWriteData) const
29 theWriteData << myPreviuos << myItem << myNext;
32 template <class SequenceClass>
33 void ShapePersistent_HSequence::instance<SequenceClass>::Read
34 (StdObjMgt_ReadData& theReadData)
36 theReadData >> myFirst >> myLast >> mySize;
39 template <class SequenceClass>
40 void ShapePersistent_HSequence::instance<SequenceClass>::Write
41 (StdObjMgt_WriteData& theWriteData) const
43 theWriteData << myFirst << myLast << mySize;
46 template <class SequenceClass>
48 ShapePersistent_HSequence::instance<SequenceClass>::Import() const
50 Handle(SequenceClass) aSequence = new SequenceClass;
52 for (Handle(Node) aNode = myFirst; aNode; aNode = aNode->Next())
53 aSequence->Append (aNode->Item());
58 template class ShapePersistent_HSequence::node<TColgp_HSequenceOfXYZ>;
59 template class ShapePersistent_HSequence::node<TColgp_HSequenceOfPnt>;
60 template class ShapePersistent_HSequence::node<TColgp_HSequenceOfDir>;
61 template class ShapePersistent_HSequence::node<TColgp_HSequenceOfVec>;
63 template class ShapePersistent_HSequence::instance<TColgp_HSequenceOfXYZ>;
64 template class ShapePersistent_HSequence::instance<TColgp_HSequenceOfPnt>;
65 template class ShapePersistent_HSequence::instance<TColgp_HSequenceOfDir>;
66 template class ShapePersistent_HSequence::instance<TColgp_HSequenceOfVec>;
69 //=======================================================================
71 //=======================================================================
73 Standard_CString ShapePersistent_HSequence::instance<TColgp_HSequenceOfXYZ>
74 ::PName() const { return "PColgp_HSequenceOfXYZ"; }
77 Standard_CString ShapePersistent_HSequence::node<TColgp_HSequenceOfXYZ>
78 ::PName() const { return "PColgp_SeqNodeOfHSequenceOfXYZ"; }
80 //=======================================================================
82 //=======================================================================
84 Standard_CString ShapePersistent_HSequence::instance<TColgp_HSequenceOfPnt>
85 ::PName() const { return "PColgp_HSequenceOfPnt"; }
88 Standard_CString ShapePersistent_HSequence::node<TColgp_HSequenceOfPnt>
89 ::PName() const { return "PColgp_SeqNodeOfHSequenceOfPnt"; }
91 //=======================================================================
93 //=======================================================================
95 Standard_CString ShapePersistent_HSequence::instance<TColgp_HSequenceOfDir>
96 ::PName() const { return "PColgp_HSequenceOfDir"; }
99 Standard_CString ShapePersistent_HSequence::node<TColgp_HSequenceOfDir>
100 ::PName() const { return "PColgp_SeqNodeOfHSequenceOffDir"; }
102 //=======================================================================
104 //=======================================================================
106 Standard_CString ShapePersistent_HSequence::instance<TColgp_HSequenceOfVec>
107 ::PName() const { return "PColgp_HSequenceOfVec"; }
110 Standard_CString ShapePersistent_HSequence::node<TColgp_HSequenceOfVec>
111 ::PName() const { return "PColgp_SeqNodeOfHSequenceOfVec"; }