MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / WithCast

Method WithCast

src/fflib/AFunction2.cpp:574–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572
573
574bool ArrayOfaType::WithCast( const ArrayOfaType & a,int nbcast) const
575 {
576 if ( ( !ellipse && (a.n != n)) || (ellipse && n > a.n) ) return false;
577 for (int i=0;i<n;i++)
578 if ( a.t[i]->SametypeRight(t[i])) ;
579 else if (! t[i]->CastingFrom(a.t[i])) return false;
580 else if ( --nbcast <0) return false;
581 return true;
582 }
583
584void basicForEachType::AddCast(CastFunc f1,CastFunc f2,CastFunc f3,CastFunc f4,
585 CastFunc f5,CastFunc f6,CastFunc f7,CastFunc f8)

Callers 2

FindMethod · 0.80
ShowMethod · 0.80

Calls 2

SametypeRightMethod · 0.80
CastingFromMethod · 0.45

Tested by

no test coverage detected