Line | |
---|
1 | #ifndef GLOBALPARAMETERS_SEEN |
---|
2 | #define GLOBALPARAMETERS_SEEN |
---|
3 | |
---|
4 | #include <iostream> |
---|
5 | #include <string> |
---|
6 | #include <fstream> |
---|
7 | |
---|
8 | using namespace std; |
---|
9 | |
---|
10 | class globalParameters |
---|
11 | { |
---|
12 | double frequencyDef_; |
---|
13 | double integrationStepDef_; |
---|
14 | int nstepsMaxDef_; |
---|
15 | int nscDef_; |
---|
16 | |
---|
17 | double frequency_; |
---|
18 | double integrationStep_; |
---|
19 | int nstepsMax_; |
---|
20 | int nsc_; |
---|
21 | |
---|
22 | int nbParam_; |
---|
23 | string* parametersString_; |
---|
24 | |
---|
25 | void setDefaultValues() |
---|
26 | { |
---|
27 | frequencyDef_ = 2998.652; |
---|
28 | integrationStepDef_ = 1.0; |
---|
29 | nstepsMaxDef_ = 100000; |
---|
30 | nscDef_ = 10; |
---|
31 | } |
---|
32 | |
---|
33 | void setDefaults() |
---|
34 | { |
---|
35 | frequency_ = frequencyDef_; |
---|
36 | integrationStep_ = integrationStepDef_; |
---|
37 | nstepsMax_ = nstepsMaxDef_; |
---|
38 | nsc_ = nscDef_; |
---|
39 | } |
---|
40 | |
---|
41 | public: |
---|
42 | |
---|
43 | globalParameters(); |
---|
44 | ~globalParameters() |
---|
45 | { |
---|
46 | if ( parametersString_ != NULL) delete [] parametersString_; |
---|
47 | } |
---|
48 | |
---|
49 | inline void raz() { setDefaults();} |
---|
50 | inline double getFrequency() const {return frequency_;} |
---|
51 | inline double getIntegrationStep() const {return integrationStep_;} |
---|
52 | inline int getNbSteps() const {return nstepsMax_;} |
---|
53 | inline int getScPeriod() const {return nsc_;} |
---|
54 | string* getParametersString() const; |
---|
55 | void setParametersString(string* param); |
---|
56 | string FileOutputFlow() const; |
---|
57 | void FileInput(ifstream& ifs); |
---|
58 | }; |
---|
59 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.