Exemplo n.º 1
0
bool UIGDetailsGroup::hasItems(UIGDetailsItemType type /* = UIGDetailsItemType_Set */) const
{
    switch (type)
    {
        case UIGDetailsItemType_Any: return hasItems(UIGDetailsItemType_Set);
        case UIGDetailsItemType_Set: return !m_sets.isEmpty();
        default: AssertMsgFailed(("Invalid item type!")); break;
    }
    return false;
}
Exemplo n.º 2
0
const CmdLineItem & CmdLineIterator::peek() const
{
	if (!hasItems()) throwIteratorNoMoreItems(THISLOCATION,typeid(CmdLineItem));
	ConstStrW a = args[argPos];
	if (charPos == 0) {
		natural len = a.length();
		if (a[0] == '-') {
			if (len>1) {
				if (a[1] == '-') {
					tmp = CmdLineItem(CmdLineItem::longSwitch,a.offset(2));
					return tmp;
				} else {
					tmp = CmdLineItem(CmdLineItem::shortSwitch,a.mid(1,1));
					return tmp;
				}
			} 
		}
		tmp = CmdLineItem(CmdLineItem::text, a);
		return tmp;
	} else {
		tmp = CmdLineItem(CmdLineItem::shortSwitch,a.mid(charPos,1));
		return tmp;
	}
}
Exemplo n.º 3
0
ConstStrW CmdLineIterator::peekText() const
{
	if (!hasItems()) throwIteratorNoMoreItems(THISLOCATION,typeid(ConstStrW));
	return args[argPos].offset(charPos);
}