FunctionInfo.hh
1.71 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* FunctionInfo.hh
*
* Created on: Mar 19, 2019
* Author: AKKA
*/
#ifndef FUNCTIONINFO_HH_
#define FUNCTIONINFO_HH_
#include <iostream>
#include <map>
#include <boost/shared_ptr.hpp>
#include <vector>
#include <utility>
namespace AMDA {
namespace parser {
/**
* @class FunctionInfo
* @brief Information about a function.
* @details
*/
class FunctionInfo {
public:
FunctionInfo () :
_ihmName(""),
_kernelName(""),
_nbArgs(1),
_hasPrompt(false)
{}
friend std::ostream& operator<<(std::ostream& out_, const FunctionInfo& info);
/*
* @brief Get function name for IHM
*/
const std::string& getIHMName() const {
return _ihmName;
}
/*
* @brief Set function name for IHM
*/
void setIHMName(const std::string& ihmName) {
_ihmName = ihmName;
}
/*
* @brief Get function name for kernel
*/
const std::string& getKernelName() const {
return _kernelName;
}
/*
* @brief Set function name for kernel
*/
void setKernelName(const std::string& kernelName) {
_kernelName = kernelName;
}
/*
* @brief Get nb arguments of the function
*/
int getNbArgs() const {
return _nbArgs;
}
/*
* @brief Set nb arguments of the function
*/
void setNbArgs(int nbArgs) {
_nbArgs = nbArgs;
}
/*
* @brief Get if function has a prompted argument
*/
bool hasPromptedArg() const {
return _hasPrompt;
}
/*
* @brief Set if function has a prompted argument
*/
void setHasPromptedArg(bool hasPrompt) {
_hasPrompt = hasPrompt;
}
protected:
std::string _ihmName;
std::string _kernelName;
int _nbArgs;
bool _hasPrompt;
};
typedef std::map<std::string,FunctionInfo> FunctionInfoMap;
} /* namespace parser */
} /* namespace AMDA */
#endif /* FUNCTIONINFO_HH_ */