-
Notifications
You must be signed in to change notification settings - Fork 0
/
ACconfig.h
63 lines (46 loc) · 1.46 KB
/
ACconfig.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
-------------------------------------------------------------------------
OBJECT NAME: ACconfig.h
DESCRIPTION: Header file for ACconfig's files.
COPYRIGHT: University Corporation for Atmospheric Research, 1998-2004
-------------------------------------------------------------------------
*/
#ifndef ACCONFIG_H
#define ACCONFIG_H
#include <string>
#include <map>
#include <vector>
#define COMMENT '#'
/* -------------------------------------------------------------------- */
namespace libraf {
/**
* Read and parse an aircraft configuration file 'ACconfig'. Generally
* this file can be found in $PROJ_DIR/defaults/
*/
class ACconfig
{
public:
ACconfig(const std::string& fName);
static const std::string NO_KEY, NO_TAILNUM, NO_SERVER;
/**
* @returns a list/vector of tail number strings.
*/
std::vector<std::string> GetTailNumberList() const
{ return(_tailNumList); }
/**
* Locate a specific key for a specific aircraft/tail number.
* @returns the value associated with the key or NO_KEY or NO_TAILNUMBER
*/
std::string GetParameter(const std::string& tailNumber, const std::string& target) const;
/**
* Given a computer hostname, locate the tail number associated with
* it.
* @returns string tail number or NO_SERVER if not located.
*/
std::string LocateMyTailNumber(const std::string& server);
private:
std::vector<std::string> _tailNumList;
std::map<std::string, std::string> _attrs;
};
}
#endif // END ACCONFIG.H