I have three abstract classes
First those in IConsoleObjects.h
class IConsoleObject : public IManageable {
public:
// Generic drawing method
virtual bool Draw(Coord c, IConsole *console) = 0;
// Convenient overload for the basic drawing method
virtual bool Draw(sint16 x, sint16 y, IConsole *console) = 0;
};
class IAnimatedConsoleObject : public IConsoleObject {
public:
// Gets and sets the amount of time per frame, in ms
virtual uint32 TimePerFrame() = 0;
virtual void TimePerFrame(uint32 ms) = 0;
};
Then one more in IAnimatedObject.h
// A multiframe object
class IAnimatedObject : public IAnimatedConsoleObject
{
public:
// Convenient wrapper for another draw function
virtual bool Draw(std::size_t frame, sint16 x, sint16 y, IConsole *console) = 0;
// Draws the frame to a coordinate (uses Object's drawing code)
virtual bool Draw(std::size_t frame, Coord c, IConsole *console) = 0;
};
When I try to use an object that implements IAnimatedObject I am not able to use the Draw() methods from IConsoleObject. MSVC++.NET 2003 tells me that only the Draw() methods from IAnimatedObject are available. However, I am able to use the methods from IAnimatedConsoleObject and even the methods from IManageable!
I'm not sure if this affects this but these interfaces live in a static library and I am using a function exported from that library to give me a pointer to an IAnimatedObject.