0022627: Change OCCT memory management defaults
[occt.git] / src / IGESBasic / IGESBasic_ToolExternalRefFileName.cxx
CommitLineData
7fd59977 1//--------------------------------------------------------------------
2//
3// File Name : IGESBasic_ExternalRefFileName.cxx
4// Date :
5// Author : CKY / Contract Toubro-Larsen
6// Copyright : MATRA-DATAVISION 1993
7//
8//--------------------------------------------------------------------
9
10#include <IGESBasic_ToolExternalRefFileName.ixx>
11#include <IGESData_ParamCursor.hxx>
12#include <TCollection_HAsciiString.hxx>
13#include <Interface_Macros.hxx>
14#include <IGESData_Dump.hxx>
15
16
17IGESBasic_ToolExternalRefFileName::IGESBasic_ToolExternalRefFileName () { }
18
19
20void IGESBasic_ToolExternalRefFileName::ReadOwnParams
21 (const Handle(IGESBasic_ExternalRefFileName)& ent,
22 const Handle(IGESData_IGESReaderData)& /* IR */, IGESData_ParamReader& PR) const
23{
24 //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
25 Handle(TCollection_HAsciiString) tempExtRefFileIdentifier;
26 Handle(TCollection_HAsciiString) tempExtRefEntitySymbName;
27 PR.ReadText(PR.Current(), "External Reference File Identifier",
28 tempExtRefFileIdentifier); //szv#4:S4163:12Mar99 `st=` not needed
29 PR.ReadText(PR.Current(), "External Reference Symbolic Name",
30 tempExtRefEntitySymbName); //szv#4:S4163:12Mar99 `st=` not needed
31
32 DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
33 ent->Init (tempExtRefFileIdentifier, tempExtRefEntitySymbName);
34}
35
36void IGESBasic_ToolExternalRefFileName::WriteOwnParams
37 (const Handle(IGESBasic_ExternalRefFileName)& ent, IGESData_IGESWriter& IW) const
38{
39 IW.Send(ent->FileId());
40 IW.Send(ent->ReferenceName());
41}
42
43void IGESBasic_ToolExternalRefFileName::OwnShared
44 (const Handle(IGESBasic_ExternalRefFileName)& /* ent */, Interface_EntityIterator& /* iter */) const
45{
46}
47
48void IGESBasic_ToolExternalRefFileName::OwnCopy
49 (const Handle(IGESBasic_ExternalRefFileName)& another,
50 const Handle(IGESBasic_ExternalRefFileName)& ent, Interface_CopyTool& /* TC */) const
51{
52 Handle(TCollection_HAsciiString) tempFileId =
53 new TCollection_HAsciiString(another->FileId());
54 Handle(TCollection_HAsciiString) tempRefName =
55 new TCollection_HAsciiString(another->ReferenceName());
56 ent->Init(tempFileId, tempRefName);
57}
58
59IGESData_DirChecker IGESBasic_ToolExternalRefFileName::DirChecker
60 (const Handle(IGESBasic_ExternalRefFileName)& /* ent */ ) const
61{
62 IGESData_DirChecker DC(416, 0, 2);
63 DC.Structure(IGESData_DefVoid);
64 DC.GraphicsIgnored();
65 DC.LineFont(IGESData_DefVoid);
66 DC.LineWeight(IGESData_DefVoid);
67 DC.Color(IGESData_DefVoid);
68 DC.BlankStatusIgnored();
69 DC.HierarchyStatusIgnored();
70 return DC;
71}
72
73void IGESBasic_ToolExternalRefFileName::OwnCheck
74 (const Handle(IGESBasic_ExternalRefFileName)& ent,
75 const Interface_ShareTool& , Handle(Interface_Check)& ach) const
76{
77 if (ent->FormNumber() == 1)
78 ach->AddFail("Invalid Form Number");
79}
80
81void IGESBasic_ToolExternalRefFileName::OwnDump
82 (const Handle(IGESBasic_ExternalRefFileName)& ent, const IGESData_IGESDumper& /* dumper */,
83 const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const
84{
85 S << "IGESBasic_ExternalRefFileName" << endl;
86 S << "External Reference File Identifier : ";
87 IGESData_DumpString(S,ent->FileId());
88 S << endl;
89 S << "External Reference Symbolic Name : ";
90 IGESData_DumpString(S,ent->ReferenceName());
91 S << endl;
92}