0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / Aspect / Aspect_AspectLine.hxx
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 #ifndef _Aspect_AspectLine_HeaderFile
17 #define _Aspect_AspectLine_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21
22 #include <Quantity_Color.hxx>
23 #include <Aspect_TypeOfLine.hxx>
24 #include <Standard_Real.hxx>
25 #include <MMgt_TShared.hxx>
26 class Aspect_AspectLineDefinitionError;
27 class Quantity_Color;
28
29
30 class Aspect_AspectLine;
31 DEFINE_STANDARD_HANDLE(Aspect_AspectLine, MMgt_TShared)
32
33 //! This class allows the definition of a group
34 //! of attributes for the LINE primitive
35 //! The attributes are:
36 //! * Colour
37 //! * Type
38 //! * Thickness
39 //! When any value of the group is modified
40 //! all graphic objects using the group are modified.
41 class Aspect_AspectLine : public MMgt_TShared
42 {
43
44 public:
45
46   
47   //! Modifies the colour of <me>.
48   Standard_EXPORT void SetColor (const Quantity_Color& AColor);
49   
50   //! Modifies the type of <me>.
51   Standard_EXPORT void SetType (const Aspect_TypeOfLine AType);
52   
53   //! Modifies the thickness of <me>.
54   //! Category: Methods to modify the class definition
55   //! Warning: Raises AspectLineDefinitionError if the
56   //! width is a negative value.
57   Standard_EXPORT void SetWidth (const Standard_Real AWidth);
58   
59   //! Returns the current values of the group <me>.
60   Standard_EXPORT void Values (Quantity_Color& AColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const;
61
62
63
64
65   DEFINE_STANDARD_RTTIEXT(Aspect_AspectLine,MMgt_TShared)
66
67 protected:
68
69   
70   //! Initialise the constructor for Graphic3d_AspectLine3d.
71   //!
72   //! Default values :
73   //! Color = Quantity_NOC_YELLOW;
74   //! Type  = Aspect_TOL_SOLID;
75   //! Width = 1.0;
76   Standard_EXPORT Aspect_AspectLine();
77   
78   //! Initialise the values for the
79   //! constructor of Graphic3d_AspectLine3d.
80   Standard_EXPORT Aspect_AspectLine(const Quantity_Color& AColor, const Aspect_TypeOfLine AType, const Standard_Real AWidth);
81
82
83
84 private:
85
86
87   Quantity_Color MyColor;
88   Aspect_TypeOfLine MyType;
89   Standard_Real MyWidth;
90
91
92 };
93
94
95
96
97
98
99
100 #endif // _Aspect_AspectLine_HeaderFile