7 #ifndef Tomato_OXFACTORYOFStartPointCalculators_HXX 8 #define Tomato_OXFACTORYOFStartPointCalculators_HXX 15 template <
typename TYPE >
16 StartPointCalculator<TYPE>*
17 FactoryOfStartPointCalculators<TYPE>
18 ::newByFactory(TomatoOptions<TYPE> *opts){
19 switch (opts->start_point_calc_method){
21 return new StartPointCalculatorBasic<TYPE>();
23 case StartPointSHMOLLI: {
24 return new StartPointCalculatorShmolli<TYPE>();
26 case NoStartPointCalculators: {
30 throw std::runtime_error(
"start_point_calc_method object not available");
34 template <
typename TYPE >
36 FactoryOfStartPointCalculators<TYPE>
37 ::disp(
int start_point_calc_method){
39 if (start_point_calc_method >= 0) {
40 printf(
"%-28s%-22s",
" start_point_calc_method: ", startPointCalculatorsTypeNames[start_point_calc_method]);
43 printf(
"options: [ ");
45 for (
int i = 0; i < lastStartPointCalculatorType+1; i++){
47 if(startPointCalculatorsAvailability[i]){
48 printf(
"%s ", startPointCalculatorsTypeNames[i]);
57 #endif //Tomato_OXFACTORYOFStartPointCalculators_HXX
Definition: OxCalculator.h:19