OpenASIP  2.0
AddGCUCmd.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 AddGCUCmd.hh
26  *
27  * Declaration of AddGCUCmd class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_ADD_GCU_CMD_HH
34 #define TTA_ADD_GCU_CMD_HH
35 
36 #include "EditorCommand.hh"
37 
38 /**
39  * Command for adding new global control unit to the Machine.
40  *
41  * Displays a global control unit dialog and creates a new global
42  * control unit according to the dialog output.
43  */
44 class AddGCUCmd : public EditorCommand {
45 public:
46  AddGCUCmd();
47  virtual bool Do();
48  virtual int id() const;
49  virtual AddGCUCmd* create() const;
50  virtual std::string shortName() const;
51  virtual bool isEnabled();
52 
53 private:
54  /// Name for the return address port.
55  static const std::string RA_PORT_NAME;
56  /// Name for the jump/call operand port.
57  static const std::string OP_PORT_NAME;
58  /// Name string for the jump operation.
59  static const std::string OPNAME_JUMP;
60  /// Name string for the call operation.
61  static const std::string OPNAME_CALL;
62 };
63 
64 #endif
AddGCUCmd::OP_PORT_NAME
static const std::string OP_PORT_NAME
Name for the jump/call operand port.
Definition: AddGCUCmd.hh:57
AddGCUCmd::create
virtual AddGCUCmd * create() const
Definition: AddGCUCmd.cc:151
AddGCUCmd
Definition: AddGCUCmd.hh:44
AddGCUCmd::Do
virtual bool Do()
Definition: AddGCUCmd.cc:78
AddGCUCmd::AddGCUCmd
AddGCUCmd()
Definition: AddGCUCmd.cc:66
AddGCUCmd::shortName
virtual std::string shortName() const
Definition: AddGCUCmd.cc:163
AddGCUCmd::id
virtual int id() const
Definition: AddGCUCmd.cc:140
AddGCUCmd::RA_PORT_NAME
static const std::string RA_PORT_NAME
Name for the return address port.
Definition: AddGCUCmd.hh:55
EditorCommand
Definition: EditorCommand.hh:46
AddGCUCmd::OPNAME_JUMP
static const std::string OPNAME_JUMP
Name string for the jump operation.
Definition: AddGCUCmd.hh:59
AddGCUCmd::isEnabled
virtual bool isEnabled()
Definition: AddGCUCmd.cc:176
AddGCUCmd::OPNAME_CALL
static const std::string OPNAME_CALL
Name string for the call operation.
Definition: AddGCUCmd.hh:61
EditorCommand.hh