-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVariable.h
36 lines (28 loc) · 937 Bytes
/
Variable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef VARIABLE_H
#define VARIABLE_H
#include <map>
#include <set>
#include <vector>
#include "TString.h"
#include "Config.h"
class Variable {
public:
static void checkIfIsInit();
static void init(const Config &cfg, const TString &key);
static bool validType(const TString &type);
static bool exists(const TString &name);
static unsigned int nVars() { return names_.size(); }
static std::vector<TString>::const_iterator begin() { return names_.begin(); }
static std::vector<TString>::const_iterator end() { return names_.end(); }
static TString type(const TString& name);
static TString label(const TString &name);
static TString unit(const TString &name);
private:
static bool isInit_;
static std::set<TString> validTypes_;
static std::vector<TString> names_;
static std::map<TString,TString> types_;
static std::map<TString,TString> labels_;
static std::map<TString,TString> units_;
};
#endif