|
2 | 2 | #include "ofxXmlPoco.h" |
3 | 3 | #include "Poco/AutoPtr.h" |
4 | 4 |
|
5 | | -using namespace std; |
| 5 | +using std::string; |
| 6 | +using std::vector; |
6 | 7 |
|
7 | 8 | ofxXmlPoco::~ofxXmlPoco(){ |
8 | 9 | releaseAll(); |
9 | 10 | } |
10 | 11 |
|
11 | | - |
12 | 12 | ofxXmlPoco::ofxXmlPoco(const string & path){ |
13 | 13 | document = new Poco::XML::Document(); // we create this so that they can be merged later |
14 | 14 | element = document->documentElement(); |
@@ -97,14 +97,14 @@ int ofxXmlPoco::getNumChildren(const string& path) const{ |
97 | 97 | } |
98 | 98 |
|
99 | 99 | string ofxXmlPoco::toString() const{ |
100 | | - ostringstream stream; |
| 100 | + std::ostringstream stream; |
101 | 101 |
|
102 | 102 | Poco::XML::DOMWriter writer; |
103 | 103 | writer.setOptions(Poco::XML::XMLWriter::PRETTY_PRINT); |
104 | 104 | if(document){ |
105 | 105 | try{ |
106 | 106 | writer.writeNode( stream, getPocoDocument() ); |
107 | | - }catch( exception & e ){ |
| 107 | + }catch( std::exception & e ){ |
108 | 108 | ofLogError("ofxXmlPoco") << "toString(): " << e.what(); |
109 | 109 | } |
110 | 110 | } else if(element){ |
@@ -604,8 +604,8 @@ bool ofxXmlPoco::exists(const string & path) const{ // works for both attributes |
604 | 604 | return false; |
605 | 605 | } |
606 | 606 |
|
607 | | -map<string, string> ofxXmlPoco::getAttributes() const{ // works for both attributes and tags |
608 | | - map<string, string> attrMap; |
| 607 | +std::map<string, string> ofxXmlPoco::getAttributes() const{ // works for both attributes and tags |
| 608 | + std::map<string, string> attrMap; |
609 | 609 |
|
610 | 610 | if(element){ |
611 | 611 | Poco::AutoPtr<Poco::XML::NamedNodeMap> attr = element->attributes(); |
@@ -724,7 +724,7 @@ bool ofxXmlPoco::loadFromBuffer(const string & buffer){ |
724 | 724 | element = document->documentElement(); |
725 | 725 | return false; |
726 | 726 | } |
727 | | - catch(const exception & e){ |
| 727 | + catch(const std::exception & e){ |
728 | 728 | short msg = atoi(e.what()); |
729 | 729 | ofLogError("ofxXmlPoco") << "parse error: " << DOMErrorMessage(msg); |
730 | 730 | document = new Poco::XML::Document; |
|
0 commit comments