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


C++ AJFREE函數代碼示例

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


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

示例1: ajRegFree

void ajRegFree(AjPRegexp* pexp)
{
    AjPRegexp exp;

    if(!pexp)
	return;

    if(!*pexp)
	return;

    exp = *pexp;

    /*
       ajDebug("ajRegFree %x size regexp %d\n", exp,
       (ajint) sizeof(exp));
    */

    regFreeCount += 1;
    regFree += sizeof(*exp);

    if(exp->pcre)
	regFree += sizeof(exp->pcre);

    if(exp->extra)
	regFree += sizeof(exp->extra);

    regTotal --;

    AJFREE(exp->pcre);
    AJFREE(exp->extra);
    AJFREE(exp->ovector);
    AJFREE(*pexp);

    return;
}
開發者ID:ICO2S,項目名稱:emboss,代碼行數:35,代碼來源:ajreg.c

示例2: ajHistDel

void ajHistDel(AjPHist* phist)
{
    ajuint i;
    AjPHist hist;

    if(!phist) return;

    hist = *phist;

    if (!hist)
	return;

    for(i=0;i<hist->numofsets; i++)
    {
	if(hist->hists[i]->deletedata)
	{
	    ajStrDel(&hist->hists[i]->title);
	    ajStrDel(&hist->hists[i]->xaxis);
	    ajStrDel(&hist->hists[i]->yaxis);
	    AJFREE(hist->hists[i]->data);
	}
	AJFREE((hist->hists[i]));
    }

    AJFREE(hist->hists);

    ajStrDel(&hist->title);
    ajStrDel(&hist->xaxis);
    ajStrDel(&hist->yaxisleft);
    ajStrDel(&hist->yaxisright);

    AJFREE(*phist);
    return;
}
開發者ID:WenchaoLin,項目名稱:JAMg,代碼行數:34,代碼來源:ajhist.c

示例3: remap_DelTable

static void remap_DelTable(AjPTable * table)
{

    void **keyarray = NULL;		/* array for table */
    void **valarray = NULL;		/* array for table */
    ajint i;
    PValue value;

    if(ajTableGetLength(*table))
    {
      ajTableToarrayKeysValues(*table, &keyarray, &valarray);
      for(i = 0; keyarray[i]; i++)
      {
          value = (PValue) valarray[i];
          ajStrDel(&(value->iso));
          AJFREE(valarray[i]);	/* free the ajint* value */
	  ajStrDel((AjPStr*)&keyarray[i]);
      }
      AJFREE(keyarray);
      AJFREE(valarray);
    }
    ajTableFree(table);

    return;
}
開發者ID:dalehamel,項目名稱:birch-native-sources,代碼行數:25,代碼來源:remap.c

示例4: ajXmlDel

void ajXmlDel(AjPXml *Pxml)
{
    AjPXml xml;

    if(!Pxml) return;
    if(!(*Pxml)) return;

    xml = *Pxml;

    ajStrDel(&xml->Id);
    ajStrDel(&xml->Db);
    ajStrDel(&xml->Setdb);
    ajStrDel(&xml->Full);
    ajStrDel(&xml->Qry);
    ajStrDel(&xml->Formatstr);
    ajStrDel(&xml->Filename);

    ajStrDel(&xml->TextPtr);

    if(xml->Doc)
        ajDomDocumentDestroyNode(xml->Doc, &xml->Doc);

    AJFREE(*Pxml);
    *Pxml = NULL;

    return;
}
開發者ID:remills,項目名稱:CodonShuffle,代碼行數:27,代碼來源:ajxml.c

示例5: dbiblast_dbfree

static void dbiblast_dbfree( PBlastDb* pdb)
{
    PBlastDb db;

    if(!pdb)
	return;

    if(!*pdb)
	return;

    db = *pdb;

    dbiblast_memfclosefile(&db->TFile);
    dbiblast_memfclosefile(&db->HFile);
    dbiblast_memfclosefile(&db->SFile);
    dbiblast_memfclosefile(&db->FFile);

    ajStrDel(&db->Name);
    ajStrDel(&db->Date);
    ajStrDel(&db->Title);

    AJFREE(*pdb);

    return;
}
開發者ID:dalehamel,項目名稱:birch-native-sources,代碼行數:25,代碼來源:dbiblast.c

示例6: prima_PrimerDel

static void prima_PrimerDel(PPrimer *p)
{
    ajStrDel(&((*p)->substr));
    AJFREE(*p);

    return;
}
開發者ID:dalehamel,項目名稱:birch-native-sources,代碼行數:7,代碼來源:prima.c

示例7: ajRefseqDel

void ajRefseqDel(AjPRefseq *Prefseq)
{
    AjPRefseq refseq;
    AjPSeqRange tmprange;

    if(!Prefseq) return;
    if(!(*Prefseq)) return;

    refseq = *Prefseq;

    ajStrDel(&refseq->Id);
    ajStrDel(&refseq->Db);
    ajStrDel(&refseq->Setdb);
    ajStrDel(&refseq->Full);
    ajStrDel(&refseq->Qry);
    ajStrDel(&refseq->Formatstr);
    ajStrDel(&refseq->Filename);

    ajStrDel(&refseq->TextPtr);

    ajStrDel(&refseq->Desc);
    ajStrDel(&refseq->Seq);

    while(ajListPop(refseq->Seqlist,(void **)&tmprange))
	ajSeqrangeDel(&tmprange);

    ajListFree(&refseq->Seqlist);

    AJFREE(*Prefseq);
    *Prefseq = NULL;

    return;
}
開發者ID:ICO2S,項目名稱:emboss,代碼行數:33,代碼來源:ajrefseq.c

示例8: embPropMolwtDel

