#ifndef ATTRIBUT_REGISTRAR_HPP #define ATTRIBUT_REGISTRAR_HPP #include "base_attribut.hpp" #include "xmlio_std.hpp" using Poco::HashMap; class CAttributRegistrar { public : void RegisterAttribut(CBaseAttribut & attribut) ; ostream & PrintAttribut(ostream & o) ; unordered_map attrMap ; vector attrVector ; bool hasAttribut(const string& att_name) { if (attrMap.find(att_name)!=attrMap.end()) return true ; else return false ; } void setSAttribut(const string& att_name, const std::string& value) { unordered_map::iterator it ; std::cout << "lol" << std::endl; it=attrMap.find(att_name) ; std::cout << "lol" << std::endl; if (it!=attrMap.end()) (*it).second->setFromString(value) ; else error("CAttributRegistrar::setAttribut") <<"Could not find <<"<> attribut in registred list"< void setAttribut(const string& att_name, ValueType value) { unordered_map::iterator it ; it=attrMap.find(att_name) ; if (it!=attrMap.end()) (*it).second->setValue(value) ; else error("CAttributRegistrar::setAttribut") <<"Could not find <<"<> attribut in registred list"<::iterator it ; o<<"List of attribut"<print(o) ; } o<