| 29 | } |
| 30 | |
| 31 | Node* ProjectionModule::evaluate(const Context& ctx) const |
| 32 | { |
| 33 | BooleanValue* cut=dynamic_cast<BooleanValue*>(ctx.getArgumentDeprecatedModule(0,"cut","'slice' module",reporter)); |
| 34 | if(cut&&cut->isTrue()) { |
| 35 | auto* n=new SliceNode(); |
| 36 | n->setChildren(ctx.getInputNodes()); |
| 37 | return n; |
| 38 | } |
| 39 | |
| 40 | bool base=false; |
| 41 | auto* baseVal=dynamic_cast<BooleanValue*>(getParameterArgument(ctx,0)); |
| 42 | if(baseVal) |
| 43 | base=baseVal->isTrue(); |
| 44 | |
| 45 | |
| 46 | auto* d = new ProjectionNode(); |
| 47 | d->setChildren(ctx.getInputNodes()); |
| 48 | d->setBase(base); |
| 49 | return d; |
| 50 | } |
nothing calls this directly
no test coverage detected