0

I'm trying to use the write_graphml function from the Boost Graph Library. The relevant things to know are that this function takes in a dynamic property map composed of property maps for each vertex and edge property, and assumes that all properties on the vertices and edges can be resolved to character types for writing to the file. This makes sense and works for most of my properties. However, I have 1 edge property that is an enum, and so it refuses to compile.

I think what I need is to create a custom PropertyMap that basically acts as a wrapper around the one for that edge property, intercepts the accesses, and returns a character representation in place of the enum values.

Is this the right way to solve this, and if so where can I look for how to define my own custom PropertyMap? I've been digging through the docs and code and so far I'm lost.

anderspitman
  • 9,230
  • 10
  • 40
  • 61

1 Answers1

0

Got some help from someone else looking closer at the error messages, and it turns out defining << for std::ostream and >> for std::istream for my custom type enabled boost to write everything properly.

anderspitman
  • 9,230
  • 10
  • 40
  • 61