Lines Matching refs:replaceWith
118 bool Container::Replace(const META_NS::IObject::Ptr& child, const META_NS::IObject::Ptr& replaceWith, bool addAlways)
128 if (replaceWith && (!IsCompatible(replaceWith) || !CheckLoop(replaceWith))) {
134 // Check if 'child' and 'replaceWith' can already be found from the container
141 if (*it == replaceWith) {
151 // 'child' and 'replaceWith' are the same item (which is already in the container)
156 if (replaceWith) {
157 *removedIt = replaceWith;
159 // 'replaceWith' was already in the container, remove it from its previous position
162 // 'replaceWith' was added
163 added = replaceWith;
166 // 'replaceWith' == null, remove 'child'
173 if (!changed && addAlways && replaceWith && movedIt == children_.end()) {
177 children_.push_back(replaceWith);
178 added = replaceWith;