b311480e |
1 | // Created by: CKY / Contract Toubro-Larsen |
2 | // Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
3 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
7fd59977 |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
7fd59977 |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
16 | //-------------------------------------------------------------------- |
7fd59977 |
17 | //-------------------------------------------------------------------- |
18 | |
42cf5bc1 |
19 | #include <IGESAppli_FlowLineSpec.hxx> |
20 | #include <IGESAppli_ToolFlowLineSpec.hxx> |
21 | #include <IGESData_DirChecker.hxx> |
22 | #include <IGESData_Dump.hxx> |
23 | #include <IGESData_IGESDumper.hxx> |
24 | #include <IGESData_IGESReaderData.hxx> |
25 | #include <IGESData_IGESWriter.hxx> |
42cf5bc1 |
26 | #include <IGESData_ParamReader.hxx> |
27 | #include <Interface_Check.hxx> |
28 | #include <Interface_CopyTool.hxx> |
29 | #include <Interface_EntityIterator.hxx> |
7fd59977 |
30 | #include <Interface_HArray1OfHAsciiString.hxx> |
42cf5bc1 |
31 | #include <Interface_ShareTool.hxx> |
42cf5bc1 |
32 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
33 | |
34 | IGESAppli_ToolFlowLineSpec::IGESAppli_ToolFlowLineSpec () { } |
35 | |
36 | |
37 | void IGESAppli_ToolFlowLineSpec::ReadOwnParams |
38 | (const Handle(IGESAppli_FlowLineSpec)& ent, |
39 | const Handle(IGESData_IGESReaderData)& /* IR */, IGESData_ParamReader& PR) const |
40 | { |
41 | //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed |
42 | Standard_Integer num; |
43 | Handle(Interface_HArray1OfHAsciiString) tempNameAndModifiers; |
44 | if (!PR.ReadInteger(PR.Current(), "Number of property values", num)) num = 0; |
45 | if (num > 0) tempNameAndModifiers = new Interface_HArray1OfHAsciiString(1, num); |
46 | else PR.AddFail("Number of property values: Not Positive"); |
47 | //szv#4:S4163:12Mar99 `st=` not needed |
48 | if (!tempNameAndModifiers.IsNull()) |
49 | PR.ReadTexts(PR.CurrentList(num), "Name and Modifiers", tempNameAndModifiers); |
50 | |
51 | DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent); |
52 | ent->Init(tempNameAndModifiers); |
53 | } |
54 | |
55 | void IGESAppli_ToolFlowLineSpec::WriteOwnParams |
56 | (const Handle(IGESAppli_FlowLineSpec)& ent, IGESData_IGESWriter& IW) const |
57 | { |
58 | Standard_Integer i, num; |
59 | IW.Send(ent->NbPropertyValues()); |
60 | for ( num = ent->NbPropertyValues(), i = 1; i <= num; i++ ) |
61 | IW.Send(ent->Modifier(i)); |
62 | } |
63 | |
64 | void IGESAppli_ToolFlowLineSpec::OwnShared |
65 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */, Interface_EntityIterator& /* iter */) const |
66 | { |
67 | } |
68 | |
69 | void IGESAppli_ToolFlowLineSpec::OwnCopy |
70 | (const Handle(IGESAppli_FlowLineSpec)& another, |
71 | const Handle(IGESAppli_FlowLineSpec)& ent, Interface_CopyTool& /* TC */) const |
72 | { |
73 | Standard_Integer num = another->NbPropertyValues(); |
74 | Handle(Interface_HArray1OfHAsciiString) tempNameAndModifiers = |
75 | new Interface_HArray1OfHAsciiString(1, num); |
76 | for ( Standard_Integer i = 1; i <= num; i++ ) |
77 | tempNameAndModifiers->SetValue |
78 | (i, new TCollection_HAsciiString(another->Modifier(i))); |
79 | ent->Init(tempNameAndModifiers); |
80 | } |
81 | |
82 | IGESData_DirChecker IGESAppli_ToolFlowLineSpec::DirChecker |
83 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */ ) const |
84 | { |
85 | IGESData_DirChecker DC(406, 14); |
86 | DC.Structure(IGESData_DefVoid); |
87 | DC.GraphicsIgnored(); |
88 | DC.LineFont(IGESData_DefVoid); |
89 | DC.LineWeight(IGESData_DefVoid); |
90 | DC.Color(IGESData_DefVoid); |
91 | DC.BlankStatusIgnored(); |
92 | DC.UseFlagIgnored(); |
93 | DC.HierarchyStatusIgnored(); |
94 | return DC; |
95 | } |
96 | |
97 | void IGESAppli_ToolFlowLineSpec::OwnCheck |
98 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */, |
99 | const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const |
100 | { |
101 | } |
102 | |
103 | void IGESAppli_ToolFlowLineSpec::OwnDump |
104 | (const Handle(IGESAppli_FlowLineSpec)& ent, const IGESData_IGESDumper& /* dumper */, |
0ebe5b0a |
105 | Standard_OStream& S, const Standard_Integer level) const |
7fd59977 |
106 | { |
0ebe5b0a |
107 | S << "IGESAppli_FlowLineSpec\n"; |
7fd59977 |
108 | S << "Name and Modifiers : "; |
109 | IGESData_DumpStrings(S ,level,1, ent->NbPropertyValues(),ent->Modifier); |
0ebe5b0a |
110 | S << "\n"; |
7fd59977 |
111 | } |
112 | |