0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / MeshVS / MeshVS_Drawer.hxx
CommitLineData
42cf5bc1 1// Created on: 2003-11-27
2// Created by: Alexander SOLOVYOV
3// Copyright (c) 2003-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 _MeshVS_Drawer_HeaderFile
17#define _MeshVS_Drawer_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <TColStd_DataMapOfIntegerInteger.hxx>
23#include <MeshVS_DataMapOfIntegerBoolean.hxx>
24#include <TColStd_DataMapOfIntegerReal.hxx>
25#include <MeshVS_DataMapOfIntegerColor.hxx>
26#include <MeshVS_DataMapOfIntegerMaterial.hxx>
27#include <MeshVS_DataMapOfIntegerAsciiString.hxx>
25e59720 28#include <Standard_Transient.hxx>
42cf5bc1 29#include <Standard_Integer.hxx>
30#include <Standard_Real.hxx>
31#include <Standard_Boolean.hxx>
32class Quantity_Color;
33class Graphic3d_MaterialAspect;
34class TCollection_AsciiString;
35
36
37class MeshVS_Drawer;
25e59720 38DEFINE_STANDARD_HANDLE(MeshVS_Drawer, Standard_Transient)
42cf5bc1 39
40//! This class provided the common interface to share between classes
41//! big set of constants affecting to object appearance. By default, this class
42//! can store integers, doubles, OCC colors, OCC materials. Each of OCC enum members
43//! can be stored as integers.
25e59720 44class MeshVS_Drawer : public Standard_Transient
42cf5bc1 45{
46
47public:
48
49
50 //! This method copies other drawer contents to this.
51 Standard_EXPORT virtual void Assign (const Handle(MeshVS_Drawer)& aDrawer);
52
53 Standard_EXPORT void SetInteger (const Standard_Integer Key, const Standard_Integer Value);
54
55 Standard_EXPORT void SetDouble (const Standard_Integer Key, const Standard_Real Value);
56
57 Standard_EXPORT void SetBoolean (const Standard_Integer Key, const Standard_Boolean Value);
58
59 Standard_EXPORT void SetColor (const Standard_Integer Key, const Quantity_Color& Value);
60
61 Standard_EXPORT void SetMaterial (const Standard_Integer Key, const Graphic3d_MaterialAspect& Value);
62
63 Standard_EXPORT void SetAsciiString (const Standard_Integer Key, const TCollection_AsciiString& Value);
64
65 Standard_EXPORT Standard_Boolean GetInteger (const Standard_Integer Key, Standard_Integer& Value) const;
66
67 Standard_EXPORT Standard_Boolean GetDouble (const Standard_Integer Key, Standard_Real& Value) const;
68
69 Standard_EXPORT Standard_Boolean GetBoolean (const Standard_Integer Key, Standard_Boolean& Value) const;
70
71 Standard_EXPORT Standard_Boolean GetColor (const Standard_Integer Key, Quantity_Color& Value) const;
72
73 Standard_EXPORT Standard_Boolean GetMaterial (const Standard_Integer Key, Graphic3d_MaterialAspect& Value) const;
74
75 Standard_EXPORT Standard_Boolean GetAsciiString (const Standard_Integer Key, TCollection_AsciiString& Value) const;
76
77 Standard_EXPORT Standard_Boolean RemoveInteger (const Standard_Integer Key);
78
79 Standard_EXPORT Standard_Boolean RemoveDouble (const Standard_Integer Key);
80
81 Standard_EXPORT Standard_Boolean RemoveBoolean (const Standard_Integer Key);
82
83 Standard_EXPORT Standard_Boolean RemoveColor (const Standard_Integer Key);
84
85 Standard_EXPORT Standard_Boolean RemoveMaterial (const Standard_Integer Key);
86
87 Standard_EXPORT Standard_Boolean RemoveAsciiString (const Standard_Integer Key);
88
89
90
91
25e59720 92 DEFINE_STANDARD_RTTIEXT(MeshVS_Drawer,Standard_Transient)
42cf5bc1 93
94protected:
95
96
97
98
99private:
100
101
102 TColStd_DataMapOfIntegerInteger myIntegers;
103 MeshVS_DataMapOfIntegerBoolean myBooleans;
104 TColStd_DataMapOfIntegerReal myDoubles;
105 MeshVS_DataMapOfIntegerColor myColors;
106 MeshVS_DataMapOfIntegerMaterial myMaterials;
107 MeshVS_DataMapOfIntegerAsciiString myAsciiString;
108
109
110};
111
112
113
114
115
116
117
118#endif // _MeshVS_Drawer_HeaderFile