nyx-cmd/nyx_cmd_devicetype.cpp
int NyxCmdDeviceType::executeCommand(const char *deviceId, int argc,
                                     char **argv)
{
	int err = -1;
	char *command = resolveArguments(argc, argv);

	if (command != NULL)
	{
		NyxCmdCommand *targetCommand = getCommand(command);

		if (targetCommand)
		{
			err = targetCommand->Execute(deviceId, argc, argv);
			delete targetCommand;
		}
		else
		{
			cout << "Error: Unknown command" << endl;
		}
	}
	else
	{
		throw (1);
	}

	return err;
}
/*
* Executes the command defined in command line.
*
* Resolve command line and use map find to find right file name.
* Get the lib class initiator.
* Cast to proper base class type.
* Call execute comand.
*/
Executes the command defined in command line.
Resolve command line and use map find to find right file name.
Get the lib class initiator.
Cast to proper base class type.
Call execute comand.
Executes the command defined in command line . Resolve command line and use map find to find right file name . Get the lib class initiator . Cast to proper base class type . Call execute comand .
int NyxCmdDeviceType::executeCommand(const char *deviceId, int argc,
                                     char **argv)
{
	int err = -1;
	char *command = resolveArguments(argc, argv);
	if (command != NULL)
	{
		NyxCmdCommand *targetCommand = getCommand(command);
		if (targetCommand)
		{
			err = targetCommand->Execute(deviceId, argc, argv);
			delete targetCommand;
		}
		else
		{
			cout << "Error: Unknown command" << endl;
		}
	}
	else
	{
		throw (1);
	}
	return err;
}
int NyxCmdDeviceType :: executeCommand ( const char * deviceId , int argc , char * * argv ) { int err = -1 ; char * command = resolveArguments ( argc , argv ) ; if ( command != NULL ) { NyxCmdCommand * targetCommand = getCommand ( command ) ; if ( targetCommand ) { err = targetCommand -> Execute ( deviceId , argc , argv ) ; delete targetCommand ; } else { cout << " " << endl ; } } else { throw ( 1 ) ; } return err ; }
Executes the command defined in command line.
Executes the command defined in command line .