library/src/blockclass/subclasses/BP_CommandLineOptionParser.cc
int BP_CommandLineOptionParser::retrieveSignedIntegerValueByOption(char *option_value)
{

	// ensure we have an option value
	if(!option_value)
	{
		this->retrieval_ok = BP_FALSE;
		return 0;
	}

	// attempt to lookup the token
	P_BP_COMMAND_LINE_PARSER_TOKENS token = this->optionLookup(option_value);
	if(!token)
	{
		this->retrieval_ok = BP_FALSE;
		return 0;
	}

	if(token->value_has_been_set_ok)
	{
		this->retrieval_ok = BP_TRUE;
		return token->parsed_value_as_int;
	}
	else
	{
		this->retrieval_ok = BP_TRUE;
		return token->default_value_as_int;
	}

}
// retrieves a signed integer value based on the provided token.
retrieves a signed integer value based on the provided token.
retrieves a signed integer value based on the provided token .
int BP_CommandLineOptionParser::retrieveSignedIntegerValueByOption(char *option_value)
{
	if(!option_value)
	{
		this->retrieval_ok = BP_FALSE;
		return 0;
	}
	P_BP_COMMAND_LINE_PARSER_TOKENS token = this->optionLookup(option_value);
	if(!token)
	{
		this->retrieval_ok = BP_FALSE;
		return 0;
	}
	if(token->value_has_been_set_ok)
	{
		this->retrieval_ok = BP_TRUE;
		return token->parsed_value_as_int;
	}
	else
	{
		this->retrieval_ok = BP_TRUE;
		return token->default_value_as_int;
	}
}
int BP_CommandLineOptionParser :: retrieveSignedIntegerValueByOption ( char * option_value ) { if ( ! option_value ) { this -> retrieval_ok = BP_FALSE ; return 0 ; } P_BP_COMMAND_LINE_PARSER_TOKENS token = this -> optionLookup ( option_value ) ; if ( ! token ) { this -> retrieval_ok = BP_FALSE ; return 0 ; } if ( token -> value_has_been_set_ok ) { this -> retrieval_ok = BP_TRUE ; return token -> parsed_value_as_int ; } else { this -> retrieval_ok = BP_TRUE ; return token -> default_value_as_int ; } }
retrieves a signed integer value based on the provided token.
retrieves a signed integer value based on the provided token .
// ensure we have an option value // attempt to lookup the token