library/src/blockclass/subclasses/BP_CommandLineOptionParser.cc
// retrieves a true or false based on the provided token
retrieves a true or false based on the provided token
retrieves a true or false based on the provided token
BP_BOOL BP_CommandLineOptionParser::retrieveStandAloneToggleValueByOption(char *option_value)
{
	if(!option_value)
	{
		this->retrieval_ok = BP_FALSE;
		return BP_FALSE;
	}
	P_BP_COMMAND_LINE_PARSER_TOKENS token = this->optionLookup(option_value);
	if(!token)
	{
		this->retrieval_ok = BP_FALSE;
		return BP_FALSE;
	}
	if(token->value_has_been_set_ok)
	{
		this->retrieval_ok = BP_TRUE;
		return token->parsed_value_as_toggle;
	}
	else
	{
		this->retrieval_ok = BP_TRUE;
		return token->default_value_as_toggle;
	}
}
BP_BOOL BP_CommandLineOptionParser :: retrieveStandAloneToggleValueByOption ( char * option_value ) { if ( ! option_value ) { this -> retrieval_ok = BP_FALSE ; return BP_FALSE ; } P_BP_COMMAND_LINE_PARSER_TOKENS token = this -> optionLookup ( option_value ) ; if ( ! token ) { this -> retrieval_ok = BP_FALSE ; return BP_FALSE ; } if ( token -> value_has_been_set_ok ) { this -> retrieval_ok = BP_TRUE ; return token -> parsed_value_as_toggle ; } else { this -> retrieval_ok = BP_TRUE ; return token -> default_value_as_toggle ; } }
retrieves a true or false based on the provided token
retrieves a true or false based on the provided token
// ensure we have an option value // attempt to lookup the token