Changeset 67 in flair-src for trunk/lib/FlairCore/src/Widget.cpp


Ignore:
Timestamp:
Aug 29, 2016, 4:58:23 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

corrections bugs checkpoint map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Widget.cpp

    r15 r67  
    8282  if (GetPersistentXmlProp<double>(prop, tmp)) {
    8383    value = tmp;
     84    return true;
     85  } else {
     86    return false;
     87  }
     88}
     89
     90template <>
     91bool 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);
    8497    return true;
    8598  } else {
     
    208221}
    209222
     223template <> void Widget::SetPersistentXmlProp(std::string prop, std::string value) {
     224  SetVolatileXmlProp(prop, value);
     225  SetVolatileXmlProp(prop, value, pimpl_->file_node);
     226}
     227
     228void Widget::UnsetPersistentXmlProp(std::string prop) {
     229  xmlUnsetProp(pimpl_->file_node, (xmlChar *)prop.c_str());
     230}
     231
    210232void Widget::SendXml(void) { pimpl_->SendXml(); }
    211233
Note: See TracChangeset for help on using the changeset viewer.