当前位置: 首页>>代码示例>>C++>>正文


C++ Item函数代码示例

本文整理汇总了C++中Item函数的典型用法代码示例。如果您正苦于以下问题:C++ Item函数的具体用法?C++ Item怎么用?C++ Item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Item函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: found

Project::Item Project::Item::findItemForFile (const File& file) const
{
    if (getFile() == file)
        return *this;

    if (isGroup())
    {
        for (int i = getNumChildren(); --i >= 0;)
        {
            Item found (getChild(i).findItemForFile (file));

            if (found.isValid())
                return found;
        }
    }

    return Item (project, ValueTree::invalid);
}
开发者ID:Labmind,项目名称:GUI,代码行数:18,代码来源:jucer_Project.cpp

示例2: while

	QList<JabberSearchManager::Item> JabberSearchManager::FromStandardItems (const QDomElement& items)
	{
		QList<Item> result;

		QDomElement item = items.firstChildElement ("item");
		while (!item.isNull ())
		{
			result << Item (item.attribute ("jid"),
					item.firstChildElement ("first").text (),
					item.firstChildElement ("last").text (),
					item.firstChildElement ("nick").text (),
					item.firstChildElement ("email").text ());

			item = item.nextSiblingElement ("item");
		}

		return result;
	}
开发者ID:Kalarel,项目名称:leechcraft,代码行数:18,代码来源:jabbersearchmanager.cpp

示例3: if

void XmlToQtScript::FilterQtInternalsPostProcessor::process(Item* iterator, QList<Item>* in)
{
	if(m_internalClasses.contains(iterator->targetClass))
	{
//		qDebug() << Q_FUNC_INFO << "Skipping" << iterator->target << iterator->targetClass << iterator->method << iterator->parameters;
		*iterator = Item();
		if(in->first().method == "msec")
		{
			in->takeFirst();
		}
	}
	/*
	else if(!iterator->target.isNull())
	{
		qDebug() << Q_FUNC_INFO << "Keeping" << iterator->target << iterator->targetClass;
	}
	*/
}
开发者ID:Vadim-Stupakov,项目名称:hooq,代码行数:18,代码来源:XmlToQtScript_FilterQtInternalsPostProcessor.cpp

示例4: found

Project::Item Project::Item::findItemWithID (const String& targetId) const
{
    if (state [Ids::ID] == targetId)
        return *this;

    if (isGroup())
    {
        for (int i = getNumChildren(); --i >= 0;)
        {
            Item found (getChild(i).findItemWithID (targetId));

            if (found.isValid())
                return found;
        }
    }

    return Item (project, ValueTree(), false);
}
开发者ID:kokoar,项目名称:JUCE,代码行数:18,代码来源:jucer_Project.cpp

示例5: luCameraObjPropsRefFromVariant

void luCameraObjProperty::RefreshChildren()
{
	if ( !GetChildCount() ) return;

	const luCameraObjProps& obj = luCameraObjPropsRefFromVariant(m_value);

	Item(PROP_CLIPSTART)->SetValue(double(obj.props.m_clipstart));
	Item(PROP_CLIPEND)->SetValue(double(obj.props.m_clipend));
	Item(PROP_FOV)->SetValue(double(obj.props.m_fov));
	Item(PROP_ORTHOSCALE)->SetValue(double(obj.props.m_orthoscale));
	Item(PROP_START)->SetValue(obj.props.m_start);
	Item(PROP_TYPE)->SetValue(obj.props.m_type);
}
开发者ID:Ali-il,项目名称:gamekit,代码行数:13,代码来源:luProps.cpp

示例6: Item

BSTR cADOCE::Name(long Col)
{
	//////////////////////////////////////////////////////////////
	// Return the Name of a Field
	//////////////////////////////////////////////////////////////

	BSTR bstrData;
	IADOCEField* TargetField;

	// Get the Field.
	TargetField = Item(Col);

	
	if(TargetField)
		hr = TargetField->get_Name(&bstrData);

	// Return the NAME of the field
	return bstrData;
}
开发者ID:pfeilbr,项目名称:repo,代码行数:19,代码来源:cadoce.cpp

示例7: normalized_path

void
RelinkingModel::addPath(RelinkablePath const& path)
{
	QString const normalized_path(path.normalizedPath());

	std::pair<std::set<QString>::iterator, bool> const ins(
		m_origPathSet.insert(path.normalizedPath())
	);
	if (!ins.second) {
		// Not inserted because identical path is already there.
		return;
	}

	beginInsertRows(QModelIndex(), m_items.size(), m_items.size());
	m_items.push_back(Item(path));
	endInsertRows();

	requestStatusUpdate(index(m_items.size() - 1));
}
开发者ID:DevangThakkar,项目名称:scantailor,代码行数:19,代码来源:RelinkingModel.cpp

示例8: GetNoUsedID

unsigned int CRsltVariable::GetNoUsedID()
{
	int count=Count();
	for(unsigned int ii=1;ii<1000;ii++)
	{
		bool bNoUse=true;
		for(int jj=0;jj<count;jj++)
		{
			if(Item(jj)->GetID()==ii)
			{
				bNoUse=false;
				break;
			}
		}
		if(bNoUse)
			return ii;
	}
	return 0;
}
开发者ID:adoggie,项目名称:algorithm_package,代码行数:19,代码来源:Result.cpp

示例9: update

