Blame view

src/expressionParser/ArgListInfo.hh 1.21 KB
ea6be348   Benjamin Renard   Support arguments...
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
64
65
66
67
68
69
70
71
72
73
/*
 * ArgListInfo.hh
 *
 *  Created on: Dec 03, 2020
 *      Author: AKKA
 */

#ifndef ARGLISTINFO_HH_
#define ARGLISTINFO_HH_

#include <iostream>
#include <map>
#include <boost/shared_ptr.hpp>
#include <vector>
#include <utility>

namespace AMDA {
namespace parser {

/**
 * @class ArgListInfo
 * @brief Information about an argument list.
 * @details
 */
class ArgListInfo {
public:
	ArgListInfo () :
		_id(""),
		_values()
	{}

	friend std::ostream& operator<<(std::ostream& out_, const ArgListInfo& info);

	/*
	 * @brief Get the argument list Id
	 */
	const std::string& getID() const {
		return _id;
	}

	/*
	 * @brief Set the argument list Id
	 */
	void setID(const std::string& id) {
		_id = id;
	}

	/*
	 * @brief Get list of available values for this argument list
	 */
	const std::map<std::string, std::string>& getValues() const {
		return _values;
	}

	/*
	 * @brief Add an available value for this argument list
	 */
	void addValue(const std::string& key, const std::string& value) {
		_values[key] = value;
	}

protected:
	std::string _id;
	std::map<std::string, std::string> _values;
};

typedef std::map<std::string,ArgListInfo> ArgListInfoMap;

} /* namespace parser */
} /* namespace AMDA */


#endif /* ARGLISTINFO_HH_ */