Changeset 67 in flair-src for trunk/lib/FlairCore/src/Widget.cpp
- Timestamp:
- 08/29/16 16:58:23 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Widget.cpp
r15 r67 82 82 if (GetPersistentXmlProp<double>(prop, tmp)) { 83 83 value = tmp; 84 return true; 85 } else { 86 return false; 87 } 88 } 89 90 template <> 91 bool Widget::GetPersistentXmlProp(std::string prop, std::string &value) { 92 xmlChar *result = NULL; 93 result = xmlGetProp(pimpl_->file_node, (xmlChar *)prop.c_str()); 94 if (result != NULL) { 95 value = std::string((char *)result); 96 xmlFree(result); 84 97 return true; 85 98 } else { … … 208 221 } 209 222 223 template <> void Widget::SetPersistentXmlProp(std::string prop, std::string value) { 224 SetVolatileXmlProp(prop, value); 225 SetVolatileXmlProp(prop, value, pimpl_->file_node); 226 } 227 228 void Widget::UnsetPersistentXmlProp(std::string prop) { 229 xmlUnsetProp(pimpl_->file_node, (xmlChar *)prop.c_str()); 230 } 231 210 232 void Widget::SendXml(void) { pimpl_->SendXml(); } 211 233
Note:
See TracChangeset
for help on using the changeset viewer.