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
|
//--------------------------------------------------------------------
//
// File Name : IGESBasic_AssocGroupType.cxx
// Date :
// Author : CKY / Contract Toubro-Larsen
// Copyright : MATRA-DATAVISION 1993
//
//--------------------------------------------------------------------
#include <IGESBasic_ToolAssocGroupType.ixx>
#include <IGESData_ParamCursor.hxx>
#include <TCollection_HAsciiString.hxx>
#include <Interface_Macros.hxx>
#include <IGESData_Dump.hxx>
IGESBasic_ToolAssocGroupType::IGESBasic_ToolAssocGroupType () { }
void IGESBasic_ToolAssocGroupType::ReadOwnParams
(const Handle(IGESBasic_AssocGroupType)& ent,
const Handle(IGESData_IGESReaderData)& /* IR */, IGESData_ParamReader& PR) const
{
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
Standard_Integer tempNbData;
Standard_Integer tempType;
Handle(TCollection_HAsciiString) tempName;
if (PR.DefinedElseSkip())
PR.ReadInteger(PR.Current(), "Number of data fields", tempNbData); //szv#4:S4163:12Mar99 `st=` not needed
else
tempNbData = 2;
PR.ReadInteger(PR.Current(), "Type of attached associativity",tempType); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadText(PR.Current(), "Name of attached associativity", tempName); //szv#4:S4163:12Mar99 `st=` not needed
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempNbData, tempType, tempName);
}
void IGESBasic_ToolAssocGroupType::WriteOwnParams
(const Handle(IGESBasic_AssocGroupType)& ent, IGESData_IGESWriter& IW) const
{
IW.Send(ent->NbData());
IW.Send(ent->AssocType());
IW.Send(ent->Name());
}
void IGESBasic_ToolAssocGroupType::OwnShared
(const Handle(IGESBasic_AssocGroupType)& /* ent */, Interface_EntityIterator& /* iter */) const
{
}
void IGESBasic_ToolAssocGroupType::OwnCopy
(const Handle(IGESBasic_AssocGroupType)& another,
const Handle(IGESBasic_AssocGroupType)& ent, Interface_CopyTool& /* TC */) const
{
Standard_Integer tempNbData = another->NbData();
Standard_Integer tempType = another->AssocType();
Handle(TCollection_HAsciiString) tempName =
new TCollection_HAsciiString(another->Name());
ent->Init(tempNbData, tempType, tempName);
}
Standard_Boolean IGESBasic_ToolAssocGroupType::OwnCorrect
(const Handle(IGESBasic_AssocGroupType)& ent) const
{
Standard_Boolean res = (ent->NbData() != 2);
if (res) ent->Init(2,ent->AssocType(),ent->Name());
return res; // nbdata=2
}
IGESData_DirChecker IGESBasic_ToolAssocGroupType::DirChecker
(const Handle(IGESBasic_AssocGroupType)& /* ent */ ) const
{
IGESData_DirChecker DC(406, 23);
DC.Structure(IGESData_DefVoid);
DC.GraphicsIgnored();
DC.LineFont(IGESData_DefVoid);
DC.LineWeight(IGESData_DefVoid);
DC.Color(IGESData_DefVoid);
DC.BlankStatusIgnored();
DC.UseFlagIgnored();
DC.HierarchyStatusIgnored();
return DC;
}
void IGESBasic_ToolAssocGroupType::OwnCheck
(const Handle(IGESBasic_AssocGroupType)& ent,
const Interface_ShareTool& , Handle(Interface_Check)& ach) const
{
if (ent->NbData() != 2)
ach->AddFail("Number of data fields != 2");
}
void IGESBasic_ToolAssocGroupType::OwnDump
(const Handle(IGESBasic_AssocGroupType)& ent, const IGESData_IGESDumper& /* dumper */,
const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const
{
S << "IGESBasic_AssocGroupType" << endl;
S << "Number of data fields : " << ent->NbData() << endl;
S << "Type of attached associativity : " << ent->AssocType() << endl;
S << "Name of attached associativity : ";
IGESData_DumpString(S,ent->Name());
S << endl;
}
|