0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
[occt.git] / src / Aspect / Aspect_AspectMarker.cxx
1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 //-Version      
17 //-Design       Declaration of variables specific to the context
18 //              of tracing of markers
19 //-Warning      Context of tracing of markers is defined by :
20 //              - the color
21 //              - the type
22 //              - the scale
23 //-References   
24 //-Language     C++ 2.0
25 //-Declarations
26 // for the class
27
28 #include <Aspect_AspectMarker.hxx>
29 #include <Aspect_AspectMarkerDefinitionError.hxx>
30 #include <Quantity_Color.hxx>
31 #include <Standard_Type.hxx>
32
33 //-Aliases
34 //-Global data definitions
35 //      -- color
36 //      MyColor :       Color;
37 //      -- type
38 //      MyType  :       TypeOfMarker;
39 //      -- scale
40 //      MyScale :       Standard_Real;
41 //-Constructors
42 //-Destructors
43 //-Methods, in order
44 Aspect_AspectMarker::Aspect_AspectMarker () {
45
46         MyColor = Quantity_NOC_YELLOW;
47         MyType  = Aspect_TOM_X;
48         MyScale = 1.0;
49
50 }
51
52 Aspect_AspectMarker::Aspect_AspectMarker (const Quantity_Color& AColor, const Aspect_TypeOfMarker AType, const Standard_Real AScale) {
53
54         if (AScale <= 0.0)
55                 Aspect_AspectMarkerDefinitionError::Raise
56                         ("Bad value for MarkerScale");
57
58         MyColor = AColor;
59         MyType  = AType;
60         MyScale = AScale;
61
62 }
63
64 void Aspect_AspectMarker::SetColor (const Quantity_Color& AColor) {
65
66         MyColor = AColor;
67
68 }
69
70 void Aspect_AspectMarker::SetType (const Aspect_TypeOfMarker AType) {
71
72         MyType  = AType;
73
74 }
75
76 void Aspect_AspectMarker::SetScale (const Standard_Real AScale) {
77
78         if (AScale <= 0.0)
79                 Aspect_AspectMarkerDefinitionError::Raise
80                         ("Bad value for MarkerScale");
81
82         MyScale = AScale;
83
84 }
85
86 void Aspect_AspectMarker::Values (Quantity_Color& AColor, Aspect_TypeOfMarker& AType, Standard_Real& AScale) const {
87
88         AColor  = MyColor;
89         AType   = MyType;
90         AScale  = MyScale;
91
92 }