1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
//--------------------------------------------------------------------
//
// File Name : IGESBasic_Hierarchy.cxx
// Date :
// Author : CKY / Contract Toubro-Larsen
// Copyright : MATRA-DATAVISION 1993
//
//--------------------------------------------------------------------
#include <IGESBasic_ToolHierarchy.ixx>
#include <IGESData_ParamCursor.hxx>
IGESBasic_ToolHierarchy::IGESBasic_ToolHierarchy () { }
void IGESBasic_ToolHierarchy::ReadOwnParams
(const Handle(IGESBasic_Hierarchy)& ent,
const Handle(IGESData_IGESReaderData)& /*IR*/, IGESData_ParamReader& PR) const
{
Standard_Integer tempNbPropertyValues;
Standard_Integer tempLineFont;
Standard_Integer tempView;
Standard_Integer tempEntityLevel;
Standard_Integer tempBlankStatus;
Standard_Integer tempLineWeight;
Standard_Integer tempColorNum;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
//szv#4:S4163:12Mar99 `st=` not needed
PR.ReadInteger(PR.Current(),"No. of Property values",tempNbPropertyValues);
PR.ReadInteger(PR.Current(),"LineFont",tempLineFont);
PR.ReadInteger(PR.Current(),"View",tempView);
PR.ReadInteger(PR.Current(),"Entity level",tempEntityLevel);
PR.ReadInteger(PR.Current(),"Blank status",tempBlankStatus);
PR.ReadInteger(PR.Current(),"Line weight",tempLineWeight);
PR.ReadInteger(PR.Current(),"Color number",tempColorNum);
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempNbPropertyValues,tempLineFont,tempView,tempEntityLevel,
tempBlankStatus,tempLineWeight,tempColorNum);
}
void IGESBasic_ToolHierarchy::WriteOwnParams
(const Handle(IGESBasic_Hierarchy)& ent, IGESData_IGESWriter& IW) const
{
IW.Send(ent->NbPropertyValues());
IW.Send(ent->NewLineFont());
IW.Send(ent->NewView());
IW.Send(ent->NewEntityLevel());
IW.Send(ent->NewBlankStatus());
IW.Send(ent->NewLineWeight());
IW.Send(ent->NewColorNum());
}
void IGESBasic_ToolHierarchy::OwnShared
(const Handle(IGESBasic_Hierarchy)& /*ent*/, Interface_EntityIterator& /*iter*/) const
{
}
void IGESBasic_ToolHierarchy::OwnCopy
(const Handle(IGESBasic_Hierarchy)& another,
const Handle(IGESBasic_Hierarchy)& ent, Interface_CopyTool& /*TC*/) const
{
ent->Init(6,another->NewLineFont(), another->NewView(),
another->NewEntityLevel(),another->NewBlankStatus(),
another->NewLineWeight(), another->NewColorNum());
}
Standard_Boolean IGESBasic_ToolHierarchy::OwnCorrect
(const Handle(IGESBasic_Hierarchy)& ent) const
{
Standard_Boolean res = (ent->NbPropertyValues() != 6);
if (res) ent->Init
(6,ent->NewLineFont(),ent->NewView(),ent->NewEntityLevel(),
ent->NewBlankStatus(),ent->NewLineWeight(),ent->NewColorNum());
return res; // nbpropertyvalues=6
}
IGESData_DirChecker IGESBasic_ToolHierarchy::DirChecker
(const Handle(IGESBasic_Hierarchy)& /*ent*/) const
{
IGESData_DirChecker DC(406,10); //Form no = 10 & Type = 406
DC.Structure(IGESData_DefVoid);
DC.GraphicsIgnored();
DC.BlankStatusIgnored();
DC.UseFlagIgnored();
DC.HierarchyStatusIgnored();
return DC;
}
void IGESBasic_ToolHierarchy::OwnCheck
(const Handle(IGESBasic_Hierarchy)& ent,
const Interface_ShareTool& , Handle(Interface_Check)& ach) const
{
if (ent->NbPropertyValues() != 6)
ach->AddFail("Number of Property Values != 6");
if (ent->NewLineFont() != 0 && ent->NewLineFont() != 1)
ach->AddFail("InCorrect LineFont");
if (ent->NewView() != 0 && ent->NewView() != 1)
ach->AddFail("InCorrect View");
if (ent->NewEntityLevel() != 0 && ent->NewEntityLevel() != 1)
ach->AddFail("InCorrect EntityLevel");
if (ent->NewBlankStatus() != 0 && ent->NewBlankStatus() != 1)
if (ent->NewLineWeight() != 0 && ent->NewLineWeight() != 1)
ach->AddFail("InCorrect LineWeight");
if (ent->NewColorNum() != 0 && ent->NewColorNum() != 1)
ach->AddFail("InCorrect ColorNum");
}
void IGESBasic_ToolHierarchy::OwnDump
(const Handle(IGESBasic_Hierarchy)& ent, const IGESData_IGESDumper& /*dumper*/,
const Handle(Message_Messenger)& S, const Standard_Integer /*level*/) const
{
S << "IGESBasic_Hierarchy" << endl;
S << "Number of property values : " << ent->NbPropertyValues() << endl;
S << "Line Font : " << ent->NewLineFont() << endl;
S << "View Number : " << ent->NewView() << endl;
S << "Entity level : " << ent->NewEntityLevel() << endl;
S << "Blank status : " << ent->NewBlankStatus() << endl;
S << "Line weight : " << ent->NewLineWeight() << endl;
S << "Color number : " << ent->NewColorNum() << endl;
}
|