1 // Created on: 1993-07-23
2 // Created by: Christian CAILLET
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _StepData_FileProtocol_HeaderFile
18 #define _StepData_FileProtocol_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TColStd_SequenceOfTransient.hxx>
24 #include <StepData_Protocol.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_Type.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_CString.hxx>
29 class StepData_Protocol;
30 class Interface_Protocol;
31 class Interface_Graph;
32 class Interface_Check;
35 class StepData_FileProtocol;
36 DEFINE_STANDARD_HANDLE(StepData_FileProtocol, StepData_Protocol)
38 //! A FileProtocol is defined as the addition of several already
39 //! existing Protocols. It corresponds to the definition of a
40 //! SchemaName with several Names, each one being attached to a
41 //! specific Protocol. Thus, a File defined with a compound Schema
42 //! is processed as any other one, once built the equivalent
43 //! compound Protocol, a FileProtocol
44 class StepData_FileProtocol : public StepData_Protocol
50 //! Creates an empty FileProtocol
51 Standard_EXPORT StepData_FileProtocol();
53 //! Adds a Protocol to the definition list of the FileProtocol
54 //! But ensures that each class of Protocol is present only once
56 Standard_EXPORT void Add (const Handle(StepData_Protocol)& protocol);
58 //! Gives the count of Protocols used as Resource (can be zero)
59 //! i.e. the count of Protocol recorded by calling the method Add
60 Standard_EXPORT virtual Standard_Integer NbResources() const Standard_OVERRIDE;
62 //! Returns a Resource, given a rank. Here, rank of calling Add
63 Standard_EXPORT virtual Handle(Interface_Protocol) Resource (const Standard_Integer num) const Standard_OVERRIDE;
65 //! Returns a Case Number, specific of each recognized Type
66 //! Here, NO Type at all is recognized properly : all Types are
67 //! recognized by the resources
68 Standard_EXPORT virtual Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const Standard_OVERRIDE;
70 //! Calls GlobalCheck for each of its recorded ressources
71 Standard_EXPORT virtual Standard_Boolean GlobalCheck (const Interface_Graph& G, Handle(Interface_Check)& ach) const Standard_OVERRIDE;
73 //! Returns the Schema Name attached to each class of Protocol
74 //! To be redefined by each sub-class
75 //! Here, SchemaName returns "" (empty String)
76 //! was C++ : return const
77 Standard_EXPORT virtual Standard_CString SchemaName() const Standard_OVERRIDE;
82 DEFINE_STANDARD_RTTI(StepData_FileProtocol,StepData_Protocol)
92 TColStd_SequenceOfTransient thecomps;
103 #endif // _StepData_FileProtocol_HeaderFile