Graph edition - friend class or public methods?

Hello everyone.

I'm writing a program basing on a graph structure. I need to create a module that can load a graph from a text file and edit the created graph - delete/modify edges, verticles and their fields. So the graph has to be mutable and cannot be created just with constructors due to possible cyclic references.

Now my question is: what is the best way to realise the editor? Should I create a class 'Editor' who will be a friend to all the graph elements or implement public methods in all graph element classes to modify each field?

Or is there another, better solution?
Topic archived. No new replies allowed.