0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / StepVisual / StepVisual_PresentationStyleSelect.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Interface_Macros.hxx>
16 #include <Standard_Transient.hxx>
17 #include <StepVisual_CurveStyle.hxx>
18 #include <StepVisual_FillAreaStyle.hxx>
19 #include <StepVisual_NullStyleMember.hxx>
20 #include <StepVisual_PointStyle.hxx>
21 #include <StepVisual_PresentationStyleSelect.hxx>
22 #include <StepVisual_SurfaceStyleUsage.hxx>
23 #include <StepVisual_TextStyle.hxx>
24
25 StepVisual_PresentationStyleSelect::StepVisual_PresentationStyleSelect () {  }
26
27 Standard_Integer StepVisual_PresentationStyleSelect::CaseNum(const Handle(Standard_Transient)& ent) const
28 {
29         if (ent.IsNull()) return 0;
30         if (ent->IsKind(STANDARD_TYPE(StepVisual_PointStyle))) return 1;
31         if (ent->IsKind(STANDARD_TYPE(StepVisual_CurveStyle))) return 2;
32         if (ent->IsKind(STANDARD_TYPE(StepVisual_SurfaceStyleUsage))) return 3;
33 //      if (ent->IsKind(STANDARD_TYPE(StepVisual_SymbolStyle))) return 4;
34 //      if (ent->IsKind(STANDARD_TYPE(StepVisual_FillAreaStyle))) return 5;
35 //      if (ent->IsKind(STANDARD_TYPE(StepVisual_TextStyle))) return 6;
36   if (ent->IsKind(STANDARD_TYPE(StepVisual_NullStyleMember))) return 7;
37         return 0;
38 }
39
40 Handle(StepVisual_PointStyle) StepVisual_PresentationStyleSelect::PointStyle () const
41 {
42         return GetCasted(StepVisual_PointStyle,Value());
43 }
44
45 Handle(StepVisual_CurveStyle) StepVisual_PresentationStyleSelect::CurveStyle () const
46 {
47         return GetCasted(StepVisual_CurveStyle,Value());
48 }
49
50 Handle(StepVisual_NullStyleMember) StepVisual_PresentationStyleSelect::NullStyle () const
51 {
52         return GetCasted(StepVisual_NullStyleMember,Value());
53 }
54
55 Handle(StepVisual_SurfaceStyleUsage) StepVisual_PresentationStyleSelect::SurfaceStyleUsage () const
56 {
57         return GetCasted(StepVisual_SurfaceStyleUsage,Value());
58 }