示例#1
0
const bool ArgParser::isArgInList(ArgumentList & list, const std::string & name, const std::string & abbr)
{
    if("" != abbr && !isAbbr(abbr))
    {
        throw("ArgParser::isArgInList : it's not a abbr");
    }
    
    if ("" != name && "" != abbr && list.isArgExistByName(name) && list.isArgExistByAbbr(abbr))
    {
        return true;
    }
    if ("" != name && list.isArgExistByName(name))
    {
        return true;
    }
    if ("" != abbr && list.isArgExistByAbbr(abbr))
    {
        return true;
    }
    return false;
}