#include <TarisApplication.h>
Public Member Functions | |
uint | getDebugLevel () const |
void | setDebugLevel (uint debugLevel) |
double | getDoubleThresholdComparison () const |
void | setDoubleThresholdComparison (double doubleThresholdComparison) |
Static Public Member Functions | |
static TarisApplication * | Instance () |
static char * | extractParameter (int argc, char **argv, char *param, char *def="") |
Protected Member Functions | |
TarisApplication () | |
~TarisApplication () | |
Private Attributes | |
uint | debugLevel |
double | doubleThresholdComparison |
Static Private Attributes | |
static TarisApplication * | instance = NULL |
Fecha de creación : 2007-03-18
Definition at line 37 of file TarisApplication.h.
TarisApplication::TarisApplication | ( | ) | [protected] |
Definition at line 22 of file TarisApplication.cpp.
References debugLevel, and doubleThresholdComparison.
Referenced by Instance().
00023 { 00024 debugLevel = 0 ; 00025 doubleThresholdComparison = 1e-6 ; 00026 }
TarisApplication::~TarisApplication | ( | ) | [protected] |
TarisApplication * TarisApplication::Instance | ( | ) | [static] |
Definition at line 33 of file TarisApplication.cpp.
References instance, and TarisApplication().
Referenced by Tree::areSubtreesEqual(), Surface::computeComponents(), HyperSurface::getIsosurface(), HyperSurface::load(), Surface::printOogl(), and Tree::swapSubtrees().
00034 { 00035 if( instance == NULL ) 00036 instance = new TarisApplication() ; 00037 return instance ; 00038 }
uint TarisApplication::getDebugLevel | ( | ) | const |
Definition at line 40 of file TarisApplication.cpp.
References debugLevel.
Referenced by Tree::areSubtreesEqual(), Surface::computeComponents(), and HyperSurface::load().
00041 { 00042 return debugLevel ; 00043 }
void TarisApplication::setDebugLevel | ( | uint | debugLevel | ) |
Definition at line 45 of file TarisApplication.cpp.
00046 { 00047 this->debugLevel = debugLevel ; 00048 }
double TarisApplication::getDoubleThresholdComparison | ( | ) | const |
Definition at line 50 of file TarisApplication.cpp.
References doubleThresholdComparison.
Referenced by Tree::areSubtreesEqual().
00051 { 00052 return doubleThresholdComparison ; 00053 }
void TarisApplication::setDoubleThresholdComparison | ( | double | doubleThresholdComparison | ) |
Definition at line 55 of file TarisApplication.cpp.
00056 { 00057 this->doubleThresholdComparison = doubleThresholdComparison ; 00058 }
char * TarisApplication::extractParameter | ( | int | argc, | |
char ** | argv, | |||
char * | param, | |||
char * | def = "" | |||
) | [static] |
Retorna el valor del parametro param, si se da un valor para def el parametro es tomado como opcional
argc | valor obtenido de la función main | |
argv | valor obtenido de la función main | |
param | El parametro buscado | |
required | true si el parametro es requerido | |
def | valor por omisión del parámetro |
Definition at line 69 of file TarisApplication.cpp.
Referenced by Programs::TARIS_Matrices::main(), Programs::TARIS_BuildTree::main(), and Programs::TARIS_BuildIsosurface::main().
00070 { 00071 int numberOfParameters = argc - 1 ; 00072 bool in = false ; 00073 00074 for( int i=0; i < numberOfParameters; i++ ){ 00075 if ( strcmp( argv[i+1], param ) == 0 ){ 00076 if ( argv[i+2] != 0 ){ 00077 in = true ; 00078 return argv[i+2] ; 00079 }else{ 00080 cerr << "Can't find asked option " << param << endl ; 00081 exit(-1) ; 00082 } 00083 } 00084 } 00085 00086 if( strlen( def ) != 0 ){ 00087 if( in == false ) // Retorna el valor por omisión 00088 return def ; 00089 }else{ 00090 cerr << "Parameter " << param << " is required" << endl ; 00091 exit(-1) ; 00092 } 00093 }
TarisApplication * TarisApplication::instance = NULL [static, private] |
uint TarisApplication::debugLevel [private] |
Definition at line 55 of file TarisApplication.h.
Referenced by getDebugLevel(), and TarisApplication().
double TarisApplication::doubleThresholdComparison [private] |
Definition at line 56 of file TarisApplication.h.
Referenced by getDoubleThresholdComparison(), and TarisApplication().