Last change
on this file since 424 was
424,
checked in by touze, 11 years ago
|
sauvgarde de la configuration sur fichier format AML
|
File size:
1.3 KB
|
Line | |
---|
1 | #ifndef GLOBALPARAMETERS_SEEN |
---|
2 | #define GLOBALPARAMETERS_SEEN |
---|
3 | |
---|
4 | #include <iostream> |
---|
5 | #include <string> |
---|
6 | #include <fstream> |
---|
7 | |
---|
8 | #include "UAP/UAPNode.hpp" |
---|
9 | |
---|
10 | using namespace std; |
---|
11 | |
---|
12 | class globalParameters |
---|
13 | { |
---|
14 | double frequencyDef_; |
---|
15 | double integrationStepDef_; |
---|
16 | int nstepsMaxDef_; |
---|
17 | int nscDef_; |
---|
18 | |
---|
19 | double frequency_; |
---|
20 | double integrationStep_; |
---|
21 | int nstepsMax_; |
---|
22 | int nsc_; |
---|
23 | |
---|
24 | int nbParam_; |
---|
25 | string* parametersString_; |
---|
26 | |
---|
27 | void setDefaultValues() |
---|
28 | { |
---|
29 | frequencyDef_ = 2998.652; |
---|
30 | integrationStepDef_ = 1.0; |
---|
31 | nstepsMaxDef_ = 100000; |
---|
32 | nscDef_ = 10; |
---|
33 | } |
---|
34 | |
---|
35 | void setDefaults() |
---|
36 | { |
---|
37 | frequency_ = frequencyDef_; |
---|
38 | integrationStep_ = integrationStepDef_; |
---|
39 | nstepsMax_ = nstepsMaxDef_; |
---|
40 | nsc_ = nscDef_; |
---|
41 | } |
---|
42 | |
---|
43 | public: |
---|
44 | |
---|
45 | globalParameters(); |
---|
46 | ~globalParameters() |
---|
47 | { |
---|
48 | if ( parametersString_ != NULL) delete [] parametersString_; |
---|
49 | } |
---|
50 | |
---|
51 | inline void raz() { setDefaults();} |
---|
52 | inline double getFrequency() const {return frequency_;} |
---|
53 | inline double getIntegrationStep() const {return integrationStep_;} |
---|
54 | inline int getNbSteps() const {return nstepsMax_;} |
---|
55 | inline int getScPeriod() const {return nsc_;} |
---|
56 | string* getParametersString() const; |
---|
57 | void setParametersString(string* param); |
---|
58 | string FileOutputFlow() const; |
---|
59 | void FileInput(ifstream& ifs); |
---|
60 | |
---|
61 | void InputRep(UAPNode* root); |
---|
62 | }; |
---|
63 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.