當前位置: 首頁>>代碼示例>>C++>>正文


C++ Abort函數代碼示例

本文整理匯總了C++中Abort函數的典型用法代碼示例。如果您正苦於以下問題:C++ Abort函數的具體用法?C++ Abort怎麽用?C++ Abort使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Abort函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GetKineticEnergyMatrix

//B*ddq + C*dq = fext
void DynamicChain2D::GetAcceleration(Vector& ddq, const Vector& fext)
{
	Matrix B;
	GetKineticEnergyMatrix(B);
	CholeskyDecomposition<Real> cholesky;
	if(!cholesky.set(B)) {
		LOG4CXX_ERROR(KrisLibrary::logger(),"Kinetic energy matrix is not positive definite!");
		LOG4CXX_ERROR(KrisLibrary::logger(),B);
		Abort();
	}

	Vector Cdq;
	GetCoriolisForces(Cdq);
	Vector f_Cdq;
	if(fext.n==0) f_Cdq.setNegative(Cdq);
	else f_Cdq.sub(fext,Cdq);
	cholesky.backSub(f_Cdq,ddq);
}
開發者ID:krishauser,項目名稱:KrisLibrary,代碼行數:19,代碼來源:DynamicChain.cpp

示例2: Abort

void ExecutionDialog::OnCancel(wxCommandEvent &ev)
{
	if (thread)
	{
		btnCancel->Disable();
		Abort();
		btnCancel->Enable();
		btnOK->Enable();
	}
	else
	{
		delete conn;
		if (IsModal())
			EndModal(-1);
		else
			Destroy();
	}
}
開發者ID:GHnubsST,項目名稱:pgadmin3,代碼行數:18,代碼來源:dlgClasses.cpp

示例3: Abort

bool CDVDDemuxClient::Open(CDVDInputStream* pInput)
{
  Abort();

  m_pInput = pInput;
  m_IDemux = dynamic_cast<CDVDInputStream::IDemux*>(m_pInput);
  if (!m_IDemux)
    return false;

  if (!m_IDemux->OpenDemux())
    return false;

  RequestStreams();

  m_displayTime = 0;
  m_dtsAtDisplayTime = DVD_NOPTS_VALUE;
  return true;
}
開發者ID:FLyrfors,項目名稱:xbmc,代碼行數:18,代碼來源:DVDDemuxClient.cpp

示例4: DoDirControl

private func DoDirControl(int iDir)
  {
  // Abbruch, wenn das Zielobjekt weg ist
  if (!pTargetObject) return(Abort());
  // Richtungsänderung?
  if (iDir != GetDir(pTargetObject))
    {
    iAngle=-iAngle;
    pTargetObject->SetDir(iDir);
    pArrow->UpdateAngle(iAngle);
    pTargetObject->~AimingAngle(iAngle);
    }
  else
    // Tastendruck in Zielrichtung: Zaubern! - nicht bei tumble!
    if(!(GetAction(pTargetObject) S= "Tumble"))
     DoEnter();
  return(1);
  }
開發者ID:Meowtimer,項目名稱:ChangingWorldRed,代碼行數:18,代碼來源:fix_Aimer.c

示例5: lock

ulen Sem::begin_give_many(ulen dcount)
 {
  FastMutex::Lock lock(mutex);
   
  if( take_count<dcount )
    {
     dcount-=take_count;
      
     if( UIntAdd(count,dcount) ) Abort("Fatal error : CCore::Sem counter add overflow");
     
     return Replace_null(take_count);
    }
  else
    {
     take_count-=dcount;
     
     return dcount;
    }  
 }
開發者ID:SergeyStrukov,項目名稱:CCore,代碼行數:19,代碼來源:Sem.cpp

示例6: runtime_get_windowing_system

void
BitmapImage::CreateLoader (unsigned char *buffer)
{
	if (!(moonlight_flags & RUNTIME_INIT_ALL_IMAGE_FORMATS)) {
		// 89 50 4E 47 == png magic
		if (buffer[0] == 0x89)
			loader = runtime_get_windowing_system()->CreatePixbufLoader ("png");
		// ff d8 ff e0 == jfif magic
		else if (buffer[0] == 0xff)
			loader = runtime_get_windowing_system()->CreatePixbufLoader ("jpeg");

		else {
			Abort ();
			moon_error = new MoonError (MoonError::EXCEPTION, 4001, "unsupported image type");
		}
	} else {
		loader = runtime_get_windowing_system()->CreatePixbufLoader (NULL);
	}
}
開發者ID:lewing,項目名稱:moon,代碼行數:19,代碼來源:bitmapimage.cpp

