← Back to team overview

kicad-developers team mailing list archive

understanding EDA_ITEM

 

Hello all,

I was trying to understand the propose of the EDA_ITEM (and its use on 3d-viewer).
I was trying to understand what could be the historical decisions to use it in some classes of the module.

As an example, in 3d_material.h

class S3D_MATERIAL : public EDA_ITEM
...
    S3D_MATERIAL* Next() const { return (S3D_MATERIAL*) Pnext; }
    S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; }
...
    virtual wxString GetClass() const
    {
        return wxT( "S3D_MATERIAL" );
    }
...
etc

I am not sure why it was used and if it have any benefit from using it. In some of this simple cases I think it make the implementation a bit more confused and hard to follow.

So I was trying to understand benefit / propose of use EDA_ITEM and when it should used / should not be used/ can be avoided..
Special, I have in mind to implement some things in the future using vectors and not (never) any type of linked lists (for memory access operations and speed up..)

Thank you!
Regards,
Mario Luzeiro


Follow ups