execute

<< Click to Display Table of Contents >>

Navigation:  NxLib API > C++ Interface > NxLibCommand >

execute

Starts the execution of the command given at construction time of the object.

Signatures

Error handling via exception:

void execute(bool wait = true)

void execute(std::string const& commandName, bool wait = true)

Error handling via return code:

void execute(int* returnCode, bool wait = true)

void execute(int* returnCode, std::string const& commandName, bool wait = true)

Parameters

returnCode

The API return code.

commandName

The command name to execute. This overrides the command name specified in the constructor. It can be used to cancel commands by issuing cmdBreak while a command is running. When commandName is not specified, the command name as given to the constructor is used.

wait

Specifies whether the execution should be carried out synchronously (i.e. the function waits for the execution to finish), or whether the function should return after starting the command execution. If this parameter is false, you can use the finished method to check whether the operation is still running.

Return Value

none