Changeset 125 for trunk/src/core/RpLibrary.cc
- Timestamp:
- Nov 4, 2005 3:19:11 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/RpLibrary.cc
r121 r125 448 448 449 449 RpLibrary* 450 RpLibrary::element (std::string path , std::string as)450 RpLibrary::element (std::string path) 451 451 { 452 452 RpLibrary* retLib; … … 566 566 } 567 567 568 569 568 /**********************************************************************/ 570 569 // METHOD: get() 571 /// Return the RpLibraryobject held at location 'path'572 /** 573 */ 574 575 RpLibrary* 570 /// Return the string value of the object held at location 'path' 571 /** 572 */ 573 574 std::string 576 575 RpLibrary::get (std::string path) 577 576 { 578 RpLibrary* retVal;579 580 scew_element* retNode = _find(path,0);581 582 if (retNode == NULL) {583 // need to raise error584 return NULL;585 }586 587 retVal = new RpLibrary(retNode);588 589 //who delete's this memory?590 return retVal;591 }592 593 /**********************************************************************/594 // METHOD: getString()595 /// Return the string value of the object held at location 'path'596 /**597 */598 599 std::string600 RpLibrary::getString (std::string path)601 {602 // std::string retVal;603 604 /*605 if (path.empty()) {606 return "";607 }608 */609 610 577 scew_element* retNode = _find(path,0); 611 578 … … 615 582 } 616 583 617 // retVal = std::string(scew_element_contents(retNode)); 618 // return retVal; 584 return std::string(scew_element_contents(retNode)); 585 } 586 587 /**********************************************************************/ 588 // METHOD: getString() 589 /// Return the string value of the object held at location 'path' 590 /** 591 */ 592 593 std::string 594 RpLibrary::getString (std::string path) 595 { 596 scew_element* retNode = _find(path,0); 597 598 if (retNode == NULL) { 599 // need to raise error 600 return ""; 601 } 619 602 620 603 return std::string(scew_element_contents(retNode));
Note: See TracChangeset
for help on using the changeset viewer.