MCPcopy Create free account
hub / github.com/Gecode/gecode / fillPrinter

Function fillPrinter

gecode/flatzinc/parser.tab.cpp:499–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499void fillPrinter(ParserState& pp, Gecode::FlatZinc::Printer& p) {
500 p.init(pp.getOutput());
501 for (unsigned int i=0; i<pp.intvars.size(); i++) {
502 if (!pp.hadError) {
503 p.addIntVarName(pp.intvars[i].first);
504 }
505 }
506 for (unsigned int i=0; i<pp.boolvars.size(); i++) {
507 if (!pp.hadError) {
508 p.addBoolVarName(pp.boolvars[i].first);
509 }
510 }
511#ifdef GECODE_HAS_FLOAT_VARS
512 for (unsigned int i=0; i<pp.floatvars.size(); i++) {
513 if (!pp.hadError) {
514 p.addFloatVarName(pp.floatvars[i].first);
515 }
516 }
517#endif
518#ifdef GECODE_HAS_SET_VARS
519 for (unsigned int i=0; i<pp.setvars.size(); i++) {
520 if (!pp.hadError) {
521 p.addSetVarName(pp.setvars[i].first);
522 }
523 }
524#endif
525}
526
527AST::Node* arrayOutput(AST::Call* ann) {
528 AST::Array* a = NULL;

Callers 1

parseFunction · 0.85

Calls 7

getOutputMethod · 0.80
addIntVarNameMethod · 0.80
addBoolVarNameMethod · 0.80
addFloatVarNameMethod · 0.80
addSetVarNameMethod · 0.80
initMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected