Example #1
0
	/**@brief Called at the end of set up to look for any invalid options
	 *
	 */
	void lookForInvalidOptions() {
		auto flagStrs = flags_.getFlags();
		strVecToLower(flagStrs);
		for (const auto &com : commands_.arguments_) {
			if (!contains(flagStrs, com.first)) {
				warnings_.emplace_back(
						bashCT::bold + bashCT::red + "Unrecognized option, " + com.first
								+ " not using" + bashCT::reset);
			}
		}
	}
Example #2
0
	/**@brief Called at the end of set up to look for any invalid options but
	 *comparing current arguments to validOptions_
	 *
	 */
	void lookForInvalidOptions() {
		std::vector<std::string> currentFlags = getVecOfMapKeys(flags_.flags_);
		currentFlags.push_back("-program");
		if (commands_.arguments_.find("-program") != commands_.arguments_.end()) {
			currentFlags.push_back(commands_["-program"]);
		}
		currentFlags.push_back("-commandline");
		strVecToLower(currentFlags);
		std::vector<std::string> expandedOptions;
		for (const auto &op : currentFlags) {
			addOtherVec(expandedOptions, tokenizeString(op, ","));
		}
		for (const auto &com : commands_.arguments_) {
			if (!contains(expandedOptions, com.first)) {
				warnings_.emplace_back("Unrecognized option, " + com.first
								+ " not using");
			}
		}
	}