예제 #1
0
InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs,
                           const Inst *Linked)
    : Inst(Func, Inst::FakeKill, KilledRegs.size(), NULL), Linked(Linked) {
  for (VarList::const_iterator I = KilledRegs.begin(), E = KilledRegs.end();
       I != E; ++I) {
    Variable *Var = *I;
    addSource(Var);
  }
}
Variable FunctionCheckInit::call( Variable &input, VarList lParams ) {
	VarList::const_iterator i = lParams.begin();
	
	// Fetch values
	Bu::String what = (*i).getString();
	
	// Lets check stuff!
	pContext->getView()->checkBegin(what);
	
	return new Variable(Variable::typeNone);
}
예제 #3
0
파일: main.cpp 프로젝트: zkbreeze/OceanVis
    const Var* var( const std::string name ) const
    {
        VarList::const_iterator var = m_vars.begin();
        VarList::const_iterator last = m_vars.end();
        while ( var != last )
        {
            if ( (*var)->name() == name ) break;

            var++;
        }

        return( *var );
    }
예제 #4
0
파일: main.cpp 프로젝트: zkbreeze/OceanVis
    const Var* var( const size_t index ) const
    {
        VarList::const_iterator var = m_vars.begin();
        VarList::const_iterator last = m_vars.end();
        size_t counter = 0;
        while ( var != last )
        {
            if ( counter++ == index ) break;
            var++;
        }

        return( *var );
    }
예제 #5
0
파일: main.cpp 프로젝트: zkbreeze/OceanVis
    ~File( void )
    {
        if ( m_file ) delete m_file;

        DimList::iterator dim = m_dims.begin();
        DimList::const_iterator last_dim = m_dims.end();
        while ( dim != last_dim )
        {
            if ( *dim ) delete *dim;
            dim++;
        }
        m_dims.clear();

        VarList::iterator var = m_vars.begin();
        VarList::const_iterator last_var = m_vars.end();
        while ( var != last_var )
        {
            if ( *var ) delete *var;
            var++;
        }
        m_vars.clear();
    }
예제 #6
0
/**
 * Convenience function for conditioning one iterator on the current
 * value of another. This equalivalent to the following code
 * <pre>
 * DomainIterator it1(...), it2(...);
 * DomainIterator::VarList vars = it1.getVars();
 * DomainIterator::IndList inds = it1.getSubInd();
 * it2.condition(vars.begin(),vars.end(),inds.begin(), inds.end());
 * </pre>
 * @see DomainIterator::condition(const VarIt,const VarIt,const IndIt,const IndIt)
 */
void DomainIterator::condition(const DomainIterator& it)
{
   VarList vars = it.getVars();
   IndList inds = it.getSubInd();
   condition(vars.begin(),vars.end(),inds.begin(), inds.end());
}