CrystalSpace

Public API Reference

scfFakeInterface< If > Class Template Reference
[Shared Class Facility (SCF)]

Fugly helper to resolve some bad situations. More...

#include <csutil/scf_implementation.h>


Detailed Description

template<class If>
class scfFakeInterface< If >

Fugly helper to resolve some bad situations.

;) Basically, it adds a new entry to QueryInterface() without adding another class to inheritance.

Consider the following case:

 struct iA : public virtual iBase {};
 struct iB : public iA {};

 class myB : public scfImplementation1<myB, iB> {..}.

Querying iA from myB will then fail even though myB inherits from iA (through iB). By changing the declaration to

 class myB : public scfImplementation2<myB, iB, scfFakeInterface<iA> > {..}

you make sure you can query iA from myB.

Warning:
This is potentially dangerous as you can add whatever interface to another. USE WITH CARE!

Definition at line 114 of file scf_implementation.h.


The documentation for this class was generated from the following file:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1