Sign in to follow this  
HellRiZZer

Boost Multi_Index Help

Recommended Posts

HellRiZZer    308
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this