973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | #include <IGESData_DefaultSpecific.ixx> |
15 | #include <IGESData_UndefinedEntity.hxx> |
16 | #include <Interface_UndefinedContent.hxx> |
17 | #include <IGESData_SpecificLib.hxx> |
18 | #include <IGESData.hxx> |
19 | #include <IGESData_Protocol.hxx> |
20 | #include <TCollection_HAsciiString.hxx> |
21 | #include <Interface_Macros.hxx> |
22 | #include <Message_Messenger.hxx> |
23 | |
24 | |
b311480e |
25 | IGESData_DefaultSpecific::IGESData_DefaultSpecific () |
7fd59977 |
26 | { IGESData_SpecificLib::SetGlobal(this, IGESData::Protocol()); } |
27 | |
28 | void IGESData_DefaultSpecific::OwnDump |
29 | (const Standard_Integer /*CN*/, const Handle(IGESData_IGESEntity)& ent, |
30 | const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, |
31 | const Standard_Integer /*own*/) const |
32 | { |
33 | DeclareAndCast(IGESData_UndefinedEntity,lent,ent); |
34 | if (lent.IsNull()) return; |
35 | |
36 | Standard_Integer dstat = lent->DirStatus(); |
37 | if (dstat != 0) S |
38 | << " -- Directory Entry Error Status = " << dstat << " --" << endl; |
39 | Handle(Interface_UndefinedContent) cont = lent->UndefinedContent(); |
40 | Standard_Integer nb = cont->NbParams(); |
41 | S << " UNDEFINED ENTITY ...\n"<<nb |
42 | <<" Parameters (WARNING : Odd Integer Values Interpreted as Entities)\n"; |
43 | for (Standard_Integer i = 1; i <= nb; i ++) { |
44 | Interface_ParamType ptyp = cont->ParamType(i); |
45 | if (ptyp == Interface_ParamVoid) S<<" ["<<i<<":Void]"; |
46 | else if (cont->IsParamEntity(i)) { |
47 | DeclareAndCast(IGESData_IGESEntity,anent,cont->ParamEntity(i)); |
48 | S<<" ["<<i<<":IGES]="; |
49 | dumper.PrintDNum(anent,S); |
50 | } |
51 | else { S<<" ["<<i<<"]=" << cont->ParamValue(i); } |
52 | if ( i == (i%5)*5) S << endl; |
53 | } |
54 | S << endl; |
55 | } |