C++: setTypes method to Obj
[smartapi.git] / Common / C++ / SmartAPI / smartapi / model / Obj.cpp
index d45a1854a1bd0c2d344185a85fde286ec42b4ca5..95803d710c1c34849a083960b0a6f24b7e24da1d 100755 (executable)
@@ -197,6 +197,15 @@ void Obj::addType(QString type)
                mTypes.append(typeStr);
 }
 
+void Obj::setTypes(QList<QString> types)
+{
+       clearTypes();
+       while (types.length() > 0) {
+               QString typeStr = Tools::toAbsoluteUri(types.takeFirst());
+               mTypes.append(typeStr);
+       }
+}
+
 bool Obj::hasType(QString type)
 {
        QString typeStr = Tools::toAbsoluteUri(type);