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


C++ Done函数代码示例

本文整理汇总了C++中Done函数的典型用法代码示例。如果您正苦于以下问题:C++ Done函数的具体用法?C++ Done怎么用?C++ Done使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Done函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: __LOG_PTR_DEBUG

void CPushAppHandlerEx::RunL()
	{
	__LOG_PTR_DEBUG("CPushAppHandlerEx:: RunL Called");

	// TODO Create a State Machine for specific actions
	switch (iState)
		{
	case EParsing :
		iState = EProcessing;
		ParsePushMsgL();
		break;
	case EProcessing:
		iState = EDone;
		ProcessPushMsgL();
		break;
	case EDone:
		Done(KErrNone);
		break;
	default:
		break;
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:22,代码来源:PushAppHandlerEx.cpp

示例2: locallock

VOID CRWLock::WriteDone()
{
	CSEM* pSem	 = nullptr;
	LONG  lCount = 0;

	{
		CSpinLock locallock(m_cs);

		ASSERT(m_nActive < 0);

		if(++m_nActive == 0)
		{
			DetachOwner();
			Done(&pSem, lCount);
		}
		else
			ASSERT(IsOwner());
	}

	if(pSem != nullptr)
		pSem->Release(lCount);
}
开发者ID:afsdd,项目名称:HP-Socket,代码行数:22,代码来源:RWLock.cpp

示例3: GetCOREInterface

void plDistribComponent_old::Preview()
{
    if( !NumTargets() )
        return;

    GetCOREInterface()->DisableSceneRedraw();

    plDistribInstTab replicants;

    plExportProgressBar bar;
    bar.Start("Preview", NumTargets() << 4);

    plDistTree distTree;
    Distribute(replicants, bar, &distTree);

    IMakeOne(replicants);

    Done();

    GetCOREInterface()->EnableSceneRedraw();
    GetCOREInterface()->ForceCompleteRedraw(FALSE);
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:22,代码来源:plDistribComponent_old.cpp

示例4: sizeof

nsresult
VariableLengthPrefixSet::WritePrefixes(nsIOutputStream* out)
{
  uint32_t written;
  uint32_t writelen = sizeof(uint32_t);
  uint32_t magic = PREFIXSET_VERSION_MAGIC;
  nsresult rv = out->Write(reinterpret_cast<char*>(&magic), writelen, &written);
  NS_ENSURE_SUCCESS(rv, rv);
  NS_ENSURE_TRUE(written == writelen, NS_ERROR_FAILURE);

  uint32_t count = mVLPrefixSet.Count();
  rv = out->Write(reinterpret_cast<char*>(&count), writelen, &written);
  NS_ENSURE_SUCCESS(rv, rv);
  NS_ENSURE_TRUE(written == writelen, NS_ERROR_FAILURE);

  // Store PrefixSize, Length of Prefix String and then Prefix String
  for (auto iter = mVLPrefixSet.ConstIter(); !iter.Done(); iter.Next()) {
    const nsCString& vlPrefixes = *iter.Data();

    uint8_t prefixSize = iter.Key();
    writelen = sizeof(uint8_t);
    rv = out->Write(reinterpret_cast<char*>(&prefixSize), writelen, &written);
    NS_ENSURE_SUCCESS(rv, rv);
    NS_ENSURE_TRUE(written == writelen, NS_ERROR_FAILURE);

    uint32_t stringLength = vlPrefixes.Length();
    writelen = sizeof(uint32_t);
    rv = out->Write(reinterpret_cast<char*>(&stringLength), writelen, &written);
    NS_ENSURE_SUCCESS(rv, rv);
    NS_ENSURE_TRUE(written == writelen, NS_ERROR_FAILURE);

    rv = out->Write(const_cast<char*>(vlPrefixes.BeginReading()),
                    stringLength, &written);
    NS_ENSURE_SUCCESS(rv, rv);
    NS_ENSURE_TRUE(stringLength == written, NS_ERROR_FAILURE);
  }

  return NS_OK;
}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:39,代码来源:VariableLengthPrefixSet.cpp

示例5: shelf_goto

Boolean shelf_goto(int i)
{
  char path[MAXPATHLEN+1];

  root_modified = cur_modified = cur_changed = shelf_modified = False;
  if (i == shelf_no && dirIsReadable(shelfdir))
    return True;
  Wait();
  shelf_modified = True;
  dirFree(shelfdir);
  shelf_no = i;
  if (shelf_dir(shelf_no))
    pathname(path, save_shelf_path, shelf_dir(shelf_no));
  else if (shelf_label(shelf_no))
    pathname(path, save_shelf_path, shelf_label(shelf_no));
  else
    strcpy(path, save_shelf_path);
  update_shelf_path(path);
  shelfdir = dirCreate(path, NULL, save_shelf_options);
  Done();
  return dirReadFileInfo(shelfdir) != NULL;
}
开发者ID:idunham,项目名称:dtextra,代码行数:22,代码来源:curdir.c

示例6: ASSERT

///////////////////////////////////////////////////////////////////////////////
// SetData
///////////////////////////////////////////////////////////////////////////////
void cHierDatabaseIter::SetData(int8* pData, int32 length) //throw (eArchive, eHierDatabase)
{
    ASSERT( ! Done() );
    ASSERT( ! HasData() );
    
    // remove the item's data, if there is any...
    //
    if( HasData() )
    {
        RemoveData();
    }
    //
    // add the data and set the entry's data pointer appropriately
    //
    cBlockRecordFile::tAddr addr = mpDb->AddItem( pData, length );
    mIter->mData = cHierAddr( addr.mBlockNum, addr.mIndex );
    //
    // update the entry on disk...
    //
    util_RewriteObject( mpDb, &(*mIter), GetCurrentAddr() );

}
开发者ID:faical-yannick-congo,项目名称:tripwire-open-source,代码行数:25,代码来源:hierdatabase.cpp

示例7: MOZ_ASSERT

already_AddRefed<TabParent>
ContentProcessManager::GetTabParentByProcessAndTabId(const ContentParentId& aChildCpId,
                                                     const TabId& aChildTabId)
{
  MOZ_ASSERT(NS_IsMainThread());

  auto iter = mContentParentMap.find(aChildCpId);
  if (NS_WARN_IF(iter == mContentParentMap.end())) {
    ASSERT_UNLESS_FUZZING();
    return nullptr;
  }

  const ManagedContainer<PBrowserParent>& browsers = iter->second.mCp->ManagedPBrowserParent();
  for (auto iter = browsers.ConstIter(); !iter.Done(); iter.Next()) {
    RefPtr<TabParent> tab = TabParent::GetFrom(iter.Get()->GetKey());
    if (tab->GetTabId() == aChildTabId) {
      return tab.forget();
    }
  }

  return nullptr;
}
开发者ID:npark-mozilla,项目名称:gecko-dev,代码行数:22,代码来源:ContentProcessManager.cpp

示例8: cool_heels

static void
cool_heels(void)
{
	int			status;

	/*
	 * At this point our only job is to wait for the child process.
	 * If we hang out for a bit longer, that's okay.
	 * By delaying before turning off the fault signals,
	 * we increase the chance that the child process has completed
	 * its exec and has turned on the fault traps. Nonetheless,
	 * we can't guarantee a zero chance of missing a fault.
	 * (We don't want to keep trapping the signals because the
	 * interface program is likely to have a better way to handle
	 * them; this process provides only rudimentary handling.)
	 *
	 * Note that on a very busy system, or with a very fast interface
	 * program, the tables could be turned: Our sleep below (coupled
	 * with a delay in the kernel scheduling us) may cause us to
	 * detect the fault instead of the interface program.
	 *
	 * What we need is a way to synchronize with the child process.
	 */
	sleep (1);
	ignore_fault_signals ();

	WaitedChildPid = 0;
	while ((WaitedChildPid = wait(&status)) != ChildPid)
		;
			
	if (
		EXITED(status) > EXEC_EXIT_USER
	     && EXITED(status) != EXEC_EXIT_FAULT
	)
		Done (EXEC_EXIT_EXIT, EXITED(status));

	done (status, 0);	/* Don't use Done() */
	/*NOTREACHED*/
}
开发者ID:alhazred,项目名称:onarm,代码行数:39,代码来源:exec.c

示例9: DrawDiagnostics

void
Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
                            const nsIntRegion& aVisibleRegion,
                            const gfx::IntRect& aClipRect,
                            const gfx::Matrix4x4& aTransform,
                            uint32_t aFlashCounter)
{
  if (!ShouldDrawDiagnostics(aFlags)) {
    return;
  }

  if (aVisibleRegion.GetNumRects() > 1) {
    for (auto iter = aVisibleRegion.RectIter(); !iter.Done(); iter.Next()) {
      DrawDiagnostics(aFlags | DiagnosticFlags::REGION_RECT,
                      IntRectToRect(iter.Get()), aClipRect, aTransform,
                      aFlashCounter);
    }
  }

  DrawDiagnostics(aFlags, IntRectToRect(aVisibleRegion.GetBounds()),
                  aClipRect, aTransform, aFlashCounter);
}
开发者ID:MichaelKohler,项目名称:gecko-dev,代码行数:22,代码来源:Compositor.cpp

示例10: MOZ_ASSERT

PromiseId
MediaKeys::StorePromise(DetailedPromise* aPromise)
{
  static uint32_t sEMEPromiseCount = 1;
  MOZ_ASSERT(aPromise);
  uint32_t id = sEMEPromiseCount++;

  EME_LOG("MediaKeys[%p]::StorePromise() id=%d", this, id);

  // Keep MediaKeys alive for the lifetime of its promises. Any still-pending
  // promises are rejected in Shutdown().
  AddRef();

#ifdef DEBUG
  // We should not have already stored this promise!
  for (auto iter = mPromises.ConstIter(); !iter.Done(); iter.Next()) {
    MOZ_ASSERT(iter.Data() != aPromise);
  }
#endif

  mPromises.Put(id, aPromise);
  return id;
}
开发者ID:bolt-dev,项目名称:gecko-dev,代码行数:23,代码来源:MediaKeys.cpp

示例11: MOZ_ASSERT

NS_IMETHODIMP
IndexedDatabaseManager::Notify(nsITimer* aTimer)
{
  MOZ_ASSERT(IsMainProcess());
  MOZ_ASSERT(NS_IsMainThread());

  for (auto iter = mPendingDeleteInfos.ConstIter(); !iter.Done(); iter.Next()) {
    auto key = iter.Key();
    auto value = iter.Data();
    MOZ_ASSERT(!value->IsEmpty());

    RefPtr<DeleteFilesRunnable> runnable =
      new DeleteFilesRunnable(mBackgroundThread, key, *value);

    MOZ_ASSERT(value->IsEmpty());

    runnable->Dispatch();
  }

  mPendingDeleteInfos.Clear();

  return NS_OK;
}
开发者ID:pkdevboxy,项目名称:gecko-dev,代码行数:23,代码来源:IndexedDatabaseManager.cpp

示例12:

void
ImageLoader::ClearFrames(nsPresContext* aPresContext)
{
  for (auto iter = mRequestToFrameMap.ConstIter(); !iter.Done(); iter.Next()) {
    auto request = static_cast<imgIRequest*>(iter.Key());

#ifdef DEBUG
    {
      nsCOMPtr<imgIRequest> debugRequest = do_QueryInterface(request);
      NS_ASSERTION(debugRequest == request, "This is bad");
    }
#endif

    if (aPresContext) {
      nsLayoutUtils::DeregisterImageRequest(aPresContext,
					    request,
					    nullptr);
    }
  }

  mRequestToFrameMap.Clear();
  mFrameToRequestMap.Clear();
}
开发者ID:MekliCZ,项目名称:positron,代码行数:23,代码来源:ImageLoader.cpp

示例13: AppendRequestsToArray

static bool
AppendRequestsToArray(PLDHashTable* aTable, nsTArray<nsIRequest*> *aArray)
{
    for (auto iter = aTable->Iter(); !iter.Done(); iter.Next()) {
        auto e = static_cast<RequestMapEntry*>(iter.Get());
        nsIRequest *request = e->mKey;
        NS_ASSERTION(request, "What? Null key in PLDHashTable entry?");

        bool ok = !!aArray->AppendElement(request);
        if (!ok) {
           break;
        }
        NS_ADDREF(request);
    }

    if (aArray->Length() != aTable->EntryCount()) {
        for (uint32_t i = 0, len = aArray->Length(); i < len; ++i) {
            NS_RELEASE((*aArray)[i]);
        }
        return false;
    }
    return true;
}
开发者ID:emilio,项目名称:gecko-dev,代码行数:23,代码来源:nsLoadGroup.cpp

示例14: CheckChr

void CheckChr(struct connection *c, char Chr) {
	if (Chr < 32 && Chr != 9 && Chr != 10) return;

	strncat(curline, &Chr, 1);

	// newline has come
	if (Chr == 10) {
		// this is a fucking hack to handle unwanted interactivity (session in use)
		if (strstr(curline, "SESSION REJECTED") && strstr(curline, "IN USE")) {
			if (force_login) {
				SendChar('+');
				SendChar(13);
				SendChar(10);
			} else {
				Done(105);
			}
		}

		if (!verbose) {
			if (strstr(curline, "<") == curline
			|| strstr(curline, ":::") == curline
			|| strstr(curline, "SESSION REJECTED") == curline
			|| strstr(curline, "RE-OPEN SUCCESSFUL. NEW SESSION ESTABLISHED.") == curline
			|| (curline[0] == 10 && (lastline[0] == 10 || lastline[0] == 0))) {
				curline[0] = 0;
			}
		}

		fprintf(stdout, "%s", curline);
		fflush(stdout);

		if (curline[0]) {
			strcpy(lastline, curline);
			curline[0] = 0;
		}
	}
}
开发者ID:rpodgorny,项目名称:ewterm,代码行数:37,代码来源:ewcmd.c

示例15: WaitForSave

NS_IMETHODIMP mozPersonalDictionary::Save()
{
  nsCOMPtr<nsIFile> theFile;
  nsresult res;

  WaitForSave();

  mSavePending = true;

  //FIXME Deinst  -- get dictionary name from prefs;
  res = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(theFile));
  if(NS_FAILED(res)) return res;
  if(!theFile)return NS_ERROR_FAILURE;
  res = theFile->Append(NS_LITERAL_STRING(MOZ_PERSONAL_DICT_NAME));
  if(NS_FAILED(res)) return res;

  nsCOMPtr<nsIEventTarget> target =
    do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &res);
  if (NS_WARN_IF(NS_FAILED(res))) {
    return res;
  }

  nsTArray<nsString> array;
  nsString* elems = array.AppendElements(mDictionaryTable.Count());
  for (auto iter = mDictionaryTable.Iter(); !iter.Done(); iter.Next()) {
    elems->Assign(iter.Get()->GetKey());
    elems++;
  }

  nsCOMPtr<nsIRunnable> runnable =
    new mozPersonalDictionarySave(this, theFile, mozilla::Move(array));
  res = target->Dispatch(runnable, NS_DISPATCH_NORMAL);
  if (NS_WARN_IF(NS_FAILED(res))) {
    return res;
  }
  return res;
}
开发者ID:LongyunZhang,项目名称:gecko-dev,代码行数:37,代码来源:mozPersonalDictionary.cpp


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