本文整理汇总了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);
}
示例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;
}
示例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;
}
*/
}
示例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);
}
示例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);
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
}
}
示例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);
}
示例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;
}
}
}
示例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);
}
示例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_);
}
示例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;
}
示例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);
}