Example #1
0
void
Assignment::Prepare(void)
{
CollectReferences( );      //collect the referenced entities   


vector<Control*>::iterator it=GetSurroundingControls( )->begin();
Condition*   domain=new Condition(new Inequation(true));
while(it != GetSurroundingControls( )->end())
   {
   Control* st;
    
   if((*it)->IsLoop())
      AddCounter( (*it)->GetLoopCounter());

   Condition*   __st_domain=(*it)->GetDomainConstraints(GetRank());

   domain= new Condition(domain,FADA_AND,  __st_domain);
   ++it;
   }

Condition*   __no_not= domain->EliminateNotOperations();
Condition*   __dnform= __no_not->DNForm();
vector<Condition*>* new_domain=new vector<Condition*>();
*new_domain=__dnform->GetTerms();

SetDomain(new_domain);
}
Example #2
0
    int StatsTable::FindCounter(const std::string& name)
    {
        // Note: the API returns counters numbered from 1..N, although
        // internally, the array is 0..N-1.  This is so that we can return
        // zero as "not found".
        if(!impl_)
        {
            return 0;
        }

        // Create a scope for our auto-lock.
        {
            AutoLock scoped_lock(counters_lock_);

            // Attempt to find the counter.
            CountersMap::const_iterator iter;
            iter = counters_.find(name);
            if(iter != counters_.end())
            {
                return iter->second;
            }
        }

        // Counter does not exist, so add it.
        return AddCounter(name);
    }
Example #3
0
/**
 * プロセスの値を取得するカウンタを登録します。
 *
 * @param lpszCurrentInstanceName このプロセスのインスタンス名
 */
static void AddCounterForProcess( LPCTSTR lpszCurrentInstanceName )
{
	AddCounter( szCurrentInstanceName, _T("% User Time"), hCounterSysProcUser );
	AddCounter( szCurrentInstanceName, _T("% Privileged Time"), hCounterSysProcSys );
	AddCounter( szCurrentInstanceName, _T("Page Faults/sec"), hCounterSysMajFlt );
	AddCounter( szCurrentInstanceName, _T("Virtual Bytes"), hCounterSysVSize );
	AddCounter( szCurrentInstanceName, _T("Working Set"), hCounterSysRSS );
	AddCounter( szCurrentInstanceName, _T("Thread Count"), hCounterSysNumThreads );
	AddCounter( szCurrentInstanceName, _T("Handle Count"), hCounterProcNumFDs );
}
Example #4
0
//延时器函数 放慢动画的模仿速度
void GameObject::DelayerCount()
{
	AddCounter();
	if (Counter() >= Delayer()) {
		AddIndexColumn();
		if (IndexColumn() == Ima()->Column())
		{
			IndexColumn(0);
			AddIndexRow();
		}
		if (IndexRow() == Ima()->Row())
		{
			if (Loop()) {
				IndexRow(0);
				IndexColumn(0);
			}
			else Killed();
		}
		ClearCounter();
	}
}
Example #5
0
void Down_Task(void)
{
	switch(GetGrapCount())//层次
	{
		case 1:
			AddCounter();
			if(GetCounter() > 4)
				SetCounter(1);
			GetMainGrap(GetCounter());
			break;
		case 2:
			Level2_Down();
			break;
		case 3:
			Level3_Down();
			break;
		case 4:
			Level4_Down();
			break;
		default:break;
	}

}