src/Options.cpp
int Options::getRegIndex(const string& optionName) {
	if (m_suppressQ && (optionName == "options")) {
			return -1;
	}

	if (optionName == "options") {
		print(cout);
		return -1;
	}

	auto it = m_optionList.find(optionName);
	if (it == m_optionList.end()) {
		if (m_options_error_checkQ) {
			m_error << "Error: unknown option \"" << optionName << "\"." << endl;
			print(cout);
			return -1;
		} else {
			return -1;
		}
	} else {
		return it->second;
	}
}
//////////////////////////////
//
// Options::getRegIndex -- returns the index of the option associated
//	with this name.
//
:getRegIndex -- returns the index of the option associated
with this name.
: getRegIndex -- returns the index of the option associated with this name .
int Options::getRegIndex(const string& optionName) {
	if (m_suppressQ && (optionName == "options")) {
			return -1;
	}
	if (optionName == "options") {
		print(cout);
		return -1;
	}
	auto it = m_optionList.find(optionName);
	if (it == m_optionList.end()) {
		if (m_options_error_checkQ) {
			m_error << "Error: unknown option \"" << optionName << "\"." << endl;
			print(cout);
			return -1;
		} else {
			return -1;
		}
	} else {
		return it->second;
	}
}
int Options :: getRegIndex ( const string & optionName ) { if ( m_suppressQ && ( optionName == " " ) ) { return -1 ; } if ( optionName == " " ) { print ( cout ) ; return -1 ; } auto it = m_optionList . find ( optionName ) ; if ( it == m_optionList . end ( ) ) { if ( m_options_error_checkQ ) { m_error << " \" " << optionName << " \" " << endl ; print ( cout ) ; return -1 ; } else { return -1 ; } } else { return it -> second ; } }
Options::getRegIndex -- returns the index of the option associated
with this name.
Options :: getRegIndex -- returns the index of the option associated with this name .