c4_RenameViewer::c4_RenameViewer(c4_Sequence &seq_, const c4_Property &old_, const c4_Property &new_): _parent(&seq_) { for (int i = 0; i < _parent.NumProperties(); ++i) { const c4_Property &prop = _parent.NthProperty(i); _template.AddProperty(prop.GetId() == old_.GetId() ? new_ : prop); } }
void c4_Property::operator = (const c4_Property &prop_) { c4_ThreadLock::Hold lock; prop_.Refs( + 1); Refs( - 1); _id = prop_.GetId(); _type = prop_.Type(); }
c4_Property::c4_Property(const c4_Property &prop_): _id(prop_.GetId()), _type (prop_.Type()) { c4_ThreadLock::Hold lock; d4_assert(sPropCounts != 0); d4_assert(sPropCounts->GetAt(_id) > 0); Refs( + 1); }