1 #ifndef GDE_PROFILE_ATTRIBUTE_HPP
2 #define GDE_PROFILE_ATTRIBUTE_HPP
8 class ProfileAttribute {
9 friend class ProfilesService;
10 friend class GDESession;
13 ProfileAttribute(const std::string& name, const std::string& type, bool mandatory)
14 : _id(0), _name(name), _type(type), _profileId(0), _mandatory(mandatory)
16 ~ProfileAttribute() {}
18 inline int getId() const { return _id; }
19 inline void setId(int id) { this->_id = id; }
21 inline std::string getName() const { return _name; }
22 inline void setName(const std::string& name) { this->_name = name; }
24 inline std::string getType() const { return _type; }
25 inline void setType(const std::string& type) { this->_type = type; }
27 inline int getProfileId() const { return _profileId; }
28 inline void setProfileId(int profileId) { this->_profileId = profileId; }
30 inline bool getMandatory() const { return _mandatory; }
31 inline void setMandatory(bool mandatory) { this->_mandatory = mandatory; }
33 const std::string toJson() const;
34 static ProfileAttribute fromJson(const std::string& json);
37 ProfileAttribute(int id=0, const std::string& name="", const std::string& type="", int profileId=0, bool mandatory=false)
38 : _id(id), _name(name), _type(type), _profileId(profileId), _mandatory(mandatory)
40 //ProfileAttribute(const ProfileAttribute&); // non copyable
41 //ProfileAttribute& operator=(const ProfileAttribute&); // non copyable