本文整理匯總了C++中CheckUnique函數的典型用法代碼示例。如果您正苦於以下問題:C++ CheckUnique函數的具體用法?C++ CheckUnique怎麽用?C++ CheckUnique使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了CheckUnique函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: Lock
bool PostOffice::AddMailbox(const char *name,
os::Handler *handler, bool unique)
{
bool ret = true;
Mailbox *mb;
Lock();
if(!CheckUnique(name, unique))
ret = false;
if(ret) {
mb = new Mailbox;
if(mb) {
mb->SetName(name);
mb->SetHandler(handler);
mb->SetUnique(unique);
mb->Link(m_Head);
m_Head = mb;
if(!m_Locked) {
m_Locked = true;
// m_InUse->Lock();
#ifdef P_O_DEBUG
cout << "PO: PostOffice is in use." << endl;
#endif
}
#ifdef P_O_DEBUG
cout << "PO: Added Mailbox: " << name << endl;
#endif
ret = false;
}
}
Unlock();
return ret;
}
示例2: CheckUnique
void CharacterDatabaseCleaner::CleanCharacterTalent() {
CharacterDatabase.DirectPExecute(
"DELETE FROM character_talent WHERE spec > %u", MAX_TALENT_SPECS);
CheckUnique("spell", "character_talent", &TalentCheck);
}
示例3: CheckUnique
void CharacterDatabaseCleaner::CleanCharacterTalent()
{
CharacterDatabase.DirectPExecute("DELETE FROM character_talent WHERE spec > %u OR current_rank > %u", MAX_TALENT_SPEC_COUNT, MAX_TALENT_RANK);
CheckUnique("talent_id", "character_talent", &TalentCheck);
}