OpenASIP  2.0
OSEdMemoryCmd.cc
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 OSEdMemoryCmd.cc
26  *
27  * Definition of OSEdMemoryCmd class.
28  *
29  * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include "OSEdMemoryCmd.hh"
34 #include "MemoryDialog.hh"
35 #include "OSEdConstants.hh"
36 #include "OSEdInformer.hh"
37 #include "OSEd.hh"
38 
39 using std::string;
40 
41 /**
42  * Constructor.
43  */
45  GUICommand(OSEdConstants::CMD_NAME_MEMORY, NULL) {
46 }
47 
48 /**
49  * Destructor.
50  */
52 }
53 
54 /**
55  * Returns the id of the command.
56  *
57  * @return The id of the command.
58  */
59 int
62 }
63 
64 /**
65  * Creates a new command.
66  *
67  * @return The created command.
68  */
71  return new OSEdMemoryCmd();
72 }
73 
74 /**
75  * Executes the command.
76  *
77  * @return Always true.
78  */
79 bool
81  MemoryDialog* dialog = new MemoryDialog(parentWindow());
82  dialog->Show();
83  return true;
84 }
85 
86 /**
87  * Returns true if command is enabled.
88  *
89  * Memory command is always enabled.
90  *
91  * @return Always true.
92  */
93 bool
95  return true;
96 }
97 
98 /**
99  * Returns icon path.
100  *
101  * @return Empty string (icons not used).
102  */
103 string
105  return "";
106 }
OSEdConstants::CMD_MEMORY
@ CMD_MEMORY
Memory command id.
Definition: OSEdConstants.hh:104
OSEdMemoryCmd::isEnabled
virtual bool isEnabled()
Definition: OSEdMemoryCmd.cc:94
OSEdMemoryCmd::create
virtual GUICommand * create() const
Definition: OSEdMemoryCmd.cc:70
OSEd.hh
OSEdMemoryCmd.hh
OSEdConstants.hh
OSEdInformer.hh
GUICommand
Definition: GUICommand.hh:43
OSEdConstants
Definition: OSEdConstants.hh:45
OSEdMemoryCmd::icon
virtual std::string icon() const
Definition: OSEdMemoryCmd.cc:104
MemoryDialog
Definition: MemoryDialog.hh:51
OSEdMemoryCmd::Do
virtual bool Do()
Definition: OSEdMemoryCmd.cc:80
MemoryDialog.hh
OSEdMemoryCmd::id
virtual int id() const
Definition: OSEdMemoryCmd.cc:60
OSEdMemoryCmd::OSEdMemoryCmd
OSEdMemoryCmd()
Definition: OSEdMemoryCmd.cc:44
OSEdMemoryCmd::~OSEdMemoryCmd
virtual ~OSEdMemoryCmd()
Definition: OSEdMemoryCmd.cc:51
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75