Couple of weeks ago I’ve made a presentation for one of the leading high-tech companies in Israel. In this presentation I’ve reviewed the Boost libraries. One of the libraries I’ve presented was the Smart Pointer library. I was quite surprised that software developers are not acquainted with the smart pointers. To help them I’ve prepared a summary document explaining how to use the smart pointer based on the Boost as an example. I think this memo can help other programmers, so I’ve decided to publish it in our blog.
Recently, I’ve worked with Boost Graph Library (BGL) I’ve encountered with couple of strange things. Sometimes, I’ve used to get memory access violation exceptions. After some investigation I’ve found that this happens due to vector deletion when adjacency_list is used with vector as vertices storage. In this data structure the vertex descriptors are simply vector [...]
Sometimes you need to display the enum member value in a user readable form.
If you want to display the value in a nice human readable form like “Dining Room”, you understand that ToString() method can’t help here.
Fortunately, there are several methods to accomplish this. One of the simple and nice solutions is presented in the following article http://blogs.msdn.com/b/abhinaba/archive/2005/10/20/483000.aspx. It uses DescriptionAttribute custom attribute, which binds the display string to enum member.