fipa_acl  1.4
userdef_param.h
Go to the documentation of this file.
1 
8 #ifndef FIPA_ACL_USERDEF_MESSAGEPARAM_H
9 #define FIPA_ACL_USERDEF_MESSAGEPARAM_H
10 
11 #include <string>
12 #include <vector>
13 
14 namespace fipa {
15 
16 namespace acl {
17 
25 class UserdefParam {
26 
27 /*
28 As the specification states, the value of any user defined parameter is a string; so if other data types are needed they are
29 to be parsed to a string if need for more complex objects as parameter value arises, they are either to be serialized(or parsed
30 somehow similar to the bit-efficient parsing), or we can customize the speciffication and use a template or overload it
31 */
32 private:
33  std::string mName;
34  std::string mValue;
35 
36 public:
37 
41  UserdefParam();
42 
48  UserdefParam(const std::string& name, const std::string& value = "");
49 
53  UserdefParam& operator=(const UserdefParam& other);
54 
58  bool operator==(const UserdefParam& other) const;
59 
60  /* \brief setter and getter methods */
65  const std::string& getValue() const { return mValue; }
66 
71  void setValue(const std::string& value) { mValue = value; }
72 
77  const std::string& getName() const { return mName; }
78 
84  void setName(const std::string& name);
85 
90  std::string toString() const;
91 
92 };
93 
94 typedef std::vector<UserdefParam> UserdefinedParameterList;
95 
96 }//end of acl namespace
97 }// end of fipa namespace
98 #endif
const std::string & getValue() const
Definition: userdef_param.h:65
const std::string & getName() const
Definition: userdef_param.h:77
std::string toString() const
std::vector< UserdefParam > UserdefinedParameterList
Definition: userdef_param.h:94
UserdefParam & operator=(const UserdefParam &other)
void setName(const std::string &name)
the method checks whether the passed name string is a word or not(according to the fipa spec) ...
overloaded equality operator for UserdefParam class objects
Definition: userdef_param.h:25
void setValue(const std::string &value)
Definition: userdef_param.h:71
bool operator==(const UserdefParam &other) const
Foundation of Physical Intelligent Agents.
Definition: conversation.cpp:6