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


C++ deleteObject函数代码示例

本文整理汇总了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;
}
开发者ID:Grimoric,项目名称:UODEMO,代码行数:32,代码来源:blacksmith.m.C

示例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; 
}
开发者ID:fresheneesz,项目名称:experiments,代码行数:30,代码来源:GUIFontManager.cpp

示例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);
}
开发者ID:gamedevforks,项目名称:LumixEngine,代码行数:9,代码来源:physics_system.cpp

示例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)));
}
开发者ID:axlefranc,项目名称:HomeCreator3D,代码行数:14,代码来源:homecreator3d.cpp

示例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;
}
开发者ID:hyperiris,项目名称:praetoriansmapeditor,代码行数:15,代码来源:GeometryManager.cpp

示例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;
}
开发者ID:BackupTheBerlios,项目名称:macroscope-svn,代码行数:29,代码来源:service.cpp

示例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"));
}
开发者ID:hyperiris,项目名称:praetoriansmapeditor,代码行数:16,代码来源:GeometryManager.cpp

示例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;
	}
}
开发者ID:rubenmv,项目名称:SpaceDefenders,代码行数:28,代码来源:ComponentAIBomber.cpp

示例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;
	}
}
开发者ID:mattrudder,项目名称:AckZombies,代码行数:29,代码来源:ObjectManager.cpp

示例10: deleteObject

	void Scene::removeAllObjects()
	{
		for (int i = drawableObjects.size() - 1; i >= 0; --i)
		{
			deleteObject(drawableObjects[i]);
		}
	}
开发者ID:zachross015,项目名称:Untethered_Game_Engine,代码行数:7,代码来源:Scene.cpp

示例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
    }
}
开发者ID:AnsonX10,项目名称:bitfighter,代码行数:29,代码来源:NexusGame.cpp

示例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() );
}
开发者ID:pockemul,项目名称:PockEmul,代码行数:34,代码来源:parse.cpp

示例13: deleteObject

void GUIFontManager::clear()
{
  for(size_t i = 0; i < guiFontList.size(); i++)
    deleteObject(guiFontList[i]); 
  
  guiFontList.clear();
}
开发者ID:fresheneesz,项目名称:experiments,代码行数:7,代码来源:GUIFontManager.cpp

示例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;
    };
  }
}
开发者ID:kmh0237,项目名称:GameProgramming2Project,代码行数:27,代码来源:GameObjectManager.cpp

示例15: deleteObject

void _Universe::reset(void)
{
	for (int i = 0; i < m_nObj; i++)
	{
		deleteObject(i);
	}
}
开发者ID:rmackay9,项目名称:OpenKAI,代码行数:7,代码来源:_Universe.cpp


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