here the same (sorry if I wasn't clear last time) set_id() and so on, btw it would be nicer to have the methods bodies inlined: set_id() { id_ = id; }, and same with getters const std::string& id() const { return id_; }