[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] [ Search: ]

4.3.1.3 Classes Implementing Multiple Interfaces

Sometimes we will want one object to implement several interfaces. For example, the 3D graphics driver could provide a basic ‘iGraphics3D’ interface and several additional optional interfaces such as ‘iHalo’, ‘iBumpMap’, and so on. This is done using special templates:

 
class MyGraphics3D :
    public scfImplementation3<MyGraphics3D, iGraphics3D, iHalo, iBumpMap>
{
public:
  ...
};

This is an example of a class implementing three interfaces. You need to give the implementation of all functions from those three interfaces in ‘MyGraphics3D’.


This document was generated using texi2html 1.76.