1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <IGESData_FreeFormatEntity.hxx>
16 #include <IGESData_IGESEntity.hxx>
17 #include <IGESData_IGESModel.hxx>
18 #include <IGESData_Protocol.hxx>
19 #include <IGESData_UndefinedEntity.hxx>
20 #include <Interface_InterfaceModel.hxx>
21 #include <Interface_Protocol.hxx>
22 #include <Standard_Transient.hxx>
23 #include <Standard_Type.hxx>
25 IMPLEMENT_STANDARD_RTTIEXT(IGESData_Protocol,Interface_Protocol)
27 IGESData_Protocol::IGESData_Protocol () { }
30 Standard_Integer IGESData_Protocol::NbResources () const { return 0; }
32 Handle(Interface_Protocol) IGESData_Protocol::Resource
33 (const Standard_Integer /*num*/) const
34 { Handle(Interface_Protocol) nulpro; return nulpro; }
37 // TypeNumber : Ici, on reconnait UndefinedEntity (faut bien quelqu un)
39 Standard_Integer IGESData_Protocol::TypeNumber
40 (const Handle(Standard_Type)& atype) const
42 if (atype->SubType(STANDARD_TYPE(IGESData_UndefinedEntity))) return 1;
46 Handle(Interface_InterfaceModel) IGESData_Protocol::NewModel () const
47 { return new IGESData_IGESModel; }
49 Standard_Boolean IGESData_Protocol::IsSuitableModel
50 (const Handle(Interface_InterfaceModel)& model) const
51 { return model->IsKind(STANDARD_TYPE(IGESData_IGESModel)); }
53 Handle(Standard_Transient) IGESData_Protocol::UnknownEntity () const
54 { return new IGESData_UndefinedEntity; }
56 Standard_Boolean IGESData_Protocol::IsUnknownEntity
57 (const Handle(Standard_Transient)& ent) const
58 { return ent->IsKind(STANDARD_TYPE(IGESData_UndefinedEntity)); }