diff options
| author | Comment <tim@gray.(none)> | 2013-09-08 13:11:02 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-09-08 13:11:02 +0100 |
| commit | 1ff03ea63d79549db86422837f47916a42f23eb9 (patch) | |
| tree | 1631546f60cb830749d6fe64d8af0911d9afcfe5 /rotord/src/xmlIO.cpp | |
| parent | 512a2738e9f2fc74f109dabada357cc20c2a3412 (diff) | |
refactoring utils
Diffstat (limited to 'rotord/src/xmlIO.cpp')
| -rwxr-xr-x | rotord/src/xmlIO.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/rotord/src/xmlIO.cpp b/rotord/src/xmlIO.cpp index 3a7ec61..f2abe27 100755 --- a/rotord/src/xmlIO.cpp +++ b/rotord/src/xmlIO.cpp @@ -70,7 +70,7 @@ void xmlIO::clear(){ //--------------------------------------------------------- bool xmlIO::loadFile(const string& xmlFile){ - //string fullXmlFile = ofToDataPath(xmlFile); + //string fullXmlFile = toDataPath(xmlFile); bool loadOkay = doc.LoadFile(xmlFile); @@ -88,7 +88,7 @@ bool xmlIO::loadFile(const string& xmlFile){ //--------------------------------------------------------- bool xmlIO::saveFile(const string& xmlFile){ - //string fullXmlFile = ofToDataPath(xmlFile); + //string fullXmlFile = toDataPath(xmlFile); return doc.SaveFile(xmlFile); } @@ -142,7 +142,7 @@ void xmlIO::removeTag(const string& tag, int which){ int xmlIO::getValue(const string& tag, int defaultValue, int which){ TiXmlHandle valHandle(NULL); if (readTag(tag, valHandle, which)){ - return ofToInt(valHandle.ToText()->Value()); + return toInt(valHandle.ToText()->Value()); } return defaultValue; } @@ -151,7 +151,7 @@ int xmlIO::getValue(const string& tag, int defaultValue, int which){ double xmlIO::getValue(const string& tag, double defaultValue, int which){ TiXmlHandle valHandle(NULL); if (readTag(tag, valHandle, which)){ - return ofToFloat(valHandle.ToText()->Value()); + return toFloat(valHandle.ToText()->Value()); } return defaultValue; } @@ -361,13 +361,13 @@ int xmlIO::writeTag(const string& tag, const string& valueStr, int which){ //--------------------------------------------------------- int xmlIO::setValue(const string& tag, int value, int which){ - int tagID = writeTag(tag, ofToString(value).c_str(), which) -1; + int tagID = writeTag(tag, toString(value).c_str(), which) -1; return tagID; } //--------------------------------------------------------- int xmlIO::setValue(const string& tag, double value, int which){ - int tagID = writeTag(tag, ofToString(value).c_str(), which) -1; + int tagID = writeTag(tag, toString(value).c_str(), which) -1; return tagID; } @@ -379,13 +379,13 @@ int xmlIO::setValue(const string& tag, const string& value, int which){ //--------------------------------------------------------- int xmlIO::addValue(const string& tag, int value){ - int tagID = writeTag(tag, ofToString(value).c_str(), -1) -1; + int tagID = writeTag(tag, toString(value).c_str(), -1) -1; return tagID; } //--------------------------------------------------------- int xmlIO::addValue(const string& tag, double value){ - int tagID = writeTag(tag, ofToString(value).c_str(), -1) -1; + int tagID = writeTag(tag, toString(value).c_str(), -1) -1; return tagID; } @@ -407,7 +407,7 @@ int xmlIO::addTag(const string& tag){ //--------------------------------------------------------- int xmlIO::addAttribute(const string& tag, const string& attribute, int value, int which){ - int tagID = writeAttribute(tag, attribute, ofToString(value).c_str(), which) -1; + int tagID = writeAttribute(tag, attribute, toString(value).c_str(), which) -1; return tagID; } @@ -418,7 +418,7 @@ int xmlIO::addAttribute(const string& tag, const string& attribute, int value){ //--------------------------------------------------------- int xmlIO::addAttribute(const string& tag, const string& attribute, double value, int which){ - int tagID = writeAttribute(tag, attribute, ofToString(value).c_str(), which) -1; + int tagID = writeAttribute(tag, attribute, toString(value).c_str(), which) -1; return tagID; } |
