CODMovePortCommand Class
class CODMovePortCommand: public CODCommand
Moves a port belonging to a symbol. Only one port can be moved at a time with this command. This command can also be used to connect the port being moved to another port. The port to be moved should be added to the command object using CODCommand::AddComponent.Defined in: OdMovePortCmd.h
Class Members
CODMovePortCommand(CODModel* pModel)
Constructor.
virtual ~CODMovePortCommand()
Destructor.
int m_nOffsetX
Horizontal offset to move the port by.
int m_nOffsetY
Vertical offset to move the port by.
CODPortComponent* m_pPortConnect
Pointer to port to connect to.
CODPortSet m_setOldConnections
Pointer to dependent ports that have been disconnected as a result of the move.
void GetMovement(int& nOffsetX, int& nOffsetY)
Gets the offsets to move the port by.
void SetMovement(int nOffsetX, int nOffsetY)
Sets the offsets to move the port by.
CODPortComponent* GetConnectPort() const
Gets the port to connect to.
void SetConnectPort(CODPortComponent* pPortConnect)
Sets the port to connect to.
virtual BOOL Execute()
Move the port.
virtual BOOL Unexecute()
Undo the command.
virtual sfl::MvcCommand* Dup() const
Make a copy of this move port command.
virtual void Sprint(CString& strCmd)
Print information on the command for logging purposes.
virtual void GetUpdateSet(CODComponentSet& setUpdate) const
Returns a list of components that are affected by this command.
void ClearOldConnections()
Clear old connections.
int SaveOldConnections(CODPortComponent* pPort)
Save old connections.
void RestoreOldConnections(CODPortComponent* pPort)
Restore old connections.