Jump to content
  • Advertisement
Sign in to follow this  
HellRiZZer

Boost Multi_Index Help

This topic is 4673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!