Re: Question about RS_EntityContainer
Posted by
dxli on
Dec 30, 2024; 7:02pm
URL: https://forum.librecad.org/Question-about-RS-EntityContainer-tp5725899p5725913.html
The difference is clearly polymorphism. If you want shallow reparenting, use setparent(), if you want per class behaviors, use the polymorphic version
johnfound wrote
Ah, yes, verifying, also notice, that RS_Entity::reparent is absolutely the same as RS_Entity::setParent;

virtual void reparent(RS_EntityContainer *parent){
this->parent = parent;
}
void setParent(RS_EntityContainer *p){
parent = p;
}