+ //========================================================================
+ void AttributeDescriptor::CleanName(std::string& str) const
+ {
+ // quote must be doubled for SQL
+ // crea::Utils::Replace( str, "'", "''" );
+ boost::algorithm::replace_all(str,"'","''");
+ // Found strange strings which contained NULL char INSIDE string
+ int i,size=str.size();
+ for (i=0;i<size;++i)
+ {
+ if (str[i]==0)
+ {
+ str = str.substr(0,i);
+ break;
+ }
+ }
+ }
+ //========================================================================
+
+ //=====================================================================
+ // Ctor with key, name and flags
+ AttributeDescriptor::AttributeDescriptor(const std::string& key,
+ const std::string& name,
+ unsigned int flags)
+ : mKey(key), mName(name), mGroup(0), mElement(0), mFlags(flags)
+ {
+
+ CleanName(mName);
+ GimmickDebugMessage(3,"AttributeDescriptor : '"<<key
+ <<"' ["<<flags<<"]"<<std::endl);
+ GimmickDebugMessage(3,"='"<<mName<<"'"<<std::endl);
+ }
+
+ //=====================================================================