Skip to main content
GameDev.net gamedev.net
🔒 Locked

Boost Multi_Index Help

Started by HellRiZZer Dec 3, 2005 at 8:59 PM 0 replies 850+ views
Original Post
HellRiZZer
HellRiZZer
Hi guys, I'm having a big problem setting up a texture manager that is going to track textures by unique texture filename and name. What I want is to be able to add textures by passing a filename and a name for the texture, and the texture manager adds it to the list. I can do it with the std::map, but I want to try to do it with boost::multi_index since it has in-built ability to sort and retrieve items. So, how would I do that? I tried declaring a class like this:
[SOURCE]
class ION_ENGINE_EXPORT CTextureManager : public CSingleton<CTextureManager>, 
	public boost::multi_index::multi_index_container
	<
	ITexture,
		boost::multi_index::indexed_by
		<
			boost::multi_index::sequenced<>,
			boost::multi_index::ordered_unique<std::string> 
		>
	>
{
//
};
[/SOURCE]
But it complains with heaps of strange and weird errors that I cant translate yet. Can anyone proficient with Boost give me an example or at least a pointer to what I should be doing to have a decent working texture manager? Thank you.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.