library/src/blockclass/BP-BlockClass.cc
// execute a command with a given argument substitution stack
execute a command with a given argument substitution stack
execute a command with a given argument substitution stack
size_t Block::ccExecuteCommand(char *command_name, char ** arg_stack)
{
	if(!this->cc_session)
	{
		this->AddErrorToStack((char*) "Error in Block::ccExecuteCommand(): Empty session.");
		return ERR_FAILURE;
	}
	if(!command_name)
	{
		this->AddErrorToStack((char*) "Error in Block::ccExecuteCommand(): Empty command_name.");
		return ERR_FAILURE;
	}
	if(BP_CCDispatcher(this->cc_session, command_name, arg_stack) == ERR_FAILURE)
	{
		this->AddErrorToStack((char*) "Error in Block::ccExecuteCommand(): Command dispatcher failed.");
		return ERR_FAILURE;
	}
	return ERR_SUCCESS;
}
size_t Block :: ccExecuteCommand ( char * command_name , char * * arg_stack ) { if ( ! this -> cc_session ) { this -> AddErrorToStack ( ( char * ) " " ) ; return ERR_FAILURE ; } if ( ! command_name ) { this -> AddErrorToStack ( ( char * ) " " ) ; return ERR_FAILURE ; } if ( BP_CCDispatcher ( this -> cc_session , command_name , arg_stack ) == ERR_FAILURE ) { this -> AddErrorToStack ( ( char * ) " " ) ; return ERR_FAILURE ; } return ERR_SUCCESS ; }
execute a command with a given argument substitution stack
execute a command with a given argument substitution stack
// ensure we have a session // dispatch command // return indicating success