示例7: ValidateMaskEditT

void ValidateMaskEditT(UnicodeString Mask, TEditControl *Edit, int ForceDirectoryMasks)
{
  DebugAssert(Edit != nullptr);
  TFileMasks Masks(ForceDirectoryMasks);
  try
  {
    Masks = Mask;
  }
  catch (EFileMasksException &E)
  {
    ShowExtendedException(&E);
    Edit->SetFocus();
    // This does not work for TEdit and TMemo (descendants of TCustomEdit) anymore,
    // as it re-selects whole text on exception in TCustomEdit.CMExit
//    Edit->SelStart = E.ErrorStart - 1;
//    Edit->SelLength = E.ErrorLen;
    Abort();
  }
}
開發者ID:michaellukashov,項目名稱:Far-NetBox,代碼行數:19,代碼來源:FarInterface.cpp

示例8: permute_one

static void
permute_one (void *arg, transition_info_t *ti, state_data_t dst, int *cpy)
{

    (void) cpy;

    permute_t          *perm = (permute_t*) arg;
    int                 seen;
    seen = state_info_new_state (perm->next, dst, ti, perm->state);
    if (EXPECT_FALSE(seen < 0)) {
        global->exit_status = LTSMIN_EXIT_FAILURE;
        if (run_stop(perm->run_ctx)) {
            Warning (info, "Error: %s full! Change -s/--ratio.",
                           state_store_full_msg(seen));
        }
        return;
    }
    switch (perm->permutation) {
    case Perm_Shift:
        if (ti->group < perm->start_group) {
            perm_todo (perm, ti, seen);
            break;
        } else // fall through
    case Perm_None:
        perm->real_cb (perm->call_ctx, perm->next, ti, seen);
        ti->por_proviso &= perm->por_proviso;
        break;
    case Perm_Shift_All:
        if (0 == perm->start_group_index && ti->group >= perm->start_group)
            perm->start_group_index = perm->nstored;
        // fall through
    case Perm_Dynamic:
    case Perm_Random:
    case Perm_SR:
    case Perm_RR:
    case Perm_Otf:
    case Perm_Sort:
        perm_todo (perm, ti, seen);
        break;
    default:
        Abort ("Unknown permutation!");
    }
}
開發者ID:alaarman,項目名稱:ltsmin,代碼行數:43,代碼來源:permute.c

示例9: Abort

void
SpeechRecognition::ProcessTestEventRequest(nsISupports* aSubject,
                                           const nsAString& aEventName)
{
  if (aEventName.EqualsLiteral("EVENT_ABORT")) {
    Abort();
  } else if (aEventName.EqualsLiteral("EVENT_AUDIO_ERROR")) {
    DispatchError(
      SpeechRecognition::EVENT_AUDIO_ERROR,
      SpeechRecognitionErrorCode::Audio_capture, // TODO different codes?
      NS_LITERAL_STRING("AUDIO_ERROR test event"));
  } else {
    NS_ASSERTION(StaticPrefs::MediaWebspeechTextFakeRecognitionService(),
                 "Got request for fake recognition service event, but "
                 "media.webspeech.test.fake_recognition_service is unset");

    // let the fake recognition service handle the request
  }
}
開發者ID:heiher,項目名稱:gecko-dev,代碼行數:19,代碼來源:SpeechRecognition.cpp

示例10: TopDecls

/* parse and translate global declarations */
void TopDecls(void)
{
    printf(".section .data\n");
    char tmp_buf[MAX_BUF];
    while(Look != 'B') {
        switch(Look) {
            case 'b':
            case 'w':
            case 'l':
                Decl();
                break;
            default:
                sprintf(tmp_buf, "Unrecognized keyword %c", Look);
                Abort(tmp_buf);
                break;
        }
        Fin();
    }
}
開發者ID:A-deLuna,項目名稱:Let-s-build-a-compiler,代碼行數:20,代碼來源:main.c

示例11: put_at_chunk

