Marker.cc 610 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "Marker.h"

namespace AMDiS {

  Marker *Marker::createMarker(::std::string name, int row) {
    int strategy = 0;
    GET_PARAMETER(0, name + "->strategy", "%d", &strategy);
  
    Marker *marker = NULL;

    switch(strategy) {
    case 0: 
      break;
    case 1:
      marker = NEW GRMarker(name, row);
      break;
    case 2:
      marker = NEW MSMarker(name, row);
      break;
    case 3:
      marker = NEW ESMarker(name, row);
      break;
    case 4:
      marker = NEW GERSMarker(name, row);
      break;
    default: ERROR_EXIT("invalid strategy\n");
    }
    
    return marker;
  }

}