Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

void Agi::WagProperty::deepCopy ( const WagProperty other ) [protected]

Deep copies the parameter object to this object.

Parameters:
otherThe object to be deep copied to this object.

Definition at line 52 of file wagparser.cpp.

References _propCode, _propData, _propNum, _propSize, _propType, _readOk, and deleteData().

Referenced by operator=(), and WagProperty().

                                                   {
      _readOk   = other._readOk;
      _propCode = other._propCode;
      _propType = other._propType;
      _propNum  = other._propNum;
      _propSize = other._propSize;

      deleteData(); // Delete old data (If any) and set _propData to NULL
      if (other._propData != NULL) {
            _propData = new char[other._propSize + 1UL]; // Allocate space for property's data plus trailing zero
            memcpy(_propData, other._propData, other._propSize + 1UL); // Copy the whole thing
      }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index