- Timestamp:
- Feb 14, 2006, 11:07:53 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/RpLibrary.cc
r135 r174 588 588 RpLibrary::get (std::string path) 589 589 { 590 return (this->getString(path)); 591 } 592 593 /**********************************************************************/ 594 // METHOD: getString() 595 /// Return the string value of the object held at location 'path' 596 /** 597 */ 598 599 std::string 600 RpLibrary::getString (std::string path) 601 { 590 602 scew_element* retNode = _find(path,0); 603 XML_Char const* retCStr = NULL; 591 604 592 605 if (retNode == NULL) { 593 606 // need to raise error 594 return ""; 595 } 596 597 return std::string(scew_element_contents(retNode)); 598 } 599 600 /**********************************************************************/ 601 // METHOD: getString() 602 /// Return the string value of the object held at location 'path' 603 /** 604 */ 605 606 std::string 607 RpLibrary::getString (std::string path) 608 { 609 scew_element* retNode = _find(path,0); 610 611 if (retNode == NULL) { 612 // need to raise error 613 return ""; 614 } 615 616 return std::string(scew_element_contents(retNode)); 607 return std::string(""); 608 } 609 610 retCStr = scew_element_contents(retNode); 611 612 if (!retCStr) { 613 return std::string(""); 614 } 615 616 return std::string(retCStr); 617 617 } 618 618
Note: See TracChangeset
for help on using the changeset viewer.