Skip to content

Friend Classes #29

Description

@ada-foss

Making some unrelated changes I noticed that lidarquadtree (and maybe the main body of LAG) mostly just defines every value and function as protected, then makes the classes that need those classes friends.

I poked around looking at QuadtreeNode as my example. I'm certain that this class is completely internal to the quadtree. QuadtreeNode is not an outward facing class, nothing outside of the library should be able to access it or refer to it, so I would argue that everything that uses it should use only public components (of which there are currently none), and that QuadtreeNode should have no friends at all.

What I would really like is for C++ to be more capable of specifying more exactly what should be able to access what. Or perhaps these classes should be more broken up? Just speculation.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions