Go to the documentation of this file.
75 Port* port =
dynamic_cast<Port*
>(component);
103 int unconnectedSockets = 2 - portEditPart->
childCount();
105 while (unconnectedSockets > 0) {
111 unconnectedSockets--;
121 if (editPolicy != NULL) {
141 vector<Factory*>::const_iterator i =
factories_.begin();
143 while (socketEditPart == NULL && i !=
factories_.end()) {
144 socketEditPart = (*i)->createEditPart(socket);
148 assert(socketEditPart != NULL);
154 portEditPart, socketEditPart));
155 portEditPart->
addChild(socketEditPart);
virtual Socket * unconnectedSocket(int index) const
virtual EditPart * createConnection(EditPart *source, EditPart *target) const
virtual Socket * inputSocket() const
virtual EditPolicy * createPortEditPolicy()
void setSelectable(bool selectable)
void installEditPolicy(EditPolicy *editpolicy)
virtual int width() const =0
virtual bool isTriggering() const
void registerFactory(Factory *factory)
#define assert(condition)
void addSocket(EditPart *portEditPart, TTAMachine::MachinePart *socket) const
UnitPortFactory(EditPolicyFactory &editPolicyFactory)
void setModel(TTAMachine::MachinePart *model)
virtual std::string name() const
void setFigure(Figure *figure)
virtual Socket * outputSocket() const
void addChild(EditPart *child)
EditPolicyFactory & editPolicyFactory_
Factory which creates edit policies for edit parts.
virtual ~UnitPortFactory()
virtual EditPart * createEditPart(TTAMachine::MachinePart *component)
std::vector< Factory * > factories_
Registered factories.