0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / StepSelect / StepSelect_StepType.hxx
1 // Created on: 1994-12-22
2 // Created by: Christian CAILLET
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _StepSelect_StepType_HeaderFile
18 #define _StepSelect_StepType_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <StepData_WriterLib.hxx>
24 #include <IFSelect_Signature.hxx>
25 #include <Standard_CString.hxx>
26 class StepData_Protocol;
27 class Interface_InterfaceError;
28 class Interface_Protocol;
29 class Standard_Transient;
30 class Interface_InterfaceModel;
31
32
33 class StepSelect_StepType;
34 DEFINE_STANDARD_HANDLE(StepSelect_StepType, IFSelect_Signature)
35
36 //! StepType is a Signature specific to Step definitions : it
37 //! considers the type as defined in STEP Schemas, the same which
38 //! is used in files.
39 //! For a Complex Type, if its definition is known, StepType
40 //! produces the list of basic types, separated by commas, the
41 //! whole between brackets : "(TYPE1,TYPE2..)".
42 //! If its precise definition is not known (simply it is known as
43 //! Complex, it can be recognised, but the list is produced at
44 //! Write time only), StepType produces : "(..COMPLEX TYPE..)"
45 class StepSelect_StepType : public IFSelect_Signature
46 {
47
48 public:
49
50   
51   //! Creates a Signature for Step Type. Protocol is undefined here,
52   //! hence no Signature may yet be produced. The StepType signature
53   //! requires a Protocol before working
54   Standard_EXPORT StepSelect_StepType();
55   
56   //! Sets the StepType signature to work with a Protocol : this
57   //! initialises the library
58   Standard_EXPORT void SetProtocol (const Handle(Interface_Protocol)& proto);
59   
60   //! Returns the Step Type defined from the Protocol (see above).
61   //! If <ent> is not recognised, produces "..NOT FROM SCHEMA <name>.."
62   Standard_EXPORT Standard_CString Value (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
63
64
65
66
67   DEFINE_STANDARD_RTTIEXT(StepSelect_StepType,IFSelect_Signature)
68
69 protected:
70
71
72   StepData_WriterLib thelib;
73
74
75 private:
76
77
78   Handle(StepData_Protocol) theproto;
79
80
81 };
82
83
84
85
86
87
88
89 #endif // _StepSelect_StepType_HeaderFile