adding new (de)serializers

Topics: algorithm, graph, serialization
May 26, 2010 at 3:16 PM
Edited May 26, 2010 at 3:16 PM
Hi, I have looked at QuickGraph but haven't programmed with it yet. I'm a little overwhelmed by it, to be honest.

My question is as follows. If I decide to use QuickGraph I will need to write several different importers from and exporters to certain file formats and maintain them.

For instance, one thing I need to support in particular is a hierarchical graph format (i.e. graphs in which nodes form a containment hierachy). Serialization\ already contains a serializer and deserializer for the GraphML format, which supports this in principle, but they don't. Extending them to support this is nontrivial, it requires several design decisions, most importantly a way to represent hierarchical graphs in QuickGraph. Once that is decided, the existing GraphML (de)serializers will need to be refactored before I can extend them to support node hierarchies.

Of course I can hack on my own copy of QuickGraph until it does what I want, but I'd rather not to. I'd prefer to use QuickGraph unchanged and add my own assemblies with graph implementations and (de)serializations, without having to copy&paste lots of QuickGraph code over to my own projects.

Is this feasible with the present architecture? If it is, how? If not, what is the best way to proceed?