OpenASIP
2.0
src
procgen
ProDe
PasteComponentCmd.hh
Go to the documentation of this file.
1
/*
2
Copyright (c) 2002-2009 Tampere University.
3
4
This file is part of TTA-Based Codesign Environment (TCE).
5
6
Permission is hereby granted, free of charge, to any person obtaining a
7
copy of this software and associated documentation files (the "Software"),
8
to deal in the Software without restriction, including without limitation
9
the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
and/or sell copies of the Software, and to permit persons to whom the
11
Software is furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
DEALINGS IN THE SOFTWARE.
23
*/
24
/**
25
* @file PasteComponentCmd.hh
26
*
27
* Declaration of PasteComponentCmd class.
28
*
29
* @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30
*/
31
32
#ifndef TTA_PASTE_COMPONENT_CMD_HH
33
#define TTA_PASTE_COMPONENT_CMD_HH
34
35
#include <wx/wx.h>
36
#include <wx/cmdproc.h>
37
38
#include "
EditorCommand.hh
"
39
#include "
Model.hh
"
40
41
namespace
TTAMachine
{
42
class
Component;
43
class
Machine;
44
}
45
46
/**
47
* Command for pasting components from the clipboard to the machine.
48
*/
49
class
PasteComponentCmd
:
public
EditorCommand
{
50
public
:
51
PasteComponentCmd
();
52
virtual
bool
Do
();
53
virtual
int
id
()
const
;
54
virtual
PasteComponentCmd
*
create
()
const
;
55
virtual
std::string
icon
()
const
;
56
virtual
bool
isEnabled
();
57
58
private
:
59
template
<
class
ComponentNavigator>
60
void
paste
(
TTAMachine::Machine
&
machine
,
61
TTAMachine::Component
* component,
62
ComponentNavigator& navigator);
63
64
bool
setMachine
(
65
TTAMachine::Component
* component,
66
TTAMachine::Machine
*
machine
);
67
};
68
69
#include "
PasteComponentCmd.icc
"
70
71
#endif
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition:
EstimatorCmdLineUI.cc:59
PasteComponentCmd.icc
PasteComponentCmd::icon
virtual std::string icon() const
Definition:
PasteComponentCmd.cc:233
PasteComponentCmd::paste
void paste(TTAMachine::Machine &machine, TTAMachine::Component *component, ComponentNavigator &navigator)
Model.hh
TTAMachine::Component
Definition:
MachinePart.hh:90
PasteComponentCmd::isEnabled
virtual bool isEnabled()
Definition:
PasteComponentCmd.cc:248
PasteComponentCmd::create
virtual PasteComponentCmd * create() const
Definition:
PasteComponentCmd.cc:221
PasteComponentCmd
Definition:
PasteComponentCmd.hh:49
PasteComponentCmd::PasteComponentCmd
PasteComponentCmd()
Definition:
PasteComponentCmd.cc:64
PasteComponentCmd::Do
virtual bool Do()
Definition:
PasteComponentCmd.cc:79
PasteComponentCmd::id
virtual int id() const
Definition:
PasteComponentCmd.cc:210
EditorCommand
Definition:
EditorCommand.hh:46
TTAMachine
Definition:
Assembler.hh:48
PasteComponentCmd::setMachine
bool setMachine(TTAMachine::Component *component, TTAMachine::Machine *machine)
EditorCommand.hh
TTAMachine::Machine
Definition:
Machine.hh:73
Generated by
1.8.17