0026961: Recover possibility to read files in old persistence format
[occt.git] / src / StdLPersistent / StdLPersistent.cxx
CommitLineData
7ed7467d 1// Copyright (c) 2015 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
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.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14#include <StdLPersistent.hxx>
15#include <StdObjMgt_MapOfInstantiators.hxx>
16
ff205346 17#include <StdLPersistent_Document.hxx>
18#include <StdLPersistent_Data.hxx>
19#include <StdLPersistent_HString.hxx>
20#include <StdLPersistent_HArray1.hxx>
21#include <StdLPersistent_HArray2.hxx>
22#include <StdLPersistent_Void.hxx>
23#include <StdLPersistent_Real.hxx>
24#include <StdLPersistent_Value.hxx>
25#include <StdLPersistent_Collection.hxx>
26#include <StdLPersistent_Dependency.hxx>
27#include <StdLPersistent_Variable.hxx>
28#include <StdLPersistent_XLink.hxx>
29#include <StdLPersistent_Function.hxx>
30#include <StdLPersistent_TreeNode.hxx>
31#include <StdLPersistent_NamedData.hxx>
32
7ed7467d 33
34//=======================================================================
35//function : BindTypes
36//purpose : Register types
37//=======================================================================
38void StdLPersistent::BindTypes (StdObjMgt_MapOfInstantiators& theMap)
39{
ff205346 40 // Non-attribute data
41 theMap.Bind <StdLPersistent_Document> ("PDocStd_Document");
42 theMap.Bind <StdLPersistent_Data> ("PDF_Data");
43
44 theMap.Bind <StdLPersistent_HString::Ascii> ("PCollection_HAsciiString");
45 theMap.Bind <StdLPersistent_HString::Extended> ("PCollection_HExtendedString");
46
47 theMap.Bind <StdLPersistent_HArray1::Integer> ("PColStd_HArray1OfInteger");
48 theMap.Bind <StdLPersistent_HArray1::Real> ("PColStd_HArray1OfReal");
49 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColStd_HArray1OfExtendedString");
50 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PDF_HAttributeArray1");
51 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PDataStd_HArray1OfHAsciiString");
52 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PDataStd_HArray1OfHArray1OfInteger");
53 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PDataStd_HArray1OfHArray1OfReal");
54 theMap.Bind <StdLPersistent_HArray1::Byte> ("PDataStd_HArray1OfByte");
55
56 theMap.Bind <StdLPersistent_HArray2::Integer> ("PColStd_HArray2OfInteger");
57
58 // Attributes
59 theMap.Bind <StdLPersistent_Void::Directory> ("PDataStd_Directory");
60 theMap.Bind <StdLPersistent_Void::Tick> ("PDataStd_Tick");
61 theMap.Bind <StdLPersistent_Void::NoteBook> ("PDataStd_NoteBook");
62
63 theMap.Bind <StdLPersistent_Value::Integer> ("PDataStd_Integer");
64 theMap.Bind <StdLPersistent_Value::TagSource> ("PDF_TagSource");
65 theMap.Bind <StdLPersistent_Value::Reference> ("PDF_Reference");
66 theMap.Bind <StdLPersistent_Value::UAttribute> ("PDataStd_UAttribute");
67
68 theMap.Bind <StdLPersistent_Value::Name> ("PDataStd_Name");
69 theMap.Bind <StdLPersistent_Value::Comment> ("PDataStd_Comment");
70 theMap.Bind <StdLPersistent_Value::AsciiString> ("PDataStd_AsciiString");
71
72 theMap.Bind <StdLPersistent_Collection::IntegerArray> ("PDataStd_IntegerArray");
73 theMap.Bind <StdLPersistent_Collection::RealArray> ("PDataStd_RealArray");
74 theMap.Bind <StdLPersistent_Collection::ByteArray> ("PDataStd_ByteArray");
75 theMap.Bind <StdLPersistent_Collection::ExtStringArray> ("PDataStd_ExtStringArray");
76 theMap.Bind <StdLPersistent_Collection::BooleanArray> ("PDataStd_BooleanArray");
77 theMap.Bind <StdLPersistent_Collection::ReferenceArray> ("PDataStd_ReferenceArray");
78
79 theMap.Bind <StdLPersistent_Collection::IntegerArray_1> ("PDataStd_IntegerArray_1");
80 theMap.Bind <StdLPersistent_Collection::RealArray_1> ("PDataStd_RealArray_1");
81 theMap.Bind <StdLPersistent_Collection::ByteArray_1> ("PDataStd_ByteArray_1");
82 theMap.Bind <StdLPersistent_Collection::ExtStringArray_1> ("PDataStd_ExtStringArray_1");
7ed7467d 83
ff205346 84 theMap.Bind <StdLPersistent_Collection::IntegerList> ("PDataStd_IntegerList");
85 theMap.Bind <StdLPersistent_Collection::RealList> ("PDataStd_RealList");
86 theMap.Bind <StdLPersistent_Collection::BooleanList> ("PDataStd_BooleanList");
87 theMap.Bind <StdLPersistent_Collection::ExtStringList> ("PDataStd_ExtStringList");
88 theMap.Bind <StdLPersistent_Collection::ReferenceList> ("PDataStd_ReferenceList");
7ed7467d 89
ff205346 90 theMap.Bind <StdLPersistent_Collection::IntPackedMap> ("PDataStd_IntPackedMap");
91 theMap.Bind <StdLPersistent_Collection::IntPackedMap_1> ("PDataStd_IntPackedMap_1");
7ed7467d 92
ff205346 93 theMap.Bind <StdLPersistent_Real> ("PDataStd_Real");
94 theMap.Bind <StdLPersistent_Dependency::Expression> ("PDataStd_Expression");
95 theMap.Bind <StdLPersistent_Dependency::Relation> ("PDataStd_Relation");
96 theMap.Bind <StdLPersistent_Variable> ("PDataStd_Variable");
97 theMap.Bind <StdLPersistent_XLink> ("PDocStd_XLink");
98 theMap.Bind <StdLPersistent_Function> ("PFunction_Function");
99 theMap.Bind <StdLPersistent_TreeNode> ("PDataStd_TreeNode");
100 theMap.Bind <StdLPersistent_NamedData> ("PDataStd_NamedData");
7ed7467d 101}