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

VIEWS_API CODMovePortCommand(CODModel* pModel)

Constructor.

VIEWS_API 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.

VIEWS_API void GetMovement(int& nOffsetX, int& nOffsetY)

Gets the offsets to move the port by.

VIEWS_API void SetMovement(int nOffsetX, int nOffsetY)

Sets the offsets to move the port by.

VIEWS_API CODPortComponent* GetConnectPort() const

Gets the port to connect to.

VIEWS_API void SetConnectPort(CODPortComponent* pPortConnect)

Sets the port to connect to.

VIEWS_API virtual BOOL Execute()

Move the port.

VIEWS_API virtual BOOL Unexecute()

Undo the command.

VIEWS_API virtual sfl::MvcCommand* Dup() const

Make a copy of this move port command.

VIEWS_API virtual void Sprint(CString& strCmd)

Print information on the command for logging purposes.

VIEWS_API virtual void GetUpdateSet(CODComponentSet& setUpdate) const

Returns a list of components that are affected by this command.

VIEWS_API void ClearOldConnections()

Clear old connections.

VIEWS_API int SaveOldConnections(CODPortComponent* pPort)

Save old connections.

VIEWS_API void RestoreOldConnections(CODPortComponent* pPort)

Restore old connections.