35#include <wx/docview.h>
36#include <boost/format.hpp>
91 Bus* destination = NULL;
96 while (i < navigator.
count() && source == NULL) {
97 for (
int j = 0; j < navigator.
count(); j++) {
99 source = navigator.
item(i);
100 destination = navigator.
item(j);
107 if (source == NULL) {
112 boost::format message =
128 while (bridgeNavigator.
hasItem(newName)) {
136 Bridge* bridge =
new Bridge(newName, *source, *destination);
139 if (dialog.ShowModal() == wxID_OK) {
192 wxDocManager* manager = wxGetApp().docManager();
193 if (manager->GetCurrentView() != NULL) {
#define assert(condition)
TTAMachine::Machine * machine
the architecture definition of the estimated processor
virtual AddBridgeCmd * create() const
virtual std::string shortName() const
static std::string toString(const T &source)
wxWindow * parentWindow() const
virtual bool canBridge(const TTAMachine::Bus &source, const TTAMachine::Bus &destination)
void notifyObservers(bool modified=true)
void popFromStack(bool modified=false)
TTAMachine::Machine * getMachine()
static const std::string CMD_SNAME_ADD_BRIDGE
Command name for the "Add Bridge" command.
static const std::string COMP_NEW_NAME_PREFIX_BRIDGE
Prefix for new bridge names.
static ProDeTextGenerator * instance()
@ MSG_ERROR_CANNOT_BRIDGE
Error: Bridge creation impossible.
ComponentType * item(int index) const
bool hasItem(const std::string &name) const
virtual BridgeNavigator bridgeNavigator() const
virtual BusNavigator busNavigator() const
virtual boost::format text(int textId)
static wxString toWxString(const std::string &source)