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 | |
42cf5bc1 |
14 | |
7fd59977 |
15 | #include <IGESData_FreeFormatEntity.hxx> |
42cf5bc1 |
16 | #include <IGESData_IGESEntity.hxx> |
7fd59977 |
17 | #include <IGESData_IGESModel.hxx> |
42cf5bc1 |
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> |
7fd59977 |
24 | |
92efcf78 |
25 | IMPLEMENT_STANDARD_RTTIEXT(IGESData_Protocol,Interface_Protocol) |
26 | |
b311480e |
27 | IGESData_Protocol::IGESData_Protocol () { } |
7fd59977 |
28 | |
29 | |
30 | Standard_Integer IGESData_Protocol::NbResources () const { return 0; } |
31 | |
32 | Handle(Interface_Protocol) IGESData_Protocol::Resource |
35e08fe8 |
33 | (const Standard_Integer /*num*/) const |
7fd59977 |
34 | { Handle(Interface_Protocol) nulpro; return nulpro; } |
35 | |
36 | |
37 | // TypeNumber : Ici, on reconnait UndefinedEntity (faut bien quelqu un) |
38 | |
39 | Standard_Integer IGESData_Protocol::TypeNumber |
40 | (const Handle(Standard_Type)& atype) const |
41 | { |
42 | if (atype->SubType(STANDARD_TYPE(IGESData_UndefinedEntity))) return 1; |
43 | return 0; |
44 | } |
45 | |
46 | Handle(Interface_InterfaceModel) IGESData_Protocol::NewModel () const |
47 | { return new IGESData_IGESModel; } |
48 | |
49 | Standard_Boolean IGESData_Protocol::IsSuitableModel |
50 | (const Handle(Interface_InterfaceModel)& model) const |
51 | { return model->IsKind(STANDARD_TYPE(IGESData_IGESModel)); } |
52 | |
53 | Handle(Standard_Transient) IGESData_Protocol::UnknownEntity () const |
54 | { return new IGESData_UndefinedEntity; } |
55 | |
56 | Standard_Boolean IGESData_Protocol::IsUnknownEntity |
57 | (const Handle(Standard_Transient)& ent) const |
58 | { return ent->IsKind(STANDARD_TYPE(IGESData_UndefinedEntity)); } |