#include "common.h"
#include "Vector.h"
Go to the source code of this file.
Classes | |
class | ParseOptions |
class | ParseOptions::DataElement |
Defines | |
#define | PARSE_FLOAT (BigReal *) NULL |
#define | PARSE_BIGREAL (BigReal *) NULL |
#define | PARSE_VECTOR (Vector *) NULL |
#define | PARSE_INT (int *) NULL |
#define | PARSE_BOOL (int *) NULL |
#define | PARSE_STRING (char *) NULL |
#define | PARSE_ANYTHING (StringList **) NULL |
#define | PARSE_MULTIPLES (StringList **) NULL, TRUE |
Enumerations | |
enum | Range { FREE_RANGE, POSITIVE, NOT_NEGATIVE, NEGATIVE, NOT_POSITIVE } |
enum | Units { N_UNIT, N_FSEC, N_NSEC, N_SEC, N_MIN, N_HOUR, N_ANGSTROM, N_NANOMETER, N_METER, N_KCAL, N_KJOULE, N_EV, N_KELVIN, N_UNITS_UNDEFINED } |
Functions | |
BigReal | convert (Units to, Units from) |
#define PARSE_ANYTHING (StringList **) NULL |
Definition at line 39 of file ParseOptions.h.
#define PARSE_BIGREAL (BigReal *) NULL |
Definition at line 34 of file ParseOptions.h.
#define PARSE_BOOL (int *) NULL |
Definition at line 37 of file ParseOptions.h.
#define PARSE_FLOAT (BigReal *) NULL |
Definition at line 33 of file ParseOptions.h.
#define PARSE_INT (int *) NULL |
Definition at line 36 of file ParseOptions.h.
#define PARSE_MULTIPLES (StringList **) NULL, TRUE |
Definition at line 40 of file ParseOptions.h.
#define PARSE_STRING (char *) NULL |
Definition at line 38 of file ParseOptions.h.
#define PARSE_VECTOR (Vector *) NULL |
Definition at line 35 of file ParseOptions.h.
enum Range |
Definition at line 26 of file ParseOptions.h.
00026 { FREE_RANGE, POSITIVE, NOT_NEGATIVE , NEGATIVE, NOT_POSITIVE };
enum Units |
N_UNIT | |
N_FSEC | |
N_NSEC | |
N_SEC | |
N_MIN | |
N_HOUR | |
N_ANGSTROM | |
N_NANOMETER | |
N_METER | |
N_KCAL | |
N_KJOULE | |
N_EV | |
N_KELVIN | |
N_UNITS_UNDEFINED |
Definition at line 28 of file ParseOptions.h.
00028 { N_UNIT, N_FSEC, N_NSEC, N_SEC, N_MIN, N_HOUR, N_ANGSTROM, N_NANOMETER, N_METER, 00029 N_KCAL, N_KJOULE, N_EV, N_KELVIN, N_UNITS_UNDEFINED};
Definition at line 89 of file ParseOptions.C.
References N_ANGSTROM, N_EV, N_FSEC, N_HOUR, N_KCAL, N_KELVIN, N_KJOULE, N_METER, N_MIN, N_NANOMETER, N_NSEC, N_SEC, and N_UNIT.
00090 { 00091 // cout << "Converting from " << string(from) << " to " << string(to) << std::endl; 00092 // cout << scaling_factors[from] << " <--> " << scaling_factors[to] << std::endl; 00093 if (from == N_UNIT && to == N_UNIT) { return 1.0; } 00094 if ((from == N_NSEC || from == N_FSEC || from == N_SEC || from == N_MIN || 00095 from == N_HOUR) && 00096 (to == N_NSEC || to == N_FSEC || to == N_SEC || to == N_MIN || 00097 to == N_HOUR)) { 00098 return scaling_factors[from]/scaling_factors[to]; 00099 } 00100 if ((from == N_METER || from == N_NANOMETER || from == N_ANGSTROM) && 00101 (to == N_METER || to == N_NANOMETER || to == N_ANGSTROM)) { 00102 return scaling_factors[from]/scaling_factors[to]; 00103 } 00104 if ((from == N_KCAL || from == N_KJOULE || from == N_EV) && 00105 (to == N_KCAL || to == N_KJOULE || to == N_EV)) { 00106 return scaling_factors[from]/scaling_factors[to]; 00107 } 00108 if (from == N_KELVIN && to == N_KELVIN) { 00109 return scaling_factors[from]/scaling_factors[to]; 00110 } 00111 return 0.0; 00112 }