static void put_at_chunk(value_table_t vt,chunk item,value_index_t index){
    SIputCAt(vt->index,item.data,item.len,index);

    if (HREme(vt->ctx)!=0) {
        Debug("validating at owner chunk %s at %u",item.data, index);
        if (vt->msg_pending) {
            Debug("waiting for msg (%x/%d) %s",vt->msg_pending,vt->msg_pending,vt->msg->buffer+4);
            HREyieldWhile(vt->ctx,&vt->msg_pending);
        }
        Debug("preparing message");
        int32_t tmp = -2 - index;
        if (item.len>MAX_CHUNK_SIZE) Abort("chunk length %d exceeds maximum (%d).",item.len,MAX_CHUNK_SIZE);
        memcpy(vt->msg->buffer,&tmp,4);
        memcpy(vt->msg->buffer+4,item.data,item.len);
        vt->msg->tail=item.len+4;
        vt->msg_pending=1;
        HREpostSend(vt->msg);
    }
}
開發者ID:graydon,項目名稱:ltsmin,代碼行數:19,代碼來源:hre_table.c

示例12: FMTLOAD

//---------------------------------------------------------------------------
void __fastcall TWinInteractiveCustomCommand::Prompt(
  const UnicodeString & Prompt, UnicodeString & Value)
{
  UnicodeString APrompt = Prompt;
  if (APrompt.IsEmpty())
  {
    APrompt = FMTLOAD(CUSTOM_COMMANDS_PARAM_PROMPT, (FCustomCommandName));
  }
  TStrings * History = CustomWinConfiguration->History[L"CustomCommandParam"];
  if (InputDialog(FMTLOAD(CUSTOM_COMMANDS_PARAM_TITLE, (FCustomCommandName)),
        APrompt, Value, HELP_CUSTOM_COMMAND_PARAM, History))
  {
    CustomWinConfiguration->History[L"CustomCommandParam"] = History;
  }
  else
  {
    Abort();
  }
}
開發者ID:mpmartin8080,項目名稱:winscp,代碼行數:20,代碼來源:WinInterface.cpp

示例13: rec_ndfs_call

void
rec_ndfs_call (wctx_t *ctx, ref_t state)
{
    cndfs_alg_local_t  *cloc = (cndfs_alg_local_t *) ctx->local;
    alg_global_t       *sm = ctx->global;
    strategy_t          rec_strat = get_strategy (ctx->run->shared->rec->alg);
    dfs_stack_push (sm->rec->local->stack, (int*)&state);
    cloc->counters.rec++;
    switch (rec_strat) {
    case Strat_ENDFS:
       endfs_blue (sm->rec->run, sm->rec); break;
    case Strat_LNDFS:
       lndfs_blue (sm->rec->run, sm->rec); break;
    case Strat_NDFS:
       ndfs_blue (sm->rec->run, sm->rec); break;
    default:
       Abort ("Invalid recursive strategy.");
    }
}
開發者ID:Meijuh,項目名稱:ltsmin,代碼行數:19,代碼來源:cndfs.c

示例14: gcf_extract

static void gcf_extract(){
    char *gcf_name=HREnextArg();
    if (gcf_name==NULL) {
        Abort("missing <gcf archive> argument");
    }
    archive_t arch=arch_gcf_read(raf_unistd(gcf_name));
    archive_t dir;
    if (outputdir) {
        dir=arch_dir_create(outputdir,blocksize,force?DELETE_ALL:DELETE_NONE);
    } else {
        dir=arch_dir_open(".",blocksize);
    }
    char*pattern=HREnextArg();
    do {
        archive_copy(arch,dir,NULL,blocksize,pattern);
    } while((pattern=HREnextArg()));
    arch_close(&dir);
    arch_close(&arch);
}
開發者ID:Meijuh,項目名稱:ltsmin,代碼行數:19,代碼來源:gcf-tool.c

示例15: balloc

/* external function definitions */
void *
balloc(int size)
{
  static char fnc[] = "balloc";
  void *p;

  if (size <= 0) {
    return (void *) (0);
  }
  if ((p = (void *) malloc((unsigned) size)) == (void *) (0)) {
    if (errno == ENOMEM) {
      /* GASP!!!! */
      gasp(size);
      _exit(1);
    }
    Abort("%t %s(): abort: malloc(%u): %m\n", fnc, (unsigned) size);
  }
  return p;
}
開發者ID:PlanetAPL,項目名稱:a-plus,代碼行數:20,代碼來源:balloc.c


注:本文中的Abort函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。