void embPropMolwtDel(EmbPPropMolwt **thys)
{
    EmbPPropMolwt *pthis = NULL;
    ajuint i;
    
    pthis = *thys;

    for(i=0; i < EMBPROPSIZE + 2; ++i)
	AJFREE(pthis[i]);

    AJFREE(pthis);

    *thys = NULL;

    return;
}
開發者ID:WenchaoLin,項目名稱:JAMg,代碼行數:16,代碼來源:embprop.c

示例9: embPropAminoDel

void embPropAminoDel(EmbPPropAmino **thys)
{
    EmbPPropAmino *pthis = NULL;
    ajuint i;
    
    pthis = *thys;

    for(i=0; i < EMBPROPSIZE; ++i)
	AJFREE(pthis[i]);

    AJFREE(pthis);

    *thys = NULL;

    return;
}
開發者ID:WenchaoLin,項目名稱:JAMg,代碼行數:16,代碼來源:embprop.c

示例10: ajRegCompC

AjPRegexp ajRegCompC(const char* rexp)
{
    AjPRegexp ret;
    int options = 0;
    int errpos  = 0;
    const char *errptr            = NULL;
    const unsigned char *tableptr = NULL;

    AJNEW0(ret);
    AJCNEW0(ret->ovector, AJREG_OVECSIZE);
    ret->ovecsize = AJREG_OVECSIZE/3;
    ret->pcre = pcre_compile(rexp, options, &errptr, &errpos, tableptr);

    if(!ret->pcre)
    {
	ajErr("Failed to compile regular expression '%s' at position %d: %s",
	      rexp, errpos, errptr);
	AJFREE(ret);
	return NULL;
    }

    regAlloc += sizeof(ret);
    regCount ++;
    regTotal ++;
    /*ajDebug("ajRegCompC %x size %d regexp '%s'\n",
      ret, (int) sizeof(ret), rexp);*/

    return ret;
}
開發者ID:ICO2S,項目名稱:emboss,代碼行數:29,代碼來源:ajreg.c

示例11: embIeppKDel

void embIeppKDel(double *pK)
{

    AJFREE(pK);

    return;
}
開發者ID:dalehamel,項目名稱:birch-native-sources,代碼行數:7,代碼來源:embiep.c

示例12: assemSAMGetReadgroupHeaderlines

static const AjPStr assemSAMGetReadgroupHeaderlines(const AjPAssem assem)
{
    AjPStr* rgids = NULL;
    const AjPAssemReadgroup rg = NULL;
    ajint i =0;

    ajTableToarrayKeys(assem->Readgroups, (void***)&rgids);

    ajStrAssignC(&assemoutSamLinetxt, "");

    while (rgids[i])  /* read groups */
    {
	rg = ajTableFetchS(assem->Readgroups, rgids[i++]);
	ajFmtPrintAppS(&assemoutSamLinetxt, "@RG\tID:%S", rg->ID);

	if(rg->CN)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tCN:%S", rg->CN);

	if(rg->Desc)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tDS:%S", rg->Desc);

	if(rg->Date)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tDT:%S", rg->Date);

	if(rg->FlowOrder)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tFO:%S", rg->FlowOrder);

	if(rg->KeySeq)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tKS:%S", rg->KeySeq);

	if(rg->Library)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tLB:%S", rg->Library);

	if(rg->Programs)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tPG:%S", rg->Programs);

	if(rg->Isize)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tPI:%d", rg->Isize);

	if(rg->Platform)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tPL:%s",
	                   ajAssemreadgroupGetPlatformname(rg));

	if(rg->Unit)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tPU:%S", rg->Unit);

	if(rg->Sample)
	    ajFmtPrintAppS(&assemoutSamLinetxt, "\tSM:%S", rg->Sample);

	ajStrAppendC(&assemoutSamLinetxt, "\n");

    }

    AJFREE(rgids);

    return assemoutSamLinetxt;
}
開發者ID:ICO2S,項目名稱:emboss,代碼行數:57,代碼來源:ajassemwrite.c

示例13: prima_prune_nearby

static void prima_prune_nearby(AjPList pairlist, ajint *npair, ajint range)
{
    PPair pair;

    ajint count;
    ajint fst;
    ajint fst2;
    ajint blim;
    ajint blim2;
    ajint elim;
    ajint elim2;
    ajint i;
    ajint j;
    ajint len;

    for(i=0;i<*npair;++i)
    {
	for(j=0;j<i;++j)	/* Ignore those already processed */
	{
	    ajListPop(pairlist,(void **)&pair);
	    ajListPushAppend(pairlist,(void *)pair);
	}

	ajListPop(pairlist,(void **)&pair);/* Get next high scoring pair */
	len  = pair->f->primerlen;
	fst  = pair->f->start + len -1;
	blim = fst-range;
	elim = fst+range;

	len   = pair->r->primerlen;
	blim2 = pair->r->start - range;
	elim2 = pair->r->start + range;

	ajListPushAppend(pairlist,(void *)pair);
	count = *npair;
	for(j=i+1;j<*npair;++j)
	{
	    ajListPop(pairlist,(void **)&pair);
	    fst2=pair->f->start+pair->f->primerlen-1;
	    if((fst2<blim || fst2>elim) && (pair->r->start<blim2 ||
					    pair->r->start>elim2))
		ajListPushAppend(pairlist,(void *)pair);
	    else
	    {
		prima_PrimerDel(&pair->f);
		prima_PrimerDel(&pair->r);
		AJFREE(pair);
		--count;
	    }
	}

	*npair = count;
    }

    return;
}
開發者ID:dalehamel,項目名稱:birch-native-sources,代碼行數:56,代碼來源:prima.c


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