本文整理汇总了C++中deleteObject函数的典型用法代码示例。如果您正苦于以下问题:C++ deleteObject函数的具体用法?C++ deleteObject怎么用?C++ deleteObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deleteObject函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Q64G
FUNCTION void Q64G(obj Q4F0, obj Q62D, int Q571)
{
int Q63U;
list metal;
clearList(metal);
Q4S8(metal, Q62D);
for(int num = numInList(metal); num > 0x00; num --)
{
int Q56Z;
obj Q5UD = metal[0x00];
int Q4Q1 = getResource(Q56Z, Q5UD, "metal", 0x03, 0x02);
if(Q571 >= Q56Z)
{
transferResources(Q4F0, Q5UD, Q56Z, "metal");
deleteObject(Q5UD);
removeItem(metal, 0x00);
Q571 = Q571 - Q56Z;
}
else
{
transferResources(Q4F0, Q5UD, Q571, "metal");
Q4Q1 = getResource(Q56Z, Q5UD, "metal", 0x03, 0x02);
if(Q56Z < 0x01)
{
deleteObject(Q5UD);
}
break;
}
}
clearList(metal);
return;
}
示例2: GUIFont
int GUIFontManager::addFont(const TiXmlElement *fontNode)
{
GUIFont *newFont = new GUIFont();
int index = -1;
if(newFont->loadXMLSettings(fontNode))
{
index = findFontIndex(newFont);
if(index >= 0)
{
deleteObject(newFont);
}
else
{
if(!newFont->build())
{
deleteObject(newFont);
}
else
{
if(newFont->build())
{
addFont(newFont);
index = int(guiFontList.size() - 1);
}
}
}
}
return index;
}
示例3: destroy
void PhysicsSystemImpl::destroy()
{
m_controller_manager->release();
m_cooking->release();
m_physics->release();
m_foundation->release();
m_allocator.deleteObject(m_physx_allocator);
m_allocator.deleteObject(m_error_callback);
}
示例4: SIGNAL
/* Méthode qui permet de créer les connexions entre les différents objets */
void HomeCreator3D::createConnection()
{
QObject::connect(&window, SIGNAL(itemSelected(QString)), this, SLOT(itemSelected(QString)));
QObject::connect(window.getUi()->widget, SIGNAL(constructionOK()), this, SLOT(enable3D()));
QObject::connect(window.getUi()->widget, SIGNAL(objectChangePosition(double, double, double)), this, SLOT(objectMove(double, double, double)));
QObject::connect(window.getUi()->widget, SIGNAL(objectChangeRotation()), this, SLOT(objectRotate()));
QObject::connect(window.getUi()->widget, SIGNAL(selection(int)), this, SLOT(selection(int)));
QObject::connect(window.getUi()->widget, SIGNAL(deleteObject()), this, SLOT(deleteObject()));
QObject::connect(&window, SIGNAL(newHouse()), this, SLOT(reInit()));
QObject::connect(&window, SIGNAL(loadHouse(QString)), this, SLOT(loadMaison(QString)));
QObject::connect(&window, SIGNAL(saveHouse(QString)), this, SLOT(saveMaison(QString)));
}
示例5: deleteObject
void GeometryManager::flushUnusedGeometry()
{
ArrayPtr <GeometryInfo> validGeometry;
for (size_t i = 0; i < geometryCollection.length(); i++)
if (geometryCollection(i)->getUserCount() > 0)
validGeometry.append(geometryCollection(i));
else
{
deleteObject(geometryCollection(i)->getMedia());
deleteObject(geometryCollection(i));
}
geometryCollection = validGeometry;
}
示例6: defined
//---------------------------------------------------------------------------
Services & Services::clear()
{
#if defined(__WIN32__) || defined(__WIN64__)
for( intptr_t i = sizeof(services_) / sizeof(services_[0]) - 1; i >= 0; i-- ){
/* try {
services_[i]->resume();
}
catch( ExceptionSP & e ){
if( e->code() != ENOSYS ) throw;
}
services_[i]->stop();*/
deleteObject(services_[i]);
services_[i] = NULL;
}
#else
for( intptr_t i = services_.count() - 1; i >= 0; i-- ){
try {
services_[i].resume();
}
catch( ExceptionSP & e ){
if( e->code() != ENOSYS ) throw;
}
if( services_[i].active() ) services_[i].stop();
}
services_.clear();
#endif
return *this;
}
示例7: flushUnusedGeometry
void GeometryManager::flushAllGeometries()
{
size_t i;
flushUnusedGeometry();
for (i = 0; i < geometryCollection.length(); i++)
{
deleteObject(geometryCollection(i)->getMedia());
deleteObject(geometryCollection(i));
}
geometryCollection.clear();
if (i) Logger::writeInfoLog(String("Flushed ") + int(i) + String(" active geometries"));
}
示例8: switch
void ComponentAIBomber::onMessage(const Message& message)
{
std::list<GameObject*>::iterator it;
switch (message.type)
{
case Message::NEW_VISION:
addObject(message.gameObject);
break;
case Message::LOST_VISION:
deleteObject(message.gameObject);
break;
case Message::TARGET_REACHED:
changeTarget(false);
break;
case Message::DEATH:
for (it=defenders.begin(); it!=defenders.end(); ++it)
{
(*it)->kill();
}
break;
case Message::START_SHOOTING:
charging = true;
break;
case Message::STOP_SHOOTING:
charging = false;
break;
}
}
示例9: while
/**
* CObjectManager::updateAllObjects
* @date Modified Mar 17, 2006
*/
void CObjectManager::updateAllObjects(void)
{
// Update all items in the object list
TypedObjectList::iterator itObjectMap = m_mObjects.begin();
ObjectList::iterator itObjectList;
while(itObjectMap != m_mObjects.end())
{
itObjectList = itObjectMap->second.begin();
while(itObjectList != itObjectMap->second.end())
{
if((*itObjectList)->isDeleted())
{
deleteObject(*itObjectList);
itObjectList = itObjectMap->second.erase(itObjectList);
}
else
{
(*itObjectList)->update();
++itObjectList;
}
}
++itObjectMap;
}
}
示例10: deleteObject
void Scene::removeAllObjects()
{
for (int i = drawableObjects.size() - 1; i >= 0; --i)
{
deleteObject(drawableObjects[i]);
}
}
示例11: dropFlags
void NexusFlagItem::dismount(DismountMode dismountMode)
{
if(isGhost()) // Server only
return;
if(getDatabase() == NULL) // must be in database, switching levels makes database NULL
return;
if(dismountMode == DISMOUNT_MOUNT_WAS_KILLED)
{
// Should getting shot up count as a flag drop event for statistics purposes?
if(mMount && mMount->getClientInfo())
mMount->getClientInfo()->getStatistics()->mFlagDrop += mFlagCount + 1;
dropFlags(mFlagCount + 1); // Drop at least one flag plus as many as the ship carries
// Now delete the flag itself
removeFromDatabase(false);
deleteObject();
}
else
{
GameType *gameType = getGame()->getGameType();
if(!gameType) // Crashed here once, don't know why, so I added the check
return;
gameType->itemDropped(mMount, this, dismountMode); // Sends messages; no flags actually dropped here; server only method
dropFlags(mFlagCount); // Only dropping the flags we're carrying, not the "extra" one that comes when we die
}
}
示例12: ensureEndPointHasPrefix
void Parse::deleteObject(QString doc)
{
if (!isReady()) {
m_deleteQueue.append(doc);
return;
}
ensureEndPointHasPrefix("classes");
//Get objectId to be deleted
QString deletedObjectId = getEndPoint();
int found = deletedObjectId.lastIndexOf('/');
int length = deletedObjectId.length();
deletedObjectId = deletedObjectId.right( length - found -1);
m_conn = connect(this, &BaaS::replyFinished, [=]( QJsonDocument json){
Q_UNUSED(json);
disconnect(m_conn);
if ( isLastRequestSuccessful() ) {
emit objectDeleted( deletedObjectId );
if(!m_deleteQueue.isEmpty()) {
deleteObject(m_deleteQueue.takeFirst());
}
}
else {
// error, drop the queue
m_deleteQueue.empty();
}
} );
initHeaders();
request( BaaS::DELETE, doc.toUtf8() );
}
示例13: deleteObject
void GUIFontManager::clear()
{
for(size_t i = 0; i < guiFontList.size(); i++)
deleteObject(guiFontList[i]);
guiFontList.clear();
}
示例14: switch
/// Updates the life state of all objects. Newly-spawned objects are promoted to full "alive" status,
/// and objects marked as "dead" are culled from the manager.
void GameObjectManager::updateObjectLifeStates()
{
// Promote new objects to "fully alive" and cull dead objects
for(ObjectSetIter it = m_objects.begin(); it != m_objects.end();)
{
switch((*it)->m_lifeState)
{
case GameObject::LS_DEAD:
{
ObjectSetIter murderDeathKill = it;
++it;
deleteObject(*murderDeathKill);
} break;
case GameObject::LS_NEW:
{
(*it)->m_lifeState = GameObject::LS_ALIVE;
++it;
} break;
default:
{
++it;
} break;
};
}
}
示例15: deleteObject
void _Universe::reset(void)
{
for (int i = 0; i < m_nObj; i++)
{
deleteObject(i);
}
}