b311480e |
1 | // Created by: CKY / Contract Toubro-Larsen |
2 | // Copyright (c) 1993-1999 Matra Datavision |
3 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
4 | // |
5 | // The content of this file is subject to the Open CASCADE Technology Public |
6 | // License Version 6.5 (the "License"). You may not use the content of this file |
7 | // except in compliance with the License. Please obtain a copy of the License |
8 | // at http://www.opencascade.org and read it completely before using this file. |
7fd59977 |
9 | // |
b311480e |
10 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
7fd59977 |
12 | // |
b311480e |
13 | // The Original Code and all software distributed under the License is |
14 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | // Initial Developer hereby disclaims all such warranties, including without |
16 | // limitation, any warranties of merchantability, fitness for a particular |
17 | // purpose or non-infringement. Please see the License for the specific terms |
18 | // and conditions governing the rights and limitations under the License. |
19 | |
20 | //-------------------------------------------------------------------- |
7fd59977 |
21 | //-------------------------------------------------------------------- |
22 | |
23 | #include <IGESAppli_ToolFlowLineSpec.ixx> |
24 | #include <IGESData_ParamCursor.hxx> |
25 | #include <Interface_HArray1OfHAsciiString.hxx> |
26 | #include <TCollection_HAsciiString.hxx> |
27 | #include <IGESData_Dump.hxx> |
28 | #include <Interface_Macros.hxx> |
29 | |
30 | |
31 | IGESAppli_ToolFlowLineSpec::IGESAppli_ToolFlowLineSpec () { } |
32 | |
33 | |
34 | void IGESAppli_ToolFlowLineSpec::ReadOwnParams |
35 | (const Handle(IGESAppli_FlowLineSpec)& ent, |
36 | const Handle(IGESData_IGESReaderData)& /* IR */, IGESData_ParamReader& PR) const |
37 | { |
38 | //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed |
39 | Standard_Integer num; |
40 | Handle(Interface_HArray1OfHAsciiString) tempNameAndModifiers; |
41 | if (!PR.ReadInteger(PR.Current(), "Number of property values", num)) num = 0; |
42 | if (num > 0) tempNameAndModifiers = new Interface_HArray1OfHAsciiString(1, num); |
43 | else PR.AddFail("Number of property values: Not Positive"); |
44 | //szv#4:S4163:12Mar99 `st=` not needed |
45 | if (!tempNameAndModifiers.IsNull()) |
46 | PR.ReadTexts(PR.CurrentList(num), "Name and Modifiers", tempNameAndModifiers); |
47 | |
48 | DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent); |
49 | ent->Init(tempNameAndModifiers); |
50 | } |
51 | |
52 | void IGESAppli_ToolFlowLineSpec::WriteOwnParams |
53 | (const Handle(IGESAppli_FlowLineSpec)& ent, IGESData_IGESWriter& IW) const |
54 | { |
55 | Standard_Integer i, num; |
56 | IW.Send(ent->NbPropertyValues()); |
57 | for ( num = ent->NbPropertyValues(), i = 1; i <= num; i++ ) |
58 | IW.Send(ent->Modifier(i)); |
59 | } |
60 | |
61 | void IGESAppli_ToolFlowLineSpec::OwnShared |
62 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */, Interface_EntityIterator& /* iter */) const |
63 | { |
64 | } |
65 | |
66 | void IGESAppli_ToolFlowLineSpec::OwnCopy |
67 | (const Handle(IGESAppli_FlowLineSpec)& another, |
68 | const Handle(IGESAppli_FlowLineSpec)& ent, Interface_CopyTool& /* TC */) const |
69 | { |
70 | Standard_Integer num = another->NbPropertyValues(); |
71 | Handle(Interface_HArray1OfHAsciiString) tempNameAndModifiers = |
72 | new Interface_HArray1OfHAsciiString(1, num); |
73 | for ( Standard_Integer i = 1; i <= num; i++ ) |
74 | tempNameAndModifiers->SetValue |
75 | (i, new TCollection_HAsciiString(another->Modifier(i))); |
76 | ent->Init(tempNameAndModifiers); |
77 | } |
78 | |
79 | IGESData_DirChecker IGESAppli_ToolFlowLineSpec::DirChecker |
80 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */ ) const |
81 | { |
82 | IGESData_DirChecker DC(406, 14); |
83 | DC.Structure(IGESData_DefVoid); |
84 | DC.GraphicsIgnored(); |
85 | DC.LineFont(IGESData_DefVoid); |
86 | DC.LineWeight(IGESData_DefVoid); |
87 | DC.Color(IGESData_DefVoid); |
88 | DC.BlankStatusIgnored(); |
89 | DC.UseFlagIgnored(); |
90 | DC.HierarchyStatusIgnored(); |
91 | return DC; |
92 | } |
93 | |
94 | void IGESAppli_ToolFlowLineSpec::OwnCheck |
95 | (const Handle(IGESAppli_FlowLineSpec)& /* ent */, |
96 | const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const |
97 | { |
98 | } |
99 | |
100 | void IGESAppli_ToolFlowLineSpec::OwnDump |
101 | (const Handle(IGESAppli_FlowLineSpec)& ent, const IGESData_IGESDumper& /* dumper */, |
102 | const Handle(Message_Messenger)& S, const Standard_Integer level) const |
103 | { |
104 | S << "IGESAppli_FlowLineSpec" << endl; |
105 | S << "Name and Modifiers : "; |
106 | IGESData_DumpStrings(S ,level,1, ent->NbPropertyValues(),ent->Modifier); |
107 | S << endl; |
108 | } |
109 | |