0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / StepData / StepData_FileProtocol.cxx
CommitLineData
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//
973c2be1 5// This library is free software; you can redistribute it and / or modify it
6// under the terms of the GNU Lesser General Public 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.
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 <StepData_FileProtocol.ixx>
15
16
17//static TCollection_AsciiString thename("");
18static Standard_CString thename = "";
19
20// Protocol fabrique a la demande avec d autres Protocoles
21
22
23 StepData_FileProtocol::StepData_FileProtocol () { }
24
25 void StepData_FileProtocol::Add (const Handle(StepData_Protocol)& protocol)
26{
27 if (protocol.IsNull()) return;
28 Handle(Standard_Type) ptype = protocol->DynamicType();
29 Standard_Integer nb = thecomps.Length();
30 for (Standard_Integer i = 1; i <= nb; i ++) {
31 if (thecomps.Value(i)->IsInstance(ptype)) return;
32 }
33 thecomps.Append(protocol);
34}
35
36
37 Standard_Integer StepData_FileProtocol::NbResources () const
38 { return thecomps.Length(); }
39
40 Handle(Interface_Protocol) StepData_FileProtocol::Resource
41 (const Standard_Integer num) const
42 { return Handle(Interface_Protocol)::DownCast(thecomps.Value(num)); }
43
44
45 Standard_Integer StepData_FileProtocol::TypeNumber
35e08fe8 46 (const Handle(Standard_Type)& /*atype*/) const
7fd59977 47 { return 0; }
48
49
50Standard_Boolean StepData_FileProtocol::GlobalCheck(const Interface_Graph& G,
51 Handle(Interface_Check)& ach) const
52{
53 Standard_Boolean res = Standard_False;
54 Standard_Integer i,nb = NbResources();
55 for (i = 1; i <= nb; i ++) res |= Resource(i)->GlobalCheck (G,ach);
56 return res;
57}
58
59
60 Standard_CString StepData_FileProtocol::SchemaName () const
61 { return thename; }