0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
[occt.git] / src / IGESBasic / IGESBasic_ToolExternalRefLibName.cxx
CommitLineData
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//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 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
42cf5bc1 19#include <IGESBasic_ExternalRefLibName.hxx>
20#include <IGESBasic_ToolExternalRefLibName.hxx>
21#include <IGESData_DirChecker.hxx>
22#include <IGESData_Dump.hxx>
23#include <IGESData_IGESDumper.hxx>
24#include <IGESData_IGESReaderData.hxx>
25#include <IGESData_IGESWriter.hxx>
7fd59977 26#include <IGESData_ParamCursor.hxx>
42cf5bc1 27#include <IGESData_ParamReader.hxx>
28#include <Interface_Check.hxx>
29#include <Interface_CopyTool.hxx>
30#include <Interface_EntityIterator.hxx>
7fd59977 31#include <Interface_Macros.hxx>
42cf5bc1 32#include <Interface_ShareTool.hxx>
33#include <Message_Messenger.hxx>
34#include <Standard_DomainError.hxx>
35#include <TCollection_HAsciiString.hxx>
7fd59977 36
37IGESBasic_ToolExternalRefLibName::IGESBasic_ToolExternalRefLibName () { }
38
39
40void IGESBasic_ToolExternalRefLibName::ReadOwnParams
41 (const Handle(IGESBasic_ExternalRefLibName)& ent,
42 const Handle(IGESData_IGESReaderData)& /* IR */, IGESData_ParamReader& PR) const
43{
44 //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
45 Handle(TCollection_HAsciiString) tempLibName;
46 Handle(TCollection_HAsciiString) tempExtRefEntitySymbName;
47 PR.ReadText(PR.Current(), "Name of Library", tempLibName); //szv#4:S4163:12Mar99 `st=` not needed
48 PR.ReadText(PR.Current(), "External Reference Symbolic Name",
49 tempExtRefEntitySymbName); //szv#4:S4163:12Mar99 `st=` not needed
50
51 DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
52 ent->Init(tempLibName, tempExtRefEntitySymbName);
53}
54
55void IGESBasic_ToolExternalRefLibName::WriteOwnParams
56 (const Handle(IGESBasic_ExternalRefLibName)& ent, IGESData_IGESWriter& IW) const
57{
58 IW.Send(ent->LibraryName());
59 IW.Send(ent->ReferenceName());
60}
61
62void IGESBasic_ToolExternalRefLibName::OwnShared
63 (const Handle(IGESBasic_ExternalRefLibName)& /* ent */, Interface_EntityIterator& /* iter */) const
64{
65}
66
67void IGESBasic_ToolExternalRefLibName::OwnCopy
68 (const Handle(IGESBasic_ExternalRefLibName)& another,
69 const Handle(IGESBasic_ExternalRefLibName)& ent, Interface_CopyTool& /* TC */) const
70{
71 Handle(TCollection_HAsciiString) tempLibName =
72 new TCollection_HAsciiString(another->LibraryName());
73 Handle(TCollection_HAsciiString) tempRefName =
74 new TCollection_HAsciiString(another->ReferenceName());
75 ent->Init(tempLibName, tempRefName);
76}
77
78IGESData_DirChecker IGESBasic_ToolExternalRefLibName::DirChecker
79 (const Handle(IGESBasic_ExternalRefLibName)& /* ent */ ) const
80{
81 IGESData_DirChecker DC(416, 4);
82 DC.Structure(IGESData_DefVoid);
83 DC.GraphicsIgnored();
84 DC.LineFont(IGESData_DefVoid);
85 DC.LineWeight(IGESData_DefVoid);
86 DC.Color(IGESData_DefVoid);
87 DC.BlankStatusRequired(0);
88 DC.HierarchyStatusRequired(0);
89 return DC;
90}
91
92void IGESBasic_ToolExternalRefLibName::OwnCheck
93 (const Handle(IGESBasic_ExternalRefLibName)& /* ent */,
94 const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const
95{
96}
97
98void IGESBasic_ToolExternalRefLibName::OwnDump
99 (const Handle(IGESBasic_ExternalRefLibName)& ent, const IGESData_IGESDumper& /* dumper */,
100 const Handle(Message_Messenger)& S,const Standard_Integer /* level */) const
101{
04232180 102 S << "IGESBasic_ExternalRefLibName" << Message_EndLine;
7fd59977 103 S << "Name of Library : ";
104 IGESData_DumpString(S,ent->LibraryName());
04232180 105 S << Message_EndLine;
7fd59977 106 S << "External Reference Symbolic Name : ";
107 IGESData_DumpString(S,ent->ReferenceName());
04232180 108 S << Message_EndLine;
7fd59977 109}