////////////////////////////////////////////////////////////////////////// CopyProps //////////////////////////////////////////////////////////////////////////
| 113 | // CopyProps |
| 114 | /////////////////////////////////////////////////////////////////////////////// |
| 115 | void cFSPropSet::CopyProps(const iFCOPropSet* pSrc, const cFCOPropVector& propsToCopy) |
| 116 | { |
| 117 | ASSERT(pSrc->GetType() == CLASS_TYPE(cFSPropSet)); |
| 118 | |
| 119 | // first, modify my valid vector... |
| 120 | mValidProps |= propsToCopy; |
| 121 | |
| 122 | for (int i = 0; i < GetNumFSProps(); i++) |
| 123 | { |
| 124 | if (propsToCopy.ContainsItem(i)) |
| 125 | { |
| 126 | ASSERT(pSrc->GetValidVector().ContainsItem(i)); |
| 127 | const iFCOProp* pProp = pSrc->GetPropAt(i); |
| 128 | |
| 129 | if (pProp->GetType() != cFCOUndefinedProp::GetInstance()->GetType()) |
| 130 | { |
| 131 | GetPropAt(i)->Copy(pProp); |
| 132 | mUndefinedProps.RemoveItem(i); |
| 133 | } |
| 134 | else |
| 135 | mUndefinedProps.AddItem(i); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | |
| 141 | /////////////////////////////////////////////////////////////////////////////// |
no test coverage detected