OpenASIP  2.0
MachineEditPartFactory.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 MachineEditPartFactory.hh
26  *
27  * Declaration of MachineEditPartFactory class.
28  *
29  * @author Ari Metsähalme 2003 (ari.metsahalme-no.spam-tut.fi)
30  * @note rating: yellow
31  * @note reviewed Jul 13 2004 by vpj, ll, jn, am
32  */
33 
34 #ifndef TTA_MACHINE_EDIT_PART_FACTORY_HH
35 #define TTA_MACHINE_EDIT_PART_FACTORY_HH
36 
37 #include <vector>
38 
39 #include "EditPartFactory.hh"
40 
41 class EditPart;
42 class ConnectionEditPart;
43 
44 namespace TTAMachine {
45  class MachinePart;
46  class Machine;
47  class Bridge;
48  class Bus;
49 }
50 
51 /**
52  * Factory for creating EditParts from any Machine component or the
53  * Machine itself.
54  */
56 public:
57  explicit MachineEditPartFactory(EditPolicyFactory& editPolicyFactory);
58  virtual ~MachineEditPartFactory();
59 
60  virtual EditPart* createEditPart(TTAMachine::MachinePart* component);
62 
63 private:
64  /// Assignment not allowed.
66  /// Copying not allowed.
68 
73  TTAMachine::Bridge* opposite);
74  void findConnectedBridges(ConnectionEditPart*& bridgeEditPart,
75  ConnectionEditPart*& biDirBridge,
76  std::vector<TTAMachine::Bridge*>& bridges,
77  TTAMachine::Bus* bus);
78  bool connected(
79  const TTAMachine::Bridge* bridge,
80  const TTAMachine::Bus* bus1,
81  const TTAMachine::Bus* bus2);
82 };
83 
84 #endif
EditPolicyFactory
Definition: EditPolicyFactory.hh:46
MachineEditPartFactory::findConnectedBridges
void findConnectedBridges(ConnectionEditPart *&bridgeEditPart, ConnectionEditPart *&biDirBridge, std::vector< TTAMachine::Bridge * > &bridges, TTAMachine::Bus *bus)
Definition: MachineEditPartFactory.cc:377
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
TTAMachine::Bridge
Definition: Bridge.hh:51
MachineEditPartFactory::createEditPart
virtual EditPart * createEditPart(TTAMachine::MachinePart *component)
Definition: MachineEditPartFactory.cc:101
TTAMachine::Bus
Definition: Bus.hh:53
MachineEditPartFactory::~MachineEditPartFactory
virtual ~MachineEditPartFactory()
Definition: MachineEditPartFactory.cc:90
MachineEditPartFactory::MachineEditPartFactory
MachineEditPartFactory(EditPolicyFactory &editPolicyFactory)
Definition: MachineEditPartFactory.cc:73
EditPartFactory.hh
EditPartFactory
Definition: EditPartFactory.hh:48
TTAMachine::MachinePart
Definition: MachinePart.hh:57
MachineEditPartFactory::createBiDirBridge
ConnectionEditPart * createBiDirBridge(ConnectionEditPart *bridge, TTAMachine::Bridge *opposite)
Definition: MachineEditPartFactory.cc:340
EditPart
Definition: EditPart.hh:60
MachineEditPartFactory
Definition: MachineEditPartFactory.hh:55
MachineEditPartFactory::getUnits
EditPart * getUnits(TTAMachine::Machine *machine)
Definition: MachineEditPartFactory.cc:152
MachineEditPartFactory::operator=
MachineEditPartFactory & operator=(MachineEditPartFactory &old)
Assignment not allowed.
MachineEditPartFactory::getSockets
EditPart * getSockets(TTAMachine::Machine *machine)
Definition: MachineEditPartFactory.cc:208
MachineEditPartFactory::connected
bool connected(const TTAMachine::Bridge *bridge, const TTAMachine::Bus *bus1, const TTAMachine::Bus *bus2)
Definition: MachineEditPartFactory.cc:415
ConnectionEditPart
Definition: ConnectionEditPart.hh:42
MachineEditPartFactory::getBusChains
EditPart * getBusChains(TTAMachine::Machine *machine)
Definition: MachineEditPartFactory.cc:239
TTAMachine
Definition: Assembler.hh:48
TTAMachine::Machine
Definition: Machine.hh:73