Coriolis Core (CRL) Documentation


GraphicToolEngine.h
1// -*- C++ -*-
2//
3// This file is part of the Coriolis Software.
4// Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved
5//
6// +-----------------------------------------------------------------+
7// | C O R I O L I S |
8// | Alliance / Hurricane Interface |
9// | |
10// | Author : Jean-Paul Chaput |
11// | E-mail : Jean-Paul.Chaput@lip6.fr |
12// | =============================================================== |
13// | C++ Header : "./crlcore/GraphicToolEngine.h" |
14// +-----------------------------------------------------------------+
15
16
17#ifndef CRL_GRAPHIC_TOOL_H
18#define CRL_GRAPHIC_TOOL_H
19
20#include <string>
21#include <map>
22#include <functional>
23#include <QObject>
24
25class QMenu;
26
27#include "hurricane/Error.h"
28#include "hurricane/viewer/CellWidget.h"
29#include "hurricane/viewer/ExceptionWidget.h"
30
31
32namespace Hurricane {
33 class Name;
34 class Cell;
35 class CellViewer;
36}
37
38
39namespace CRL {
40
41 using std::string;
42 using std::map;
43 using Hurricane::Error;
44 using Hurricane::Exception;
45 using Hurricane::Name;
46 using Hurricane::Cell;
47 using Hurricane::CellWidget;
48 using Hurricane::CellViewer;
49 using Hurricane::ExceptionWidget;
50
51
52// -------------------------------------------------------------------
53// Class : "CRL::GraphicTool".
54
55 class GraphicTool : public QObject {
56 Q_OBJECT;
57
58 public:
59 class DrawGoFunctions {
60 private:
61 CellWidget::InitExtensionGo_t* _init;
62 CellWidget::DrawExtensionGo_t* _draw;
63 public:
64 inline DrawGoFunctions ( CellWidget::InitExtensionGo_t*
65 , CellWidget::DrawExtensionGo_t*
66 );
67 inline CellWidget::DrawExtensionGo_t* getDraw () const;
68 inline CellWidget::InitExtensionGo_t* getInit () const;
69 };
70 public:
71 typedef map<Name,DrawGoFunctions> DrawGoMap;
72 public:
73 void addDrawGo ( const Name&
74 , CellWidget::InitExtensionGo_t*
75 , CellWidget::DrawExtensionGo_t*
76 );
77 DrawGoFunctions* getDrawGo ( const Name& );
78 inline const DrawGoMap& getDrawGos () const;
79 virtual void addToMenu ( CellViewer* ) = 0;
80 virtual const Name& getName () const = 0;
81 virtual size_t release () = 0;
82 protected:
83 map<Name,DrawGoFunctions> _drawGoMap;
84 protected:
85 GraphicTool ();
86 virtual ~GraphicTool ();
87 protected:
88 };
89
90
91// Inline Functions.
92 inline GraphicTool::DrawGoFunctions::DrawGoFunctions ( CellWidget::InitExtensionGo_t* init
93 , CellWidget::DrawExtensionGo_t* draw
94 )
95 : _init(init)
96 , _draw(draw)
97 { }
98
99 inline CellWidget::DrawExtensionGo_t* GraphicTool::DrawGoFunctions::getDraw () const
100 { return _draw; }
101
102 inline CellWidget::InitExtensionGo_t* GraphicTool::DrawGoFunctions::getInit () const
103 { return _init; }
104
105 inline const GraphicTool::DrawGoMap& GraphicTool::getDrawGos () const
106 { return _drawGoMap; }
107
108
109} // CRL namespace.
110
111#endif // CRL_GRAPHIC_TOOL_H
virtual void addToMenu(CellViewer *)=0
virtual const Name & getName() const =0
The namespace of Coriolis Core.
Definition AcmSigda.h:28


Generated by doxygen 1.16.1 on Return to top of page
Coriolis Core (CRL) Copyright © 2008-2020 Sorbonne Universite, All rights reserved