00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef UAPAttribute_hpp
00025 #define UAPAttribute_hpp 1
00026
00027 #include <string>
00028 #include "UAP/BasicUtilities.hpp"
00029
00046 class UAPAttribute{
00047 public:
00048
00054 UAPAttribute(const std::string& _name, const std::string& _value);
00055
00060 void setName(const std::string& _name);
00061
00066 void setValue(const std::string& _value);
00067
00072 std::string getName() const;
00073
00078 std::string getValue() const;
00079
00084 bool getInt(int& num);
00085
00090 bool getDouble(double& num);
00091
00096 bool getBool(bool& num);
00097
00102 std::string toString() const;
00103
00107 friend std::ostream& operator << (std::ostream& os, const UAPAttribute& attr);
00108 friend std::ostream& operator << (std::ostream& os, const UAPAttribute* attr);
00109
00110 private:
00111
00113 std::string name;
00114
00116 std::string value;
00117
00118 };
00119
00120 #endif
00121