Changeset 24:053261a1064b in rrlib_xml


Ignore:
Timestamp:
21.01.2011 15:37:24 (9 years ago)
Author:
Jens Wettach <wettach@…>
Branch:
default
Phase:
public
Convert:
svn:3219ad6e-c0b7-4ac2-9554-e22e195eef7a/trunk@25
Message:

added assign operator to <tXMLDocument>

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tXMLDocument.cpp

    r20 r24  
    105105} 
    106106 
     107tXMLDocument& tXMLDocument::operator=(const tXMLDocument & other) 
     108{ 
     109  xmlFreeDoc(this->document); 
     110  this->document = xmlCopyDoc(other.document, true); 
     111  this->root_node = reinterpret_cast<tXMLNode *>(xmlDocGetRootElement(this->document)); 
     112  return *this; 
     113} 
     114 
    107115//---------------------------------------------------------------------- 
    108116// tXMLDocument GetRootNode 
  • tXMLDocument.h

    r20 r24  
    131131  ~tXMLDocument(); 
    132132 
     133  /*! Assign operator for tXMLDocument 
     134   */ 
     135  tXMLDocument& operator=(const tXMLDocument& other); 
     136 
    133137  /*! Get the root node of the DOM tree stored for this document 
    134138   * 
Note: See TracChangeset for help on using the changeset viewer.