这篇教程C++ EndTransaction函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中EndTransaction函数的典型用法代码示例。如果您正苦于以下问题:C++ EndTransaction函数的具体用法?C++ EndTransaction怎么用?C++ EndTransaction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了EndTransaction函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetTargetFrame/* static */ boolWheelTransaction::WillHandleDefaultAction(WidgetWheelEvent* aWheelEvent, nsWeakFrame& aTargetWeakFrame){ nsIFrame* lastTargetFrame = GetTargetFrame(); if (!lastTargetFrame) { BeginTransaction(aTargetWeakFrame.GetFrame(), aWheelEvent); } else if (lastTargetFrame != aTargetWeakFrame.GetFrame()) { EndTransaction(); BeginTransaction(aTargetWeakFrame.GetFrame(), aWheelEvent); } else { UpdateTransaction(aWheelEvent); } // When the wheel event will not be handled with any frames, // UpdateTransaction() fires MozMouseScrollFailed event which is for // automated testing. In the event handler, the target frame might be // destroyed. Then, the caller shouldn't try to handle the default action. if (!aTargetWeakFrame.IsAlive()) { EndTransaction(); return false; } return true;}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:25,
示例2: CheckDirtyReadstatic intCheckDirtyRead(void){ SQLRETURN RetCode; /* transaction 1 try to change a row but not commit */ odbc_command("UPDATE test_transaction SET t = 'second' WHERE n = 1"); SWAP_CONN(); /* second transaction try to fetch uncommited row */ RetCode = odbc_command2("SELECT * FROM test_transaction WHERE t = 'second' AND n = 1", "SE"); if (RetCode == SQL_ERROR) { EndTransaction(SQL_ROLLBACK); SWAP_CONN(); EndTransaction(SQL_ROLLBACK); return 0; /* no dirty read */ } CHKFetch("S"); CHKFetch("No"); SQLMoreResults(odbc_stmt); EndTransaction(SQL_ROLLBACK); SWAP_CONN(); EndTransaction(SQL_ROLLBACK); return 1;}
开发者ID:RQZeng,项目名称:freetds,代码行数:27,
示例3: NS_ENSURE_TRUENS_IMETHODIMPnsTransactionManager::DoTransaction(nsITransaction *aTransaction){ nsresult result; NS_ENSURE_TRUE(aTransaction, NS_ERROR_NULL_POINTER); bool doInterrupt = false; result = WillDoNotify(aTransaction, &doInterrupt); if (NS_FAILED(result)) { return result; } if (doInterrupt) { return NS_OK; } result = BeginTransaction(aTransaction); if (NS_FAILED(result)) { DidDoNotify(aTransaction, result); return result; } result = EndTransaction(); nsresult result2 = DidDoNotify(aTransaction, result); if (NS_SUCCEEDED(result)) result = result2; return result;}
开发者ID:FunkyVerb,项目名称:devtools-window,代码行数:35,
示例4: EndTransactionvoid FSpriteEditorViewportClient::NotifySpriteBeingEditedHasChanged(){ //@TODO: Ideally we do this before switching EndTransaction(); // Refresh the viewport in case we were not in realtime mode Invalidate(); // Update components to know about the new sprite being edited UPaperSprite* Sprite = GetSpriteBeingEdited(); RenderSpriteComponent->SetSprite(Sprite); UpdateSourceTextureSpriteFromSprite(Sprite); InternalActivateNewMode(CurrentMode); //@TODO: Only do this if the sprite isn't visible (may consider doing a flashing pulse around the source region rect?) RequestFocusOnSelection(/*bInstant=*/ true); if (Sprite != nullptr) { // Create and display a notification about the new sprite being edited const FText NotificationErrorText = FText::Format(LOCTEXT("SwitchingToSprite", "Editing {0}"), FText::AsCultureInvariant(Sprite->GetName())); FNotificationInfo Info(NotificationErrorText); Info.ExpireDuration = 2.0f; FSlateNotificationManager::Get().AddNotification(Info); }}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:28,
示例5: fsal_posixdb_deletefsal_posixdb_status_t fsal_posixdb_delete(fsal_posixdb_conn * p_conn, /* IN */ posixfsal_handle_t * p_parent_directory_handle, /* IN */ fsal_name_t * p_filename, /* IN */ fsal_posixdb_fileinfo_t * p_object_info /* IN */ ){ result_handle_t res; fsal_posixdb_status_t st; char query[2048]; /******************* * 1/ sanity check * *******************/ if(!p_conn || !p_parent_directory_handle || !p_filename) ReturnCodeDB(ERR_FSAL_POSIXDB_FAULT, 0); BeginTransaction(p_conn); /******************************* * 2/ we check the file exists * *******************************/ snprintf(query, 2048, "SELECT Parent.handleid, Parent.handlets, " "Handle.deviceid, Handle.inode, Handle.nlink, Handle.ctime, Handle.ftype " "FROM Parent INNER JOIN Handle ON Parent.handleid = Handle.handleid " "AND Parent.handlets=Handle.handlets " "WHERE handleidparent=%llu AND handletsparent=%u AND name='%s' " "FOR UPDATE", p_parent_directory_handle->data.id, p_parent_directory_handle->data.ts, p_filename->name); st = db_exec_sql(p_conn, query, &res); if(FSAL_POSIXDB_IS_ERROR(st)) goto rollback; if(mysql_num_rows(res) != 1) { /* parent entry not found */ mysql_free_result(res); RollbackTransaction(p_conn); ReturnCodeDB(ERR_FSAL_POSIXDB_NOENT, 0); } mysql_free_result(res); /*********************************************** * 3/ Get information about the file to delete * ***********************************************/ st = fsal_posixdb_internal_delete(p_conn, p_parent_directory_handle->data.id, p_parent_directory_handle->data.ts, p_filename->name, p_object_info); if(FSAL_POSIXDB_IS_ERROR(st)) goto rollback; return EndTransaction(p_conn); rollback: RollbackTransaction(p_conn); return st;}
开发者ID:alangenfeld,项目名称:cloud-nfs,代码行数:60,
示例6: CancelableBlockStateWheelBlockState::WheelBlockState(const RefPtr<AsyncPanZoomController>& aTargetApzc, bool aTargetConfirmed, const ScrollWheelInput& aInitialEvent) : CancelableBlockState(aTargetApzc, aTargetConfirmed) , mScrollSeriesCounter(0) , mTransactionEnded(false){ sLastWheelBlockId = GetBlockId(); if (aTargetConfirmed) { // Find the nearest APZC in the overscroll handoff chain that is scrollable. // If we get a content confirmation later that the apzc is different, then // content should have found a scrollable apzc, so we don't need to handle // that case. RefPtr<AsyncPanZoomController> apzc = mOverscrollHandoffChain->FindFirstScrollable(aInitialEvent); // If nothing is scrollable, we don't consider this block as starting a // transaction. if (!apzc) { EndTransaction(); return; } if (apzc != GetTargetApzc()) { UpdateTargetApzc(apzc); } }}
开发者ID:leplatrem,项目名称:gecko-dev,代码行数:29,
示例7: LOCK_TX_MANAGERNS_IMETHODIMPnsTransactionManager::EndBatch(){ nsRefPtr<nsTransactionItem> tx; nsCOMPtr<nsITransaction> ti; nsresult result; LOCK_TX_MANAGER(this); // XXX: Need to add some mechanism to detect the case where the transaction // at the top of the do stack isn't the dummy transaction, so we can // throw an error!! This can happen if someone calls EndBatch() within // the DoTransaction() method of a transaction. // // For now, we can detect this case by checking the value of the // dummy transaction's mTransaction field. If it is our dummy // transaction, it should be NULL. This may not be true in the // future when we allow users to execute a transaction when beginning // a batch!!!! result = mDoStack.Peek(getter_AddRefs(tx)); if (NS_FAILED(result)) { UNLOCK_TX_MANAGER(this); return result; } if (tx) tx->GetTransaction(getter_AddRefs(ti)); if (!tx || ti) { UNLOCK_TX_MANAGER(this); return NS_ERROR_FAILURE; } PRBool doInterrupt = PR_FALSE; result = WillEndBatchNotify(&doInterrupt); if (NS_FAILED(result)) { UNLOCK_TX_MANAGER(this); return result; } if (doInterrupt) { UNLOCK_TX_MANAGER(this); return NS_OK; } result = EndTransaction(); nsresult result2 = DidEndBatchNotify(result); if (NS_SUCCEEDED(result)) result = result2; UNLOCK_TX_MANAGER(this); return result;}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:60,
示例8: EndTransactionFReply FCanvasSlotExtension::HandleAnchorEndDrag(const FGeometry& Geometry, const FPointerEvent& Event, EAnchorWidget::Type AnchorType){ EndTransaction(); bMovingAnchor = false; return FReply::Handled().ReleaseMouseCapture();}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:7,
示例9: EndTransactionboolWheelBlockState::SetContentResponse(bool aPreventDefault){ if (aPreventDefault) { EndTransaction(); } return CancelableBlockState::SetContentResponse(aPreventDefault);}
开发者ID:leplatrem,项目名称:gecko-dev,代码行数:8,
示例10: EndTransactionFSCSEditorViewportClient::~FSCSEditorViewportClient(){ // Ensure that an in-progress transaction is ended EndTransaction(); // Clean up the preview DestroyPreview();}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:8,
示例11: EndTransaction/* static */ voidWheelTransaction::MayEndTransaction(){ if (!sOwnScrollbars && ScrollbarsForWheel::IsActive()) { ScrollbarsForWheel::OwnWheelTransaction(true); } else { EndTransaction(); }}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:9,
示例12: EndTransactionvoid FSingleTileEditorViewportClient::TrackingStopped(){ // Stop transacting. Give the current editor mode an opportunity to do the transacting. const bool bTransactingHandledByEditorMode = ModeTools->EndTracking(this, Viewport); if (bManipulating && !bTransactingHandledByEditorMode) { EndTransaction(); bManipulating = false; }}
开发者ID:aovi,项目名称:UnrealEngine4,代码行数:11,
示例13: NS_ASSERTIONboolLayerManagerComposite::EndEmptyTransaction(EndTransactionFlags aFlags){ NS_ASSERTION(mInTransaction, "Didn't call BeginTransaction?"); if (!mRoot) { mInTransaction = false; mIsCompositorReady = false; return false; } EndTransaction(nullptr, nullptr); return true;}
开发者ID:Bouh,项目名称:gecko-dev,代码行数:13,
示例14: EndTransactionboolLayerManagerD3D9::EndEmptyTransaction(){ // If the device reset count from our last EndTransaction doesn't match // the current device reset count, the device must have been reset one or // more times since our last transaction. In that case, an empty transaction // is not possible, because layers may need to be rerendered. if (!mRoot || mDeviceResetCount != mDeviceManager->GetDeviceResetCount()) return false; EndTransaction(nsnull, nsnull); return true;}
开发者ID:Egyptghost1,项目名称:DOMinator,代码行数:13,
示例15: CheckPhantomstatic intCheckPhantom(void){ SQLRETURN RetCode; /* transaction 2 read a row */ SWAP_CONN(); odbc_command("SELECT * FROM test_transaction WHERE t = 'initial'"); SQLMoreResults(odbc_stmt); /* transaction 1 insert a row that match critera */ SWAP_CONN(); RetCode = odbc_command2("INSERT INTO test_transaction(n, t) VALUES(2, 'initial')", "SE"); if (RetCode == SQL_ERROR) { EndTransaction(SQL_ROLLBACK); SWAP_CONN(); EndTransaction(SQL_ROLLBACK); SWAP_CONN(); return 0; /* no dirty read */ } EndTransaction(SQL_COMMIT); SWAP_CONN(); /* second transaction try to fetch commited row */ odbc_command("SELECT * FROM test_transaction WHERE t = 'initial'"); CHKFetch("S"); CHKFetch("S"); CHKFetch("No"); SQLMoreResults(odbc_stmt); EndTransaction(SQL_ROLLBACK); SWAP_CONN(); odbc_command("DELETE test_transaction WHERE n = 2"); EndTransaction(SQL_COMMIT); return 1;}
开发者ID:RQZeng,项目名称:freetds,代码行数:37,
示例16: NS_ASSERTION/* static */ voidWheelTransaction::BeginTransaction(nsIFrame* aTargetFrame, WidgetWheelEvent* aEvent){ NS_ASSERTION(!sTargetFrame, "previous transaction is not finished!"); MOZ_ASSERT(aEvent->mMessage == eWheel, "Transaction must be started with a wheel event"); ScrollbarsForWheel::OwnWheelTransaction(false); sTargetFrame = aTargetFrame; sScrollSeriesCounter = 0; if (!UpdateTransaction(aEvent)) { NS_ERROR("BeginTransaction is called even cannot scroll the frame"); EndTransaction(); }}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:15,
示例17: CheckNonrepeatableReadstatic intCheckNonrepeatableRead(void){ SQLRETURN RetCode; /* transaction 2 read a row */ SWAP_CONN(); odbc_command("SELECT * FROM test_transaction WHERE t = 'initial' AND n = 1"); SQLMoreResults(odbc_stmt); /* transaction 1 change a row and commit */ SWAP_CONN(); RetCode = odbc_command2("UPDATE test_transaction SET t = 'second' WHERE n = 1", "SE"); if (RetCode == SQL_ERROR) { EndTransaction(SQL_ROLLBACK); SWAP_CONN(); EndTransaction(SQL_ROLLBACK); SWAP_CONN(); return 0; /* no dirty read */ } EndTransaction(SQL_COMMIT); SWAP_CONN(); /* second transaction try to fetch commited row */ odbc_command("SELECT * FROM test_transaction WHERE t = 'second' AND n = 1"); CHKFetch("S"); CHKFetch("No"); SQLMoreResults(odbc_stmt); EndTransaction(SQL_ROLLBACK); SWAP_CONN(); odbc_command("UPDATE test_transaction SET t = 'initial' WHERE n = 1"); EndTransaction(SQL_COMMIT); return 1;}
开发者ID:RQZeng,项目名称:freetds,代码行数:36,
示例18: BeginTransactionFReply FGridSlotExtension::HandleShiftColumn(int32 ShiftAmount){ BeginTransaction(LOCTEXT("MoveWidget", "Move Widget")); for ( FWidgetReference& Selection : SelectionCache ) { ShiftColumn(Selection.GetPreview(), ShiftAmount); ShiftColumn(Selection.GetTemplate(), ShiftAmount); } EndTransaction(); FBlueprintEditorUtils::MarkBlueprintAsModified(Blueprint); return FReply::Handled();}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:16,
示例19: BeginTransactionFReply FVerticalSlotExtension::HandleShiftVertical(int32 ShiftAmount){ BeginTransaction(LOCTEXT("MoveWidget", "Move Widget")); for ( FWidgetReference& Selection : SelectionCache ) { ShiftVertical(Selection.GetPreview(), ShiftAmount); ShiftVertical(Selection.GetTemplate(), ShiftAmount); } EndTransaction(); //TODO UMG Reorder the live slot without rebuilding the structure FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(Blueprint); return FReply::Handled();}
开发者ID:VZout,项目名称:Team6UnrealEngine,代码行数:17,
示例20: fsal_posixdb_deleteHandlefsal_posixdb_status_t fsal_posixdb_deleteHandle(fsal_posixdb_conn * p_conn, /* IN */ posixfsal_handle_t * p_parent_directory_handle /* IN */ ){/* char handleid_str[MAX_HANDLEIDSTR_SIZE]; char handlets_str[MAX_HANDLETSSTR_SIZE]; const char *paramValues[2]; */ int found; result_handle_t res; fsal_posixdb_status_t st; char query[2048]; BeginTransaction(p_conn); LogFullDebug(COMPONENT_FSAL, "Deleting %llu.%u/n", p_parent_directory_handle->data.id, p_parent_directory_handle->data.ts); snprintf(query, 2048, "SELECT Handle.deviceid, Handle.inode, Handle.nlink, Handle.ctime, Handle.ftype " "FROM Handle WHERE handleid=%llu AND handlets=%u FOR UPDATE", p_parent_directory_handle->data.id, p_parent_directory_handle->data.ts); st = db_exec_sql(p_conn, query, &res); if(FSAL_POSIXDB_IS_ERROR(st)) goto rollback; found = mysql_num_rows(res); mysql_free_result(res); if(found) { /* entry found */ st = fsal_posixdb_recursiveDelete(p_conn, p_parent_directory_handle->data.id, p_parent_directory_handle->data.ts, FSAL_TYPE_DIR); if(FSAL_POSIXDB_IS_ERROR(st)) goto rollback; } return EndTransaction(p_conn); rollback: RollbackTransaction(p_conn); return st;}
开发者ID:alangenfeld,项目名称:cloud-nfs,代码行数:45,
示例21: GetPreviewActorvoid FSCSEditorViewportClient::TrackingStopped() { if( bIsManipulating ) { // Re-run construction scripts if we haven't done so yet (so that the components in the preview actor can update their transforms) AActor* PreviewActor = GetPreviewActor(); if(PreviewActor != NULL && PreviewBlueprint != NULL && !PreviewBlueprint->bRunConstructionScriptOnDrag) { PreviewActor->RerunConstructionScripts(); } // End transaction bIsManipulating = false; EndTransaction(); // Restore component delta modification GEditor->DisableDeltaModification(false); }}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:19,
示例22: EndTransactionvoid FMoveSection::OnEndDrag(TSharedPtr<FTrackNode> SequencerNode){ DraggedKeyHandles.Empty(); if (Section.IsValid()) { SequencerNode->FixRowIndices(); UMovieSceneTrack* OuterTrack = Cast<UMovieSceneTrack>(Section->GetOuter()); if (OuterTrack) { OuterTrack->Modify(); OuterTrack->OnSectionMoved(*Section); } } EndTransaction();}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:19,
示例23: LOCK_TX_MANAGERNS_IMETHODIMPnsTransactionManager::DoTransaction(nsITransaction *aTransaction){ nsresult result; if (!aTransaction) return NS_ERROR_NULL_POINTER; LOCK_TX_MANAGER(this); PRBool doInterrupt = PR_FALSE; result = WillDoNotify(aTransaction, &doInterrupt); if (NS_FAILED(result)) { UNLOCK_TX_MANAGER(this); return result; } if (doInterrupt) { UNLOCK_TX_MANAGER(this); return NS_OK; } result = BeginTransaction(aTransaction); if (NS_FAILED(result)) { DidDoNotify(aTransaction, result); UNLOCK_TX_MANAGER(this); return result; } result = EndTransaction(); nsresult result2 = DidDoNotify(aTransaction, result); if (NS_SUCCEEDED(result)) result = result2; UNLOCK_TX_MANAGER(this); return result;}
开发者ID:MozillaOnline,项目名称:gecko-dev,代码行数:43,
示例24: NS_PRECONDITION/* static */ voidWheelTransaction::OnFailToScrollTarget(){ NS_PRECONDITION(sTargetFrame, "We don't have mouse scrolling transaction"); if (Preferences::GetBool("test.mousescroll", false)) { // This event is used for automated tests, see bug 442774. nsContentUtils::DispatchTrustedEvent( sTargetFrame->GetContent()->OwnerDoc(), sTargetFrame->GetContent(), NS_LITERAL_STRING("MozMouseScrollFailed"), true, true); } // The target frame might be destroyed in the event handler, at that time, // we need to finish the current transaction if (!sTargetFrame) { EndTransaction(); }}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:19,
示例25: MOZ_ASSERTvoidWheelBlockState::OnMouseMove(const ScreenIntPoint& aPoint){ MOZ_ASSERT(InTransaction()); if (!GetTargetApzc()->Contains(aPoint)) { EndTransaction(); return; } if (mLastMouseMove.IsNull()) { // If the cursor is moving inside the frame, and it is more than the // ignoremovedelay time since the last scroll operation, we record // this as the most recent mouse movement. TimeStamp now = TimeStamp::Now(); TimeDuration duration = now - mLastEventTime; if (duration.ToMilliseconds() >= gfxPrefs::MouseWheelIgnoreMoveDelayMs()) { mLastMouseMove = now; } }}
开发者ID:leplatrem,项目名称:gecko-dev,代码行数:21,
注:本文中的EndTransaction函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ EndUpdate函数代码示例 C++ EndTimeSlice函数代码示例 |