void GridWindow::update(const std::vector<Item>& items)
{
    unsigned int x,y;
    x=y=0;
    items_in_grid.clear();
    for(auto it : items)
    {
        grid.appendItem(x,y,it.gid, 0);
        grid.appendItem(x,y,710,1);
        items_in_grid.push_back(Item(x,y,it.gid, it.id));
        if(x < grid.getSize().x)
            ++x;
        if(x == grid.getSize().x)
        {
            x=0;
            ++y;
        }
    }
}
开发者ID:xim3,项目名称:sfml-wrapper,代码行数:19,代码来源:GridWindow.cpp

示例10: Item

void cPlayer::FinishEating(void)
{
	// Reset the timer:
	m_EatingFinishTick = -1;
	
	// Send the packets:
	m_ClientHandle->SendEntityStatus(*this, esPlayerEatingAccepted);
	m_World->BroadcastEntityMetadata(*this);

	// consume the item:
	cItem Item(GetEquippedItem());
	Item.m_ItemCount = 1;
	cItemHandler * ItemHandler = cItemHandler::GetItemHandler(Item.m_ItemType);
	if (!ItemHandler->EatItem(this, &Item))
	{
		return;
	}
	ItemHandler->OnFoodEaten(m_World, this, &Item);
}
开发者ID:cedeel,项目名称:MCServer,代码行数:19,代码来源:Player.cpp

示例11: expand_symbol_into_itemset

void Parser::expand_symbol_into_itemset(ItemSet* is, std::string symbol, std::set<std::string>* encountered_terminals) {
	if (Parser::symbol_is_token(symbol)) {
		std::cout << "=== expand symbol into itemset: token " << symbol << std::endl;
		return;
	} else {
		// if new symbol was inserted
		if (encountered_terminals->insert(symbol).second) {
			std::cout << "=== expand symbol into itemset: new nonterminal " << symbol << std::endl;
			for (Production* p : this->nonterminals.at(symbol)) {
				std::cout << "\t";
				Parser::debug_production(p);
				is->additionals.insert(Item(p, 0));
				this->expand_symbol_into_itemset(is, p->symbols.front(), encountered_terminals);
			}
		} else {
			std::cout << "=== expand symbol into itemset: existing nonterminal " << symbol << std::endl;
		}
	}
}
开发者ID:Raekye,项目名称:hmmm,代码行数:19,代码来源:parser.cpp

示例12: sswitch

bool CPageAntispamSink::OnClicked(CItemBase* pItem)
{
	FolderInfo_t * pFolder = NULL;
	sswitch(pItem->m_strItemId.c_str())
	scase("CS_Browse") pFolder = &m_ser->CertainSpamRule.FolderForAction;  sbreak;
	scase("PS_Browse") pFolder = &m_ser->PossibleSpamRule.FolderForAction; sbreak;
	scase("Link")      _Module.ShowAntiSpamSettings(); sbreak
	send
		
	if( pFolder )
	{
		UpdateData(false);
		if(CBrowseForFolder(m_arrLocalFolders, pFolder, m_hTreeImageList).DoModal(Item(), "OutlookPlugun.Antispam.Browse") == DLG_ACTION_OK)
		{
			UpdateData(true);
		}
	}
	
	return TBaseDlg::OnClicked(pItem);
}
开发者ID:hackshields,项目名称:antivirus,代码行数:20,代码来源:SettingsDlg.cpp

示例13: evictOldItems

void ParserContext::msgReady(uint64_t id, McMsgRef msg) {
    TimePoint now = Clock::now();
    evictOldItems(now);

    std::string invKey;
    if (id != 0) {
        auto pairMsgIt = msgs_.find(id);
        if (pairMsgIt != msgs_.end()) {
            invKey = std::move(pairMsgIt->second.key);
            msgs_.erase(pairMsgIt->first);
        }
        if (msg->key.len > 0) {
            auto msgIt = msgs_.emplace(
                             id,
                             Item(id, to<std::string>(msg->key), now));
            evictionQueue_.push_back(msgIt.first->second);
        }
    }
    callback_(id, std::move(msg), std::move(invKey), fromAddress_, toAddress_);
}
开发者ID:tidaybreak,项目名称:mcrouter,代码行数:20,代码来源:ParserMap.cpp

示例14: Count

STDMETHODIMP CompositeOverlayImpl<B>::get_Overlays(LPSAFEARRAY *pVal)
{
	short count;
	Count(&count);
	SAFEARRAY *pArray = ::SafeArrayCreateVector(VT_DISPATCH, 0, count);

	IOverlay *pOverlay;
	long indices[1];
	for (int i=0; i<count; i++)
	{
		indices[0] = i;
		Item(CComVariant(i), &pOverlay);
		::SafeArrayPutElement(pArray, indices, pOverlay);
		pOverlay->Release();
	}

	*pVal = pArray;

	return S_OK;
}
开发者ID:Templier,项目名称:desktopx,代码行数:20,代码来源:CompositeOverlayImpl.cpp

示例15: Close

void CProcMonSniffDlg::OnEvent(tDWORD nEventId, cSerializable * pData)
{
	if( nEventId == cCalcSecurityRatingProgress::eIID && pData && pData->isBasedOn(cCalcSecurityRatingProgress::eIID) )
	{
		cCalcSecurityRatingProgress *srp = (cCalcSecurityRatingProgress *)pData;
		if( srp->m_nActionId == cCalcSecurityRatingProgress::eCloseNotification )
		{
			Close();
			return;
		}
		if( m_info.m_nPID == srp->m_nPID )
		{
			m_info = *srp;
			Item()->UpdateData(true);
			return;
		}
		return;
	}
	CDialogSink::OnEvent(nEventId, pData);
}
开发者ID:hackshields,项目名称:antivirus,代码行数:20,代码来源:AlertDialog.cpp


注:本文中的Item函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。