N
nitrogenycs
Hello,
Code below.
I've run into the following problem. I want to pass DCManagedTexture*
as a template parameter into the DCDefaultResourceManager template. The
DCManagedTexture class is nested inside the DCTextureManager class. The
compiler (msvc 7.1)complains that it doesn't know anything about
DCTextureManager:CManagedTexture* which is probably right. So I tried
to forward reference it (before the class declaration) with sth like:
class DCTextureManager;
class DCTextureManager:CManagedTexture;
This does not work either. How can I pass the inner nested class as a
template parameter into the template parameter of the base class of the
enclosing class . Is this possible at all?
My alternative solution is to move the nested class outside of the
enclosing class, make it's contructors protected and declare it as a
friend in DCTextureManager to get the encapsulation I want. Does this
sound good or is there a better way?
Thanks for your answer!
-Matthias
Code:
class DCTextureManager : public
DCDefaultResourceManager<DCTextureManager:CManagedTexture*>
{
public:
class DCManagedTexture : public DCResource, public DCMaterial
{}
};
Code below.
I've run into the following problem. I want to pass DCManagedTexture*
as a template parameter into the DCDefaultResourceManager template. The
DCManagedTexture class is nested inside the DCTextureManager class. The
compiler (msvc 7.1)complains that it doesn't know anything about
DCTextureManager:CManagedTexture* which is probably right. So I tried
to forward reference it (before the class declaration) with sth like:
class DCTextureManager;
class DCTextureManager:CManagedTexture;
This does not work either. How can I pass the inner nested class as a
template parameter into the template parameter of the base class of the
enclosing class . Is this possible at all?
My alternative solution is to move the nested class outside of the
enclosing class, make it's contructors protected and declare it as a
friend in DCTextureManager to get the encapsulation I want. Does this
sound good or is there a better way?
Thanks for your answer!
-Matthias
Code:
class DCTextureManager : public
DCDefaultResourceManager<DCTextureManager:CManagedTexture*>
{
public:
class DCManagedTexture : public DCResource, public DCMaterial
{}
};