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 | // |
973c2be1 |
7 | // This library is free software; you can redistribute it and / or modify it |
8 | // under the terms of the GNU Lesser General Public version 2.1 as published |
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 | |
19 | #include <IGESAppli_ToolFlowLineSpec.ixx> |
20 | #include <IGESData_ParamCursor.hxx> |
21 | #include <Interface_HArray1OfHAsciiString.hxx> |
22 | #include <TCollection_HAsciiString.hxx> |
23 | #include <IGESData_Dump.hxx> |
24 | #include <Interface_Macros.hxx> |
25 | |
26 | |
27 | IGESAppli_ToolFlowLineSpec::IGESAppli_ToolFlowLineSpec () { } |
28 | |
29 | |
30 | void IGESAppli_ToolFlowLineSpec::ReadOwnParams |
31 | (const Handle(IGESAppli_FlowLineSpec)& ent, |
32 | const Handle(IGESData_IGESReaderData)& /* IR */, IGESData_ParamReader& PR) const |
33 | { |
34 | //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed |
35 | Standard_Integer num; |
36 | Handle(Interface_HArray1OfHAsciiString) tempNameAndModifiers; |
37 | if (!PR.ReadInteger(PR.Current(), "Number of property values", num)) num = 0; |
38 | if (num > 0) tempNameAndModifiers = new Interface_HArray1OfHAsciiString(1, num); |
39 | else PR.AddFail("Number of property values: Not Positive"); |
40 | //szv#4:S4163:12Mar99 `st=` not needed |
41 | if (!tempNameAndModifiers.IsNull()) |
42 | PR.ReadTexts(PR.CurrentList(num), "Name and Modifiers", tempNameAndModifiers); |
43 | |
44 | DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent); |
45 | ent->Init(tempNameAndModifiers); |
46 | } |
47 | |
48 | void IGESAppli_ToolFlowLineSpec::WriteOwnParams |
49 | (const Handle(IGESAppli_FlowLineSpec)& ent, IGESData_IGESWriter& IW) const |
50 | { |
51 | Standard_Integer i, num; |
52 | IW.Send(ent->NbPropertyValues()); |
53 | for ( num = ent->NbPropertyValues(), i = 1; i <= num; i++ ) |
54 | IW.Send(ent->Modifier(i)); |
55 | } |
56 | |
57 | void IGESAppli_ToolFlowLineSpec::OwnShared |
58 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */, Interface_EntityIterator& /* iter */) const |
59 | { |
60 | } |
61 | |
62 | void IGESAppli_ToolFlowLineSpec::OwnCopy |
63 | (const Handle(IGESAppli_FlowLineSpec)& another, |
64 | const Handle(IGESAppli_FlowLineSpec)& ent, Interface_CopyTool& /* TC */) const |
65 | { |
66 | Standard_Integer num = another->NbPropertyValues(); |
67 | Handle(Interface_HArray1OfHAsciiString) tempNameAndModifiers = |
68 | new Interface_HArray1OfHAsciiString(1, num); |
69 | for ( Standard_Integer i = 1; i <= num; i++ ) |
70 | tempNameAndModifiers->SetValue |
71 | (i, new TCollection_HAsciiString(another->Modifier(i))); |
72 | ent->Init(tempNameAndModifiers); |
73 | } |
74 | |
75 | IGESData_DirChecker IGESAppli_ToolFlowLineSpec::DirChecker |
76 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */ ) const |
77 | { |
78 | IGESData_DirChecker DC(406, 14); |
79 | DC.Structure(IGESData_DefVoid); |
80 | DC.GraphicsIgnored(); |
81 | DC.LineFont(IGESData_DefVoid); |
82 | DC.LineWeight(IGESData_DefVoid); |
83 | DC.Color(IGESData_DefVoid); |
84 | DC.BlankStatusIgnored(); |
85 | DC.UseFlagIgnored(); |
86 | DC.HierarchyStatusIgnored(); |
87 | return DC; |
88 | } |
89 | |
90 | void IGESAppli_ToolFlowLineSpec::OwnCheck |
91 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */, |
92 | const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const |
93 | { |
94 | } |
95 | |
96 | void IGESAppli_ToolFlowLineSpec::OwnDump |
97 | (const Handle(IGESAppli_FlowLineSpec)& ent, const IGESData_IGESDumper& /* dumper */, |
98 | const Handle(Message_Messenger)& S, const Standard_Integer level) const |
99 | { |
100 | S << "IGESAppli_FlowLineSpec" << endl; |
101 | S << "Name and Modifiers : "; |
102 | IGESData_DumpStrings(S ,level,1, ent->NbPropertyValues(),ent->Modifier); |
103 | S << endl; |
104 | } |
105 | |