Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_MacroArcReentrantMessage.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef SketchPlugin_MacroArcReentrantMessage_H_
22 #define SketchPlugin_MacroArcReentrantMessage_H_
23
24 #include <ModelAPI_EventReentrantMessage.h>
25 #include <Events_Loop.h>
26
27 #include <SketchPlugin.h>
28
29 #include <memory>
30
31 /// Message that style of visualization of parameter is changed.
32 /// It will be shown as expression or value
33 class SketchPlugin_MacroArcReentrantMessage : public ModelAPI_EventReentrantMessage
34 {
35 public:
36   /// Creates an empty message
37   SKETCHPLUGIN_EXPORT SketchPlugin_MacroArcReentrantMessage(const Events_ID theID,
38                                                             const void* theSender)
39   : ModelAPI_EventReentrantMessage(theID, theSender) {}
40   /// The virtual destructor
41   SKETCHPLUGIN_EXPORT virtual ~SketchPlugin_MacroArcReentrantMessage() {}
42   /// Static. Returns EventID of the message.
43
44   inline static Events_ID eventId()
45   {
46     static const char * MY_EVENT_MACRO_ARC_MESSAGE_ID("MacroArcReentrantMessage");
47     return Events_Loop::eventByName(MY_EVENT_MACRO_ARC_MESSAGE_ID);
48   }
49
50   /// Stores type of creation
51   /// \param the type
52   SKETCHPLUGIN_EXPORT void setTypeOfCreation(const std::string& theType)
53   { myTypeOfCreation = theType; }
54
55   /// Returns type of creation
56   /// \return the type
57   SKETCHPLUGIN_EXPORT std::string typeOfCreation() const { return myTypeOfCreation; }
58
59 private:
60   std::string myTypeOfCreation; ///< to know what parameters of new feature should be filled
61 };
62
63
64 #endif