Fwd: [BGL] wrapping bundled properties
Hi, I have my own container and define a wrapper around it to make it behave like a BGL graph. Is it possible (and does it make sense) to define wrapper for bundled properties i.e. I want to control the storage of the bundled properties but want the expression to evaluate G[n].color = white As of now, I will just get an error operator [] not defined. It is quite that I just need to define operator [] for G. Thanks in advance for any suggestions. -Sandeep
On Fri, 3 May 2013, Sandeep Gupta wrote:
Hi,
I have my own container and define a wrapper around it to make it behave like a BGL graph. Is it possible (and does it make sense) to define wrapper for bundled properties i.e. I want to control the storage of the bundled properties but want the expression to evaluate
G[n].color = white
As of now, I will just get an error operator [] not defined. It is quite that I just need to define operator [] for G. Thanks in advance for any suggestions.
The main thing if you just want that syntax is that you would need to have operator[] in your graph type. Getting full bundled property support would including allowing syntax such as get(&vertex_prop::color, G) and such; those are somewhat more difficult. If you do not need full compatibility with all of the bundled property features, though, operator[] is enough to implement. -- Jeremiah Willcock
participants (2)
-
Jeremiah Willcock
-
Sandeep Gupta