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


C++ Mark函数代码示例

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


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

示例1: LockMem

void scContUnit::Iter( SubstituteFunc	func,
					   long				startLocation,
					   long&			limitOffset )
{
	UCS2			chBuf[64];
	UCS2*			chP;
	CharRecordP		startChRec;
	scSpecRecord*	specRec;
	long			startOffset,
					endOffset,
					wordLen;
	
	LockMem( startChRec, specRec );
	
	startOffset = startLocation;
	endOffset 	= startOffset;
	
	for ( ; endOffset < limitOffset; ) {
		startOffset = TXTStartSelectableWord( startChRec, endOffset );
		endOffset 	= TXTEndSelectableWord( startChRec, endOffset );
		wordLen = endOffset - startOffset;
		
		if ( wordLen > 1 ) {
			BuildTestWord( chBuf, startChRec + startOffset, wordLen );
			status stat = (*func)( &chP, chBuf, NULL );
			
			if ( stat == scSuccess || stat == scUserAbort ) {
				if ( !ReplaceWord( startChRec, specRec, startOffset, endOffset,
								   limitOffset, chBuf, chP ) ) {
						UnlockMem( );
						return;
				}
				
				fCharArray.RepairText( fSpecRun, startOffset, endOffset );
				Mark( scREBREAK );
				
				if ( stat == scUserAbort )
					goto exit;
			}
		}
		endOffset = FindNextSpellingWord( startChRec, endOffset, limitOffset );
	}

exit:
	UnlockMem( );
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:46,代码来源:Scparag2.cpp

示例2: Mark

void GarbageCollector::PerformGC(RunTimeStack &s)
	{
	// Perform mark-and-sweep garbage collection.  We
	// follow every pointer in every activation record
	// in the RunTimeStack, marking all Objects found.
	// Before marking an Object, we make sure it is not
	// already marked, so we don't enter an infinite loop.

	// Then we sweep once through the ObjectList.  For
	// each Object in the ObjectList, if it is not marked,
	// we remove it from the list and delete it; otherwise,
	// we unmark it so it is ready for the next round of
	// mark-and-sweep.

	Mark(s);
	Sweep(s);
	}
开发者ID:bmajoros,项目名称:Epsilon,代码行数:17,代码来源:garbage.C

示例3: BMenu

ColorMenu::ColorMenu (const char *name, BView *_view, int h, int v, float s)
: BMenu (name, h*s, v*s)
{
	index = 0;
	for (int i = 0; i < v; i++)
		for (int j = 0; j < h; j++)
		{
			BRect cframe = BRect (j*s, i*s, (j + 1)*s, (i + 1)*s);
			AddItem (new ColorItem (system_colors()->color_list[index]), cframe);
		}
	Mark (0);
	view = _view;
	hs = h*s;
	vs = v*s;
	parent = NULL;
	fWindow = NULL;
}
开发者ID:gedrin,项目名称:Becasso,代码行数:17,代码来源:ColorMenu.cpp

示例4: PREFIX_ASSUME

//*****************************************************************************
// cascading Mark of a CustomAttribute
//*****************************************************************************
HRESULT FilterManager::MarkCustomAttribute(mdCustomAttribute cv)
{
    HRESULT     hr = NOERROR;
    CustomAttributeRec *pRec;

    // We know that the filter table is not null here.  Tell PREFIX that we know it.
    PREFIX_ASSUME(m_pMiniMd->GetFilterTable() != NULL);

    IfFailGo( m_pMiniMd->GetFilterTable()->MarkCustomAttribute( cv ) );

    // Mark the type (and any family) of the CustomAttribue.
    IfFailGo(m_pMiniMd->GetCustomAttributeRecord(RidFromToken(cv), &pRec));
    IfFailGo( Mark(m_pMiniMd->getTypeOfCustomAttribute(pRec)) );

ErrExit:
    return hr;
} // HRESULT FilterManager::MarkCustomAttribute()
开发者ID:Afshintm,项目名称:coreclr,代码行数:20,代码来源:filtermanager.cpp

示例5: assignAttVar

void
assignAttVar(Word av, Word value, int flags ARG_LD)
{ Word a;
  mark m;

  assert(isAttVar(*av));
  assert(!isRef(*value));
  assert(gTop+8 <= gMax && tTop+6 <= tMax);
  DEBUG(CHK_SECURE, assert(on_attvar_chain(av)));

  DEBUG(1, Sdprintf("assignAttVar(%s)\n", vName(av)));

  if ( isAttVar(*value) )
  { if ( value > av )
    { Word tmp = av;
      av = value;
      value = tmp;
    } else if ( av == value )
      return;
  }

  if( !(flags & ATT_ASSIGNONLY) )
  { a = valPAttVar(*av);
    registerWakeup(av, a, value PASS_LD);
  }

  if ( (flags&ATT_WAKEBINDS) )
    return;

  Mark(m);		/* must be trailed, even if above last choice */
  LD->mark_bar = NO_MARK_BAR;
  TrailAssignment(av);
  DiscardMark(m);

  if ( isAttVar(*value) )
  { DEBUG(1, Sdprintf("Unifying two attvars\n"));
    *av = makeRef(value);
  } else if ( isVar(*value) )
  { DEBUG(1, Sdprintf("Assigning attvar with plain var\n"));
    *av = makeRef(value);			/* JW: Does this happen? */
  } else
    *av = *value;

  return;
}
开发者ID:DouglasRMiles,项目名称:swipl-devel,代码行数:45,代码来源:pl-attvar.c

示例6: tlacitkem

int CGUIListItem::MouseLeft(float x, float y, UINT mouseState, UINT keyState)
{		// kliknuti levym tlacitkem (mouseState 0 = pusteni, 1 = stisknuti cudlitka)

	if(mouseState)
	{
		if(listBox->markListItem==this)
		{
			OnClick();
			EventArise(EClicked);
		}
		else
		{
			Mark();
		}
	}

	return 0;
}
开发者ID:HonzaMD,项目名称:Krkal2,代码行数:18,代码来源:list.cpp

示例7: MarkAll

void Registry::GarbageCollect()
{
	// unmark all objects
	MarkAll(false);

	// mark everything that is reachable from the root
	Mark(root, true);

	// everything that is not now marked is not reachable and can be deleted
	deathrow.clear();
	foreach (Instances::value_type const &val, instances)
	{
		StorageBase const *base = val.second;
		if (!base->IsMarked())
		{
			//OM_TRACE_1(4, base->GetHandle().value) << " adding to deathrow";
			deathrow.push_back(base->GetHandle());
		}
	}
开发者ID:koden-km,项目名称:ObjectModel,代码行数:19,代码来源:Registry.cpp

示例8: UpdateProductItem

void CProductCheckListBoxItem::UpdateProductItem(void)
{
	if (Mark())
	{
		m_pItem->SetFlag(PRODUCT_ITEM_Marked);
	}
	else
	{
		m_pItem->ClearFlag(PRODUCT_ITEM_Marked);
	}
	
	if (Select())
	{
		m_pItem->SetFlag(PRODUCT_ITEM_Selected);
	}
	else
	{
		m_pItem->ClearFlag(PRODUCT_ITEM_Selected);
	}
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:20,代码来源:CHECKLB.CPP

示例9: QueryExtents

/* ==================================================================== */
void scTextline::MarkForDeletion( void )
{
	scXRect xrect = QueryExtents( xrect, 1 );
	
	if ( fPara && fPara->GetFirstline() == this )
		fPara->SetFirstline( 0 );

		// de-normalize extents
	if ( fColumn->GetFlowdir().IsVertical() )
		xrect.Translate( fVJOffset, 0 );	
	else								
		xrect.Translate( 0, -fVJOffset );
	
	fInkExtents 	= xrect;
	fPara			= 0; 
	fLineCount		= -1;
	fStartOffset	= -1;
	fEndOffset		= -1;
	Mark( scINVALID );
}	
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:21,代码来源:Sctextli.cpp

示例10: find_levels_r

static void
find_levels_r(struct block *b)
{
	int level;

	if (isMarked(b))
		return;

	Mark(b);
	b->link = 0;

	if (JT(b)) {
		find_levels_r(JT(b));
		find_levels_r(JF(b));
		level = MAX(JT(b)->level, JF(b)->level) + 1;
	} else
		level = 0;
	b->level = level;
	b->link = levels[level];
	levels[level] = b;
}
开发者ID:enukane,项目名称:netbsd-src,代码行数:21,代码来源:optimize.c

示例11: IfFailGo

//*****************************************************************************
// cascading Mark of all GenericPar associated with a TypeDef or MethodDef token
//*****************************************************************************
HRESULT FilterManager::MarkGenericParamWithParentToken(
    mdToken     tk)
{
    HRESULT     hr = NOERROR;
    RID         ulStart, ulEnd;
    RID         index;
    GenericParamRec *pGenericParamRec;
    mdToken     constraint;
    HENUMInternal hEnum;                // To enumerate constraints.

    // Enumerate the GenericPar
    //@todo: Handle the unsorted case.
    IfFailGo( m_pMiniMd->GetGenericParamsForToken(tk, &ulStart, &ulEnd) );

    for (; ulStart < ulEnd; ++ulStart)
    {
        index = m_pMiniMd->GetGenericParamRid(ulStart);
        IfFailGo(m_pMiniMd->GetGenericParamRecord(index, &pGenericParamRec));

        RID ridConstraint;
        IfFailGo( m_pMiniMd->FindGenericParamConstraintHelper(TokenFromRid(ulStart, mdtGenericParam), &hEnum) );
        while (HENUMInternal::EnumNext(&hEnum, (mdToken *) &ridConstraint))
        {
            // Get the constraint.
            GenericParamConstraintRec *pRec;
            IfFailGo(m_pMiniMd->GetGenericParamConstraintRecord(RidFromToken(ridConstraint), &pRec));
            constraint = m_pMiniMd->getConstraintOfGenericParamConstraint(pRec);

            // Mark it.
            IfFailGo( Mark(constraint) );
        }
        HENUMInternal::ClearEnum(&hEnum);
    }

ErrExit:
    HENUMInternal::ClearEnum(&hEnum);

    return hr;
} // HRESULT FilterManager::MarkGenericParamWithParentToken()
开发者ID:Afshintm,项目名称:coreclr,代码行数:42,代码来源:filtermanager.cpp

示例12: AllocRubiArray

void scContUnit::ApplyAnnotation( long			start,
								  long			end,
								  const scAnnotation&	annot )
{
	eChTranType	chTranType	= eNormalTran;
	
	if ( !fRubiArray ) {
		AllocRubiArray();
	}
	else if ( fRubiArray->IsRubiData( start, end ) ) {
		int			nth;
		int			index;
		scRubiData	rd;	
		
		fCharArray.Transform( start, end, eRemoveJapTran, end - start );
		for ( nth = 1; fRubiArray->GetNthRubi( index, rd, nth, start, end );  )
			fRubiArray->RemoveDataAt( index );
	}
	
	if ( annot.fAnnotate ) {
		scRubiData rd( annot.fCharStr, start, end, SpecAtOffset( start + 1 ) );
	
		fRubiArray->AddRubiData( rd );
		
		chTranType = eRubiTran;
	}
	else {
			// i should have already removed any annotations
		if ( fRubiArray->GetNumItems() == 0 )
			DeleteRubiArray();
		chTranType = eRemoveJapTran;
	}
	Mark( scREBREAK );
	ForceRepaint( start, end );	
	fCharArray.Transform( start, end, chTranType, end - start );
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:36,代码来源:Scparag2.cpp

示例13: GetStencil

void StencilComp::Write (ostream& out) {
    GraphicComp::Write(out);
    UStencil* stencil = GetStencil();
    Bitmap* image, *mask;
    stencil->GetOriginal(image, mask);

    WriteBitmap(image, out);
    Mark(out);

    if (mask == nil) {
        out << no_mask;
    } else if (mask == image) {
        out << mask_equals_image;
    } else {
        out << valid_mask;
        WriteBitmap(mask, out);
    }

    WriteBgFilled(stencil->BgFilled(), out);
    WriteColor(stencil->GetFgColor(), out);
    WriteColor(stencil->GetBgColor(), out);
    WriteTransformer(stencil->GetTransformer(), out);
    WriteString(_filename, out);
}
开发者ID:neurodebian,项目名称:iv-hines,代码行数:24,代码来源:stencilcomp.cpp

示例14: make_pair

list<class Mark> Mark::RewriteWithSimpleTokens () {
  list<Mark> ret;
  // example : <{1,2},{a,b,c},{x}> -> <{2},{c},{x}> + <{2},{b},{x}> + <{2},{a},{x}> +  <{1},{c},{x}> + <{1},{b},{x}> + <{1},{a},{x}> 
  
  list<pair <int,int> > pos;
  for (list<vector<Element> >::iterator it = elts.begin() ; it != elts.end() ; it++) {
    pos.push_back( make_pair(0,it->size()) ); 
  }  
  
  list< pair<int,int> >::iterator pit;
  list<vector<Element> >::iterator cit;
  do {
    list<vector<Element> > forret;
    
    for (pit = pos.begin(),cit = elts.begin() ; pit != pos.end() ;pit++,cit++) {
      forret.push_back(vector<Element> (1,(*cit)[pit->first]));
    }
    ret.push_back ( Mark(dom,forret,mult));
  } while (! calcSub::next(pos) );

  
  return ret;

}
开发者ID:cosyverif,项目名称:deb-libsnow,代码行数:24,代码来源:Mark.cpp

示例15: Pos

cSkinDisplayReplay::cProgressBar::cProgressBar(int Width, int Height, int Current, int Total, const cMarks *Marks, tColor ColorSeen, tColor ColorRest, tColor ColorSelected, tColor ColorMark, tColor ColorCurrent)
:cBitmap(Width, Height, 2)
{
  total = Total;
  if (total > 0) {
     int p = Pos(Current);
     DrawRectangle(0, 0, p, Height - 1, ColorSeen);
     DrawRectangle(p + 1, 0, Width - 1, Height - 1, ColorRest);
     if (Marks) {
        bool Start = true;
        for (const cMark *m = Marks->First(); m; m = Marks->Next(m)) {
            int p1 = Pos(m->position);
            if (Start) {
               const cMark *m2 = Marks->Next(m);
               int p2 = Pos(m2 ? m2->position : total);
               int h = Height / 3;
               DrawRectangle(p1, h, p2, Height - h, ColorSelected);
               }
            Mark(p1, Start, m->position == Current, ColorMark, ColorCurrent);
            Start = !Start;
            }
        }
     }
}
开发者ID:Moorviper,项目名称:zen2vdr,代码行数:24,代码来源:skins.c


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