7 #ifndef Tomato_OXFACTORYOFFUNCTIONS_HXX     8 #define Tomato_OXFACTORYOFFUNCTIONS_HXX    13 #ifdef USE_PRIVATE_NR2    14 #include "OxModelT2ThreeParam.h"    15 #include "OxModelT2TwoParam.h"    16 #include "OxModelT2TwoParamScale.h"    17 #include "OxModelT2OneParam.h"    21     template < 
typename TYPE >
    24     ::newByFactory(TomatoOptions<TYPE> *opts){
    25         switch (opts->model_type){
    26             case _ModelT1ThreeParam: {
    27                 return new ModelT1ThreeParam<TYPE>();
    29             case _ModelT1TwoParam: {
    30                 return new ModelT1TwoParam<TYPE>();
    32             case _ModelT1Shmolli: {
    33                 return new ModelT1Shmolli<TYPE>();
    35 #ifdef USE_PRIVATE_NR2    36             case _ModelT2ThreeParam: {
    37                 return new ModelT2ThreeParam<TYPE>();
    39             case _ModelT2TwoParam: {
    40                 return new ModelT2TwoParam<TYPE>();
    42             case _ModelT2TwoParamScale: {
    43                 return new ModelT2TwoParamScale<TYPE>();
    45             case _ModelT2OneParam: {
    46                 return new ModelT2OneParam<TYPE>();
    50                 throw std::runtime_error(
"model_type not available");
    54     template < 
typename TYPE >
    57     ::disp(
int model_type){
    59         if (model_type >= 0) {
    60             printf(
"%-28s%-22s", 
" model_type: ", modelTypeNames[model_type]);
    63         printf(
"options: [ ");
    65         for (
int i = 0; i < lastFunctorType+1; i++){
    67             if(modelAvailability[i]){
    68                 printf(
"%s ", modelTypeNames[i]);
    77 #endif //Tomato_OXFACTORYOFFUNCTIONS_HXX 
Definition: OxCalculator.h:19