示例#1
0
void System::update(float elapsedTime)
{
	if (mState != SYSTEM_STATE_STARTED && mState != SYSTEM_STATE_UPDATED)
		return;

	mState = SYSTEM_STATE_UPDATING;

	if (mSystemDriver != nullptr)
		mSystemDriver->update(elapsedTime);

	updateImpl(elapsedTime);

	if (mState == SYSTEM_STATE_STOPING)
	{
		if (mSystemDriver != nullptr)
			mSystemDriver->stop();

		stopImpl();

		mState = SYSTEM_STATE_STOPED;

		if (Log::getInstance() != nullptr) Log::getInstance()->logMessage(mName, "Stoped");
	}
	else
	{
		mState = SYSTEM_STATE_UPDATED;
	}
}
示例#2
0
void System::stop()
{
	if (mState == SYSTEM_STATE_STOPED)
		return;

	if (mState != SYSTEM_STATE_UPDATING)
	{
		mState = SYSTEM_STATE_STOPING;

		if (Log::getInstance() != nullptr) Log::getInstance()->logMessage(mName, "Stoping");

		if (mSystemDriver != nullptr)
			mSystemDriver->stop();

		stopImpl();

		mState = SYSTEM_STATE_STOPED;

		if (Log::getInstance() != nullptr) Log::getInstance()->logMessage(mName, "Stoped");
	}
	else
	{
		mState = SYSTEM_STATE_STOPING;

		if (Log::getInstance() != nullptr) Log::getInstance()->logMessage(mName, "Stoping");
	}
}
示例#3
0
    Process::~Process(void)
    {
#if defined(DUNE_SYS_HAS_FORK)
      stopImpl();
      joinImpl();
      m_pvt->~ProcessPrivate();
#endif
    }
示例#4
0
 void
 stop(void)
 {
   stopImpl();
 }
示例#5
0
 void Process::stop()
 {
   m_stopped = true;
   stopImpl